Greasemonkey in Chrome is seriously driving me bonkers. It looks like all the "documentation" I can find online pre-2009 tells you to do things one way, and everything since then has been another way.

  1. What are the up-to-the-minute installation instructions for greasemonkey scripts? If something isn't working, how can I debug it? Specifically, I want to install this script (which works fine in FFX). I've clicked the Install button, and it appears Chrome installed it as an extension, but the darn thing just doesn't work.

  2. Possibly related to #1: I'm told that some userscripts are incompatible with Chrome. What specifically makes a script incompatible? If I'm comfortable with js programming, is it something I can fix on my own? I'll move this question to stackoverflow if it's inappropriate here...

  3. If I go to somedomain.com, is there a way I can tell which userscripts are active for that page?

Thanks for all your help.


Chrome has built in Greasemonkey script support. If you have it as a file on your computer, just drag it into the chrome window. It should popup a message prompting you to install the script.

Try replacing the last line with:

function main() {
    document.addEventListener("keypress", keyPressEvent, true);
var script = document.createElement('script');
script.type = 'text/javascript';
script.appendChild(document.createTextNode('('+ main + ')();'));

Greasemonkey runs its scripts inside a sandbox. This should add the event listener outside of the sandbox. Might work better on Chrome.

  • Thanks for your help. This answer got me closer, but I still couldn't get it to work (the keyPressEvent function was inaccessible from the main function..still can't figure out why). I ended up installing the ReaderPlus chrome extension which has a mark-until-current-as-read feature. I'm (barely) resisting the urge to rant here...about that feature's absence from Google Reader in the first place. – misterspaceman Jul 9 '11 at 22:23

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.