aboutsummaryrefslogtreecommitdiffstats
path: root/src/assets
diff options
context:
space:
mode:
Diffstat (limited to 'src/assets')
-rw-r--r--src/assets/javascripts/helpers/youtube/youtube.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/assets/javascripts/helpers/youtube/youtube.js b/src/assets/javascripts/helpers/youtube/youtube.js
index 9e88eb31..a4b6d38e 100644
--- a/src/assets/javascripts/helpers/youtube/youtube.js
+++ b/src/assets/javascripts/helpers/youtube/youtube.js
@@ -295,28 +295,6 @@ function setBypassWatchOnYoutube(val) {
console.log("bypassWatchOnYoutube: ", bypassWatchOnYoutube)
}
-let exceptions = {
- "url": [],
- "regex": [],
-};
-const getExceptions = () => exceptions;
-function setExceptions(val) {
- exceptions = val;
- browser.storage.local.set({ youtubeEmbedExceptions: val })
- console.log("youtubeEmbedExceptions: ", val)
-}
-
-function isException(url) {
- for (const item of exceptions.url) {
- let protocolHost = commonHelper.protocolHost(url);
- console.log(item, protocolHost)
- if (item == protocolHost) return true;
- }
- for (const item of exceptions.regex)
- if (new RegExp(item).test(url.href)) return true;
- return false;
-}
-
let alwaysUsePreferred;
function redirect(url, details, initiator) {
if (disable) return null;
@@ -360,14 +338,6 @@ function redirect(url, details, initiator) {
if (!targets.some(rx => rx.test(url.href))) return null;
if (
- details.type != "main_frame" &&
- details.frameAncestors && details.frameAncestors.length > 0 &&
- isException(new URL(details.frameAncestors[0].url))
- ) {
- console.log(`Canceled ${url.href}`, details.frameAncestors[0].url)
- return null;
- }
- if (
bypassWatchOnYoutube &&
initiator && (
[...redirects.invidious.normal,
@@ -664,7 +634,6 @@ async function init() {
"youtubeProtocol",
- "youtubeEmbedExceptions",
"bypassWatchOnYoutube"
],
r => { // r = result
@@ -703,8 +672,6 @@ async function init() {
bypassWatchOnYoutube = r.bypassWatchOnYoutube ?? true;
- if (r.youtubeEmbedExceptions) exceptions = r.youtubeEmbedExceptions;
-
initInvidiousCookies();
resolve();
@@ -882,9 +849,5 @@ export default {
setPipedMaterialRedirects,
- getExceptions,
- setExceptions,
- isException,
-
init,
}; \ No newline at end of file