Remove Instagram -> Bibliogram replacement as it's discontinued (#772)
Close #761 Reference: https://cadence.moe/blog/2022-09-01-discontinuing-bibliogram
This commit is contained in:
parent
2751504d2f
commit
54cc790bdb
3 changed files with 0 additions and 9 deletions
|
@ -39,7 +39,6 @@ theme = "Nitter"
|
||||||
replaceTwitter = "nitter.net"
|
replaceTwitter = "nitter.net"
|
||||||
replaceYouTube = "piped.video"
|
replaceYouTube = "piped.video"
|
||||||
replaceReddit = "teddit.net"
|
replaceReddit = "teddit.net"
|
||||||
replaceInstagram = ""
|
|
||||||
proxyVideos = true
|
proxyVideos = true
|
||||||
hlsPlayback = false
|
hlsPlayback = false
|
||||||
infiniteScroll = false
|
infiniteScroll = false
|
||||||
|
|
|
@ -13,7 +13,6 @@ let
|
||||||
twLinkRegex = re"""<a href="https:\/\/twitter.com([^"]+)">twitter\.com(\S+)</a>"""
|
twLinkRegex = re"""<a href="https:\/\/twitter.com([^"]+)">twitter\.com(\S+)</a>"""
|
||||||
|
|
||||||
ytRegex = re(r"([A-z.]+\.)?youtu(be\.com|\.be)", {reStudy, reIgnoreCase})
|
ytRegex = re(r"([A-z.]+\.)?youtu(be\.com|\.be)", {reStudy, reIgnoreCase})
|
||||||
igRegex = re"(www\.)?instagram\.com"
|
|
||||||
|
|
||||||
rdRegex = re"(?<![.b])((www|np|new|amp|old)\.)?reddit.com"
|
rdRegex = re"(?<![.b])((www|np|new|amp|old)\.)?reddit.com"
|
||||||
rdShortRegex = re"(?<![.b])redd\.it\/"
|
rdShortRegex = re"(?<![.b])redd\.it\/"
|
||||||
|
@ -70,9 +69,6 @@ proc replaceUrls*(body: string; prefs: Prefs; absolute=""): string =
|
||||||
if prefs.replaceReddit in result and "/gallery/" in result:
|
if prefs.replaceReddit in result and "/gallery/" in result:
|
||||||
result = result.replace("/gallery/", "/comments/")
|
result = result.replace("/gallery/", "/comments/")
|
||||||
|
|
||||||
if prefs.replaceInstagram.len > 0 and "instagram.com" in result:
|
|
||||||
result = result.replace(igRegex, prefs.replaceInstagram)
|
|
||||||
|
|
||||||
if absolute.len > 0 and "href" in result:
|
if absolute.len > 0 and "href" in result:
|
||||||
result = result.replace("href=\"/", &"href=\"{absolute}/")
|
result = result.replace("href=\"/", &"href=\"{absolute}/")
|
||||||
|
|
||||||
|
|
|
@ -107,10 +107,6 @@ genPrefs:
|
||||||
"Reddit -> Teddit/Libreddit"
|
"Reddit -> Teddit/Libreddit"
|
||||||
placeholder: "Teddit hostname"
|
placeholder: "Teddit hostname"
|
||||||
|
|
||||||
replaceInstagram(input, ""):
|
|
||||||
"Instagram -> Bibliogram"
|
|
||||||
placeholder: "Bibliogram hostname"
|
|
||||||
|
|
||||||
iterator allPrefs*(): Pref =
|
iterator allPrefs*(): Pref =
|
||||||
for k, v in prefList:
|
for k, v in prefList:
|
||||||
for pref in v:
|
for pref in v:
|
||||||
|
|
Loading…
Reference in a new issue