7

I've written a small Greasemonkey userscript to modify some <a href... GET parameters in an RSS feed to make it more convenient to use. It works fine when I load the RSS page directly in Firefox with the script enabled.

However, when using a Firefox addon RSS aggregator like Brief or Newsfox, the userscript is not applied. It shows No installed scripts run on this page in the GM context menu despite the script being set with an included pages value of * and activating on all normal web pages. I also tried explicitly specifying the addon URL in case * doesn't actually handle potentially unexpected URL schemes like chrome://, but it remained inactive.

My suspicion is that Greasemonkey is disabled for chrome:// URLs, perhaps for security reasons due to them having much more relaxed security than a typical web page. Or perhaps some kind of sandboxing is taking place. Is there any way I can accomplish what I want without having to resort to a web proxy with content adaptation?

4

This is not possible, by design.

Sadly, Greasemonkey deliberately restricts itself to http:, https:, ftp:, and data: schemes by default.

You can also run on file: or unmht: schemes, or about:blank, if you explicitly set some magic options.

The developers have stubbornly refused to yield on this point, but you can easily fork the Greasemonkey code and remove the chrome: restriction if you wish.

In the source code, you would edit the file isGreasemonkeyable.js to add a line:

case "chrome":

just after the case "data": line. (Then rebuild and install your modified extension).

2
  • That was an exceptional answer! Thank you, in particular, for providing sources and even providing workarounds. – Gregyski Apr 9 '12 at 17:49
  • You're welcome; glad to help. – Brock Adams Apr 9 '12 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.