Labs/Ubiquity/Ubiquity Source Tip Author Tutorial: Difference between revisions

Jump to navigation Jump to search
Line 866: Line 866:


== Running on page load and startup ==
== Running on page load and startup ==
Commands aren't the only thing you can put in a command feed.  You can also include functions you want to be run automatically at page-load time and at Firefox startup time.


In order to run some code on page load, you simply have to prefix your function with <code>pageLoad_</code>. For example, if you want to say "Hi" every time a page is loaded, your code would look like this:
In order to run some code on page load, you simply have to prefix your function with <code>pageLoad_</code>. For example, if you want to say "Hi" every time a page is loaded, your code would look like this:
1,007

edits

Navigation menu