From f108cdbcbdf35572a52a25eb712ccf8e04b751df Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Sun, 12 Jun 2022 11:55:27 +0300 Subject: [PATCH] Bypassing homepage for quora, medium, imgur #327 --- src/assets/javascripts/imgur.js | 1 + src/assets/javascripts/medium.js | 1 + src/assets/javascripts/quora.js | 1 + 3 files changed, 3 insertions(+) diff --git a/src/assets/javascripts/imgur.js b/src/assets/javascripts/imgur.js index ad62306..e6097a6 100644 --- a/src/assets/javascripts/imgur.js +++ b/src/assets/javascripts/imgur.js @@ -105,6 +105,7 @@ function all() { function redirect(url, type, initiator) { if (disableImgur) return; + if (url.pathname == "/") return; if (!["main_frame", "sub_frame", "xmlhttprequest", "other", "image", "media",].includes(type)) return; if (initiator && (all().includes(initiator.origin) || targets.test(initiator.host))) return; if (!targets.test(url.href)) return; diff --git a/src/assets/javascripts/medium.js b/src/assets/javascripts/medium.js index 570e8ee..59c700c 100644 --- a/src/assets/javascripts/medium.js +++ b/src/assets/javascripts/medium.js @@ -89,6 +89,7 @@ browser.storage.onChanged.addListener(init) function redirect(url, type, initiator) { if (disableMedium) return; + if (url.pathname == "/") return; if (type != "main_frame" && "sub_frame" && "xmlhttprequest" && "other") return; if (initiator && ( [ diff --git a/src/assets/javascripts/quora.js b/src/assets/javascripts/quora.js index bf87628..f83e35e 100644 --- a/src/assets/javascripts/quora.js +++ b/src/assets/javascripts/quora.js @@ -67,6 +67,7 @@ browser.storage.onChanged.addListener(init) function redirect(url, type, initiator) { if (disableQuora) return; + if (url.pathname == "/") return; if (type != "main_frame") return; const all = [ ...quoraRedirects.quetre.normal,