Rename method preventYoutube to redirectYoutube
This commit is contained in:
parent
186f1d4fe2
commit
bf87557b84
|
@ -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']
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue