开发者

Attach a javascript document to an open webpage using Chrome?

开发者 https://www.devze.com 2023-02-20 06:04 出处:网络
I\'m getting a lot of requests lately to develop javascript \"plug-ins\" to online websites, without actually getting FTP access to said website. That wouldn\'t be much of a problem if I could tell ch

I'm getting a lot of requests lately to develop javascript "plug-ins" to online websites, without actually getting FTP access to said website. That wouldn't be much of a problem if I could tell chrome that "When I open this webpage, also load 开发者_如何学JAVAthis javascript document as if it was included in the header"

Can this be done?


Check out this:
http://www.mychromeaddons.com/chrome-addon-greasemetal-greasemonkey-for-chrome/

UPDATE: In recent versions of Chrome, there is no need to install GreaseMetal for using userscripts. Check out these links for more info:
http://mashable.com/2010/02/01/google-chrome-greasemonkey-2/ http://lifehacker.com/#!5461675/chrome-4-supports-greasemonkey-userscripts-without-an-extension


What you're looking for is a Chrome Extension, which is basically a bit of JS that you can tell Chrome to run in addition to the page's regular content.

You can configure your Chrome extension to run only on certain pages, or on all pages, and you can have your extension do lots of things, including interacting with the browser itself, not just the page.

0

精彩评论

暂无评论...
验证码 换一张
取 消