Live data from Hacker News

Google Chrome 4 now natively supports Greasemonkey user scripts

blog.chromium.org

11–20 of 51 posts

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#11
post #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 p…

I realize that this doesn't exactly address the root cause of your issue, but if you right click on selected text in Chrome, one of the menu entries will be to google for it in another tab.

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#13
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.

Chrome extensions are OK, but they're severely limited compared to what you can pull off with FF extensions: http://conkeror.org used to be implemented using only the FF extension mechanism. Chromium extensions cannot alter built-in UI elements, so you're stuck with the standard WIMP UI. It's the only thing keeping me on the Gecko platform.

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#14

I've been a big firefox fan since phoenix, but already moved to chrome for only one reason: Fastest...browser...evar

Likewise, on both points. It hasn't got the polish of Firefox, and the extension ecosystem is a little rough, and I miss the intelligent URL completion from the Awesomebar, but Chrome wins in speed and stability, and those were enough to move me away from Firefox for all but a few sites.

Speed is important.

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#15
post #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.

Remember when Firefox was the lightweight web browser? Of course it was called Phoenix back then, and later Firebird. It was refreshing.

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#17

Earlier quoted context omitted.

> 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.

Chrome extensions are OK, but they're severely limited compared to what you can pull off with FF extensions: http://conkeror.org used to be implemented using only the FF extension mechanism. Chromium extensions cannot alter built-in UI elements, so you're stuck with the standard WIMP UI. It's the only thing keeping me on the Gecko platform.

Out of curiosity, would this prevent a chrome equivalent of the SQLite manager?

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#19
post #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 p…

Yes. Chrome has different ways of extending the browser.

One is content scripts - which don't have access to certain parts of the Chrome api like opening tabs.

However, each extension can have what they call a background page. This is just an html page which is loaded in the background and there can be exactly one for every extension.

So you should be able to have your content script communicate with the background page (there is a mechanism for this) and let the background page open the tab.

For this, you'll have to write a fully-fledged extension though. The greasemonkey scripts probably don't generate a background page when they get converted into an extension at install-time.

Re: Google Chrome 4 now natively supports Greasemonkey user scripts

#20

I've been a big firefox fan since phoenix, but already moved to chrome for only one reason: Fastest...browser...evar

Likewise, on both points. It hasn't got the polish of Firefox, and the extension ecosystem is a little rough, and I miss the intelligent URL completion from the Awesomebar, but Chrome wins in speed and stability, and those were enough to move me away from Firefox for all but a few sites. Speed is important.

Hasn't got what polish of Firefox? Firefox is buggy and has a kludgy UI. Chrome is way more polished.
Post reply on HN