From 4bae5cab2e05b11ee45556c4a7205ad484f15d1d Mon Sep 17 00:00:00 2001 From: Ben Busby <33362396+benbusby@users.noreply.github.com> Date: Tue, 3 Nov 2020 10:41:29 -0500 Subject: [PATCH 1/4] Fix main page visibility for noscript users The body tag of the home page was previously hidden until the page was finished loading to prevent a flash of unstyled content, but this broke functionality for users who disallow javascript. This adds in a new noscript tag to manually enable visibility of the body element, as well as automatically displaying the config section (since its visibility is also typically handled by javascript). --- app/templates/index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/templates/index.html b/app/templates/index.html index 4980316..8d50f76 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -26,7 +26,14 @@ {% if config.dark %} {% endif %} - Whoogle Search + + Whoogle Search
From f898a8e7a7e45fe34109a766352dda0d26590123 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 24 Nov 2020 13:13:30 -0500 Subject: [PATCH 2/4] Hotfix: update ad filter for portugese config --- app/utils/filter_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/utils/filter_utils.py b/app/utils/filter_utils.py index 7f9e9a5..c8f2447 100644 --- a/app/utils/filter_utils.py +++ b/app/utils/filter_utils.py @@ -13,7 +13,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAD0lEQVR42m BLACKLIST = [ 'ad', 'anuncio', 'annuncio', 'annonce', 'Anzeige', '广告', '廣告', 'Reklama', 'Реклама', 'Anunț', '광고', 'annons', 'Annonse', 'Iklan', '広告', 'Augl.', 'Mainos', 'Advertentie', 'إعلان', 'Գովազդ', 'विज्ञापन', 'Reklam', - 'آگهی', 'Reklāma', 'Reklaam', 'Διαφήμιση', 'מודעה', 'Hirdetés' + 'آگهی', 'Reklāma', 'Reklaam', 'Διαφήμιση', 'מודעה', 'Hirdetés', 'Anúncio' ] SITE_ALTS = { @@ -76,4 +76,4 @@ def gen_nojs(sibling): nojs_link['style'] = 'display:block;width:100%;' nojs_link.string = 'NoJS Link: ' + nojs_link['href'] sibling.append(BeautifulSoup('


', 'html.parser')) - sibling.append(nojs_link) \ No newline at end of file + sibling.append(nojs_link) From 2ecde8386090dd36b69e82a264ebd3a96b0ac739 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sat, 28 Nov 2020 12:11:47 -0500 Subject: [PATCH 3/4] Hotfix: update invidious url, remove www from link The invidious instance has been updated to invidious.snopyta.org, since this instance is more reliable and has more users according to instances.invidio.us All site alternative redirects now redirect without the 'www' subdomain, since most of the alternative sites don't have this subdomain set up. --- app/utils/filter_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/utils/filter_utils.py b/app/utils/filter_utils.py index c8f2447..7ff99c6 100644 --- a/app/utils/filter_utils.py +++ b/app/utils/filter_utils.py @@ -18,7 +18,7 @@ BLACKLIST = [ SITE_ALTS = { 'twitter.com': 'nitter.net', - 'youtube.com': 'invidiou.site', + 'youtube.com': 'invidious.snopyta.org', 'instagram.com': 'bibliogram.art/u' } @@ -43,7 +43,7 @@ def get_site_alt(link: str): link = link.replace(site_key, SITE_ALTS[site_key]) break - return link + return link.replace('www.', '') def filter_link_args(query_link): From 8431fc5031b270620dde79600b2af3da24b60ccc Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sat, 28 Nov 2020 21:29:35 -0500 Subject: [PATCH 4/4] Hotfix: Remove mobile subdomain for invidious redirect See #151 --- app/utils/filter_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/filter_utils.py b/app/utils/filter_utils.py index 7ff99c6..ed6804c 100644 --- a/app/utils/filter_utils.py +++ b/app/utils/filter_utils.py @@ -43,7 +43,7 @@ def get_site_alt(link: str): link = link.replace(site_key, SITE_ALTS[site_key]) break - return link.replace('www.', '') + return link.replace('www.', '').replace('//m.', '//') def filter_link_args(query_link):