Rename method preventYoutube to redirectYoutube

This commit is contained in:
Booteille 2018-11-12 20:15:06 +01:00
parent 186f1d4fe2
commit bf87557b84
No known key found for this signature in database
GPG Key ID: 7FC1ED300B74CD91
1 changed files with 4 additions and 4 deletions

View File

@ -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']
);