-1

How to crate a plugin which will change background color of specific page say facebook.com on load of page?

I checked samples provided by Google but not able to figure out how to execute script automatically as soon as a user open specific page ( e.g. facebook.com ) in new window or tab.

Raptor
  • 53,206
  • 45
  • 230
  • 366
Arvind
  • 1,207
  • 6
  • 27
  • 55
  • What have you tried on coding ? Sounds like you want to make something like userscripts. – Raptor Oct 10 '13 at 06:07
  • See: http://www.1stwebdesigner.com/design/user-scripts-guide/ http://blog.sarathonline.com/2011/06/writing-your-first-userscript-template.html http://stackoverflow.com/questions/5258989/manually-adding-a-userscript-to-google-chrome – Ming-Tang Oct 10 '13 at 06:15

1 Answers1

2

In your manifest add:

"content_scripts":[{
    "matches": ["http://www.pageYouWantToModify.com/"],
    "css": ["css.css"],
    "js": ["javasript.js"]
}],

The css.css and javascript.js file will run when you open "http://www.pageYouWantToModify.com/"

Marko
  • 441
  • 1
  • 15
  • 24