diff --git a/src/background.ts b/src/background.ts index 2fc52e0..62fe611 100644 --- a/src/background.ts +++ b/src/background.ts @@ -32,10 +32,10 @@ const getTitle = async (id: string) => { } /** - * Prevent Youtube from loading if the video is found and preferences set on - * automatic redirection. + * Redirect Youtube without loading it if the video is found and preferences lAHhDKzReKBQKj3R + * set on automatic redirection. */ -const preventYoutube = async (r) => { +const redirectYoutube = async (r) => { const prefs = await Preferences.getPreferences(); if (prefs.redirectYoutube == RedirectType.Auto) { @@ -93,7 +93,7 @@ browser.runtime.onMessage.addListener(function(message, sender) { }); browser.webRequest.onBeforeRequest.addListener( - preventYoutube, + redirectYoutube, { urls: ['*://*.youtube.com/watch?v=*'] }, ['blocking'] );