This PR implements the feature suggested in #14: a toolbar button that enables/disables redirection on toggle. This adds a new permission request (storage, for persisting this preference) and doesn't redirect immediately in case a user enables redirection while in a youtube domain, as this would require either:
Duplicating the redirection code in background and makehook files
Using a bundler to be able to reuse a redirect function
Import html files instead of js ones for both content script and background, so that they're included as ES modules (<script type="module" src="background.js">) so that they can use import (to be fair, I'm not even sure content scripts can be added through HTML)
Sorry for the late response on this, I kinda forgot about this. Unfortunately this is already being implemented with #19, thanks a lot for your work with this though :)
This PR implements the feature suggested in #14: a toolbar button that enables/disables redirection on toggle. This adds a new permission request (
storage
, for persisting this preference) and doesn't redirect immediately in case a user enables redirection while in a youtube domain, as this would require either:background
andmakehook
filesredirect
functionhtml
files instead ofjs
ones for both content script and background, so that they're included as ES modules (<script type="module" src="background.js">
) so that they can useimport
(to be fair, I'm not even sure content scripts can be added through HTML)Thanks for the good work with this extension :)
Closes #14