From bf87557b843eae884eb9fd906748ea77a035d6d5 Mon Sep 17 00:00:00 2001 From: Booteille Date: Mon, 12 Nov 2018 20:15:06 +0100 Subject: [PATCH] Rename method preventYoutube to redirectYoutube --- src/background.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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'] );