1

I don't understand how is the tampermonkey programmed since it interprets userscripts (written in javascript), but extensions aren't allowed to eval(=run) any scripts (and therefore the userscripts too). Or is the extension having it's own interpreter of the userscripts?

Novellizator
  • 13,633
  • 9
  • 43
  • 65
  • 4
    You can still inject a ` – Paul S. Feb 19 '14 at 13:30
  • 2
    Use the source Luke. https://github.com/greasemonkey/greasemonkey – BillRobertson42 Feb 19 '14 at 13:40
  • There is a way to do this using the "tabs" permission and `chrome.tabs.executeScript(tabId, { code: yourCodeString });` But it seems Tampermonkey is doing it some other way, because their userscripts' paths are coming from the background "userscript.html" page. I haven't figured out how they are doing this, but the method with `chrome.tabs.executeScript` is working too – teg_brightly May 23 '20 at 16:17

0 Answers0