about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xsfeed_html.awk8
1 files changed, 8 insertions, 0 deletions
diff --git a/sfeed_html.awk b/sfeed_html.awk index ad3ce71..132879e 100755 --- a/sfeed_html.awk +++ b/sfeed_html.awk
@@ -65,6 +65,9 @@ BEGIN {
65 if (! REDDIT_ALT_URL) { 65 if (! REDDIT_ALT_URL) {
66 REDDIT_ALT_URL = envor("SFEED_REDDIT_ALT_URL", "https://libreddit.de") 66 REDDIT_ALT_URL = envor("SFEED_REDDIT_ALT_URL", "https://libreddit.de")
67 } 67 }
68 if (! MEDIUM_ALT_URL) {
69 MEDIUM_ALT_URL = envor("SFEED_MEDIUM_ALT_URL", "https://scribe.rip")
70 }
68 # Paywalls 71 # Paywalls
69 PAYWALL_LADDER = "https://archive.ph/newest/" 72 PAYWALL_LADDER = "https://archive.ph/newest/"
70 PAYWALLED[1] = "washingtonpost\\.com" 73 PAYWALLED[1] = "washingtonpost\\.com"
@@ -353,6 +356,9 @@ function silo_class(link)
353 if (link ~ /reddit\.com/) { 356 if (link ~ /reddit\.com/) {
354 return " reddit" 357 return " reddit"
355 } 358 }
359 if (link ~ /meedium\.com/) {
360 return "medium"
361 }
356 return "" 362 return ""
357} 363}
358 364
@@ -367,6 +373,8 @@ function silo_link(link)
367 sub(http "i\\.reddit\\.com", REDDIT_ALT_URL, ret) 373 sub(http "i\\.reddit\\.com", REDDIT_ALT_URL, ret)
368 } else if (ret ~ (http "twitter\\.com")) { 374 } else if (ret ~ (http "twitter\\.com")) {
369 sub(http "twitter\\.com", TWITTER_ALT_URL, ret) 375 sub(http "twitter\\.com", TWITTER_ALT_URL, ret)
376 } else if (ret ~ (http "medium\\.com")) {
377 sub(http "medium\\.com", MEDIUM_ALT_URL, ret)
370 } else { 378 } else {
371 siloed = 0 379 siloed = 0
372 for (site in PAYWALLED) { 380 for (site in PAYWALLED) {