master
Aevann1 2022-01-12 05:41:23 +02:00
parent e0d9ef6094
commit 3e44777483
1 changed files with 4 additions and 3 deletions

View File

@ -341,9 +341,10 @@ class Submission(Base):
url = self.url
if v.teddit: url = self.url.replace("old.reddit.com", "teddit.net")
elif not v.oldreddit: url = self.url.replace("old.reddit.com", "reddit.com")
if v.controversial and '/comments/' in url and "sort=" not in url:
if "?" in url: url += "&sort=controversial"
else: url += "?sort=controversial"
if '/comments/' in url and "sort=" not in url:
if "?" in url: url += "&context=99"
else: url += "?context=99"
if v.controversial: url += "&sort=controversial"
return url
elif self.url:
if v and v.nitter: return self.url.replace("www.twitter.com", "nitter.net").replace("twitter.com", "nitter.net")