javascript - Google Chrome userscript vs extension? -


i'm looking @ various options have enhance browsing experience. found ton of userscripts available @ userscripts.org. but, reading on google chrome extensions (which seem similar userscripts).

i'm wondering if there advantages using userscript vs. extension? 1 thing can't seem working using either of these techniques inject scripts dom can have javascript code access pages' javascript methods. works fine single userscript install, when attempted convert userscript extension, did not seem work. though, wasn't sure if did wrong or if can't work @ all.

the main reason ask because after started working on own userscript ran issue script file grew large , repetitive other scripts. chrome doesn't support "@require" option can't organize "common" code way, lead me think should looking @ extensions instead.

so, possible use "script injection" or "location hack" in extension javascript can execute on dom , access other javascript?

to answer first question: userscripts single files can not request access chrome api's, such bookmarks, cross-domain xmlhttprequest etc. chrome extensions multiple zipped-up files not have these limitations.

as second question, suggest read how can mimic greasemonkey/firefox's unsafewindow functionality in chrome?.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -