Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: