diff --git a/files/helpers/actions.py b/files/helpers/actions.py index b9997a147..1f2e5c831 100644 --- a/files/helpers/actions.py +++ b/files/helpers/actions.py @@ -157,7 +157,12 @@ def execute_snappy(post, v): body += "\n\n" if post.url and not post.url.startswith('/') and not post.url.startswith(f'{SITE_FULL}/') and not post.url.startswith(SITE_FULL_IMAGES): - body += f"Snapshots:\n\n* [archive.org](https://web.archive.org/{post.url})\n\n* [ghostarchive.org](https://ghostarchive.org/search?term={quote(post.url)})\n\n* [archive.ph](https://archive.ph/?url={quote(post.url)}&run=1) (click to archive)\n\n" + if post.url.startswith('https://old.reddit.com/r/'): + rev = post.url.replace('https://old.reddit.com/', '') + rev = f"* [undelete.pullpush.io](https://undelete.pullpush.io/{rev})\n\n" + else: rev = '' + + body += f"Snapshots:\n\n{rev}* [archive.org](https://web.archive.org/{post.url})\n\n* [ghostarchive.org](https://ghostarchive.org/search?term={quote(post.url)})\n\n* [archive.ph](https://archive.ph/?url={quote(post.url)}&run=1) (click to archive)\n\n" archive_url(post.url) captured = [] @@ -181,6 +186,9 @@ def execute_snappy(post, v): if "Snapshots:\n\n" not in body: body += "Snapshots:\n\n" if f'**[{title}]({href})**:\n\n' not in body: addition = f'**[{title}]({href})**:\n\n' + if href.startswith('https://old.reddit.com/r/'): + rev = href.replace('https://old.reddit.com/', '') + addition += f'* [undelete.pullpush.io](https://undelete.pullpush.io/{rev})\n\n' addition += f'* [archive.org](https://web.archive.org/{href})\n\n' addition += f'* [ghostarchive.org](https://ghostarchive.org/search?term={quote(href)})\n\n' addition += f'* [archive.ph](https://archive.ph/?url={quote(href)}&run=1) (click to archive)\n\n' diff --git a/files/routes/settings.py b/files/routes/settings.py index 086e493ee..3523549db 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -133,7 +133,7 @@ def settings_personal_post(v): updated = True elif request.values.get("reddit", v.reddit) != v.reddit: reddit = request.values.get("reddit") - if reddit in {'old.reddit.com', 'reddit.com', 'i.reddit.com', 'reddit.lol', 'libreddit.hu'}: + if reddit in {'old.reddit.com', 'reddit.com', 'i.reddit.com', 'reddit.lol', 'libreddit.hu', 'undelete.pullpush.io'}: updated = True v.reddit = reddit elif request.values.get("poor", v.poor) != v.poor: diff --git a/files/templates/settings/advanced.html b/files/templates/settings/advanced.html index 919eb2d1b..1797cbd4c 100644 --- a/files/templates/settings/advanced.html +++ b/files/templates/settings/advanced.html @@ -115,7 +115,7 @@

Change the domain you would like to view reddit posts in.

diff --git a/snappy_rDrama.txt b/snappy_rDrama.txt index c179f6b57..5203eedf1 100644 --- a/snappy_rDrama.txt +++ b/snappy_rDrama.txt @@ -3700,7 +3700,7 @@ Keyed? Keyed on what? {[para]} https://i.rdrama.net/images/16814288407579923.webp {[para]} -[Motherfucker, I had a .edu email before .com TLDs existed. All y'all AOLn00bs think you're fresh; you're just trite.](https://www.unddit.com/r/Drama/comments/4dqpx8/_/d1vn0sc/#comment-info) +[Motherfucker, I had a .edu email before .com TLDs existed. All y'all AOLn00bs think you're fresh; you're just trite.](https://undelete.pullpush.io/r/Drama/comments/4dqpx8/_/d1vn0sc) {[para]} Wingcuckery and its consequences have been a disaster for the human race {[para]} @@ -4320,4 +4320,4 @@ https://i.rdrama.net/images/1694199268584252.webp {[para]} https://i.rdrama.net/images/16942263739404266.webp {[para]} -We serve food here sir \ No newline at end of file +We serve food here sir