Live data from Hacker News

Google Chrome 4 now natively supports Greasemonkey user scripts

blog.chromium.org

1–10 of 51 posts

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#3
Is the Chromium UserScripts page[1] out of date? Or are these still issues?

  Chromium does not support @require, @resource, 
  unsafeWindow, GM_registerMenuCommand, GM_setValue, or 
  GM_getValue.
A lot of scripts that I come across use `unsafeWindow`, `GM_setValue` and `GM_getValue.` It seems to be updated (since the last time I looked at it), since I believe it used to say that @exclude was not implemented, and now I don't even see a mention of it on the page (though I don't think I've come across a script that used @exclude).

[1]: http://dev.chromium.org/developers/design-documents/user-scr...

[UPDATE] This should shine some light on the topic: http://www.greasespot.net/2009/11/greasemonkey-api-usage.htm...

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#4
The best part about this announcement is that Google Chrome won't be treating user scripts as second-class extensions. Greasemonkey scripts will be treated like real extensions. The ease of creating Greasemonkey scripts plus the visibility of real extensions in the browser takes Google Chrome a huge step closer to Firefox.

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#5
I have a Greasemonkey script in FF (http://defcraft.blogspot.com/2009/02/greasemonkey-search-hel...) that'll google for the current selection in a background tab when ALT-G is pressed. And it uses GM_openInTab API call.

Its equivalent in Chrome seems to be chrome.tabs.create. But when I tried that, I get this error: "chrome.tabs is not supported in content scripts". It seems that these "content scripts" aren't as powerful as extensions (http://code.google.com/chrome/extensions/content_scripts.htm...). Am I missing something here?

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#6
post #2

I really do WANT to use Chrome, but there are so many Firefox extensions I just can't do without. One step closer though.

They'll never have Tree Style Tabs I imagine, so I'm stuck forever with Firefox for that extension.

Not that I mind Firefox, but Chrome gets to do a reboot and start again without carrying legacy support/etc with it.

Early versions of Firefox felt "lighter" than IE to me for that reason.

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#7
post #3

Is the Chromium UserScripts page[1] out of date? Or are these still issues? Chromium does not support @require, @resource, unsafeWindow, GM_registerMenuCommand, GM_setValue, or GM_getValue. A lot of scripts that I come across use `unsafeWindow`, `GM_setValue` and `GM_getValue.` It seems to be updated (since the last time I looked at it), since I believe it used to say that @exclude was not implemented, and now I don'…

None of my personal scripts (which all use @require or unsafeWindow) work on this. I've been meaning to convert them to Chrome extensions anyway, though.

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#8
I always thought Google had a browser for the masses in mind with Chrome. Something that is easy to use, stable and fast: a good alternative for IE.

User scripts are something for power users, who will always prefer Firefox. Won't this create the risk that average users will accept installing all kinds of scripts without much regard for security implications? User scripts are a powerful yet low-threshold tool which could easily lend itself to purposes such as identity theft.

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#9
post #8

I always thought Google had a browser for the masses in mind with Chrome. Something that is easy to use, stable and fast: a good alternative for IE. User scripts are something for power users, who will always prefer Firefox. Won't this create the risk that average users will accept installing all kinds of scripts without much regard for security implications? User scripts are a powerful yet low-threshold tool which c…

I'm a power user, but I use Chrome. I only fire up Firefox when I want to do something on a page that requires a Firefox extension (like HttpFox or MAFF).

[edit] I would almost appreciate a Chrome/Chromium extension that adds a 'open this page in X browser' option so that I can open it in Firefox when I need to without needing to copy over the URL manually.

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#10
post #8

I always thought Google had a browser for the masses in mind with Chrome. Something that is easy to use, stable and fast: a good alternative for IE. User scripts are something for power users, who will always prefer Firefox. Won't this create the risk that average users will accept installing all kinds of scripts without much regard for security implications? User scripts are a powerful yet low-threshold tool which c…

> power users, who will always prefer Firefox

Why do you say that? Chrome has extension support, I'm not sure what unique feature Firefox will have left shortly.

Post reply on HN