Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a Safari Extension react on the creation of a new tab?

I am currently writing my first extension for Safari 5. I can't find a reference on what events an extension can react.

I want my extension to react on these events:

  • when a new tab is created.
  • when a new browser window is created.
  • when the URL inside a tab changes.

Is this possible?

like image 213
Norwald Avatar asked Jul 25 '10 13:07

Norwald


1 Answers

Yes. Create an Injected Script and add it as an End Script. Set the Access Level of Extension Website Access in the builder to All. Your Injected End Script will be called for every page that loads in Safari, which covers all of the cases you mentioned.

like image 109
Alan Gutierrez Avatar answered Sep 23 '22 18:09

Alan Gutierrez