Changes

Jump to: navigation, search

Labs/Ubiquity/Ubiquity 0.1 Author Tutorial

290 bytes added, 22:10, 10 September 2008
no edit summary
</pre>
= Development Hints = You now know all you need to know to get started developing useful Ubiquity commands of your own. Here are some miscellaneous tips that didn't fit elsewhere on this page, that may make development easier for you. == The Source Code of Built-In Commands ==
Looking at the source code of built-in commands and built-in noun types can be a very useful aid to development. If you have the source checkout of Ubiquity (see [https://wiki.mozilla.org/index.php?title=Labs/Ubiquity/Ubiquity_0.1_Development_Tutorial | the development tutorial] to find out how to get this), the source code can be found in the files:
[http://hg.toolness.com/ubiquity-firefox/file/tip/ubiquity/chrome/content/nlparser/en/nountypes.js nountypes.js]
== Interacting with Other Extensions ==
http://img363.imageshack.us/img363/1906/picture7cm5.png
</pre>
== Defining Synonyms for your Command ==   == Running on page load and startup ==
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 the future, Ubiquity is also likely to have the ability to convert your Ubiquity commands into proper Firefox extensions. Look [http://labs.toolness.com/trac/ticket/3 here] to check on the progress of this functionality.
== Firebug ==
You should enable Chrome Errors and Warnings if you want the errors in your code to appear in the Firebug console. Use CmdUtils.log() rather than console.log() ''Note: For now, you can only pass one argument to log()''
1,007
edits

Navigation menu