AdguardTeam / PopupBlocker

Popup blocking userscript
GNU Lesser General Public License v3.0
337 stars 31 forks source link

Extension build #35

Closed ameshkov closed 4 years ago

ameshkov commented 7 years ago

There should be a separate build wrapping userscript into a chromium/webextensions add-on.

Basically, the userscript code should be executed in a context of a web page. Something like this:

content-script.js

var userscriptCode = getUserscriptCode();
var script = document.createElement('script');
script.innerText = userscriptCode;
document.rootElement.appendChild(script);
// Remove it once it has finished its work
document.rootElement.removeChild(script);

GM_ functions should be replaced with your own implementations.

ameshkov commented 6 years ago

Done