How can I run a user script before any inline scripts run on a webpage?

后端 未结 1 751
滥情空心
滥情空心 2021-02-13 22:37

I want to make a greasemonkey type script for firefox that runs before the scripts on the page. Greasemonkey scripts run after scripts on the page, so that won\'t work. The re

相关标签:
1条回答
  • 2021-02-13 22:59

    [edit 2013] Use the page-mod module of the Add-on SDK with contentScriptWhen = start.


    older: Right, only newer Firefox builds (currently 3.7 nighlies, may later be added to 3.6.x) have support for running custom scripts before content-specified scripts. I wrote a prototype Jetpack-SDK module to take advantage of the new notification.

    Is it a <script src> or an inline script? In the former case it can be blocked with a content policy (something adblock-like).

    0 讨论(0)
提交回复
热议问题