Changes

Jump to: navigation, search

Labs/Ubiquity/Ubiquity 0.5 Author Tutorial

3 bytes removed, 12:35, 8 August 2009
m
Corrected toLocalDateObject misspelling and Date Object Link
The new function here is <code>setSelection()</code>. This inserts the passed-in text onto the page at the location of the cursor. If the cursor is in an editable text or rich-text fields, the text gets dumped there. If the cursor isn't in an editable area, <code>setSelection()</code> will still be able to insert the date. (Even when it isn't displayed, Firefox always keeps track of a cursor position. To see it, type F7.) Try going to a page, selecting some non-mutable text, and using the command. See, it works! This is particularly useful for commands like "translate", where you want to replace non-editable text with its translation.
The <code>toLocalDateStringtoLocaleDateString()</code> function is native to Javascript, so if you're not familiar with it check out the documentation for the Javascript [httphttps://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:/Global_Objects:/Date Date object].
== A Better Preview ==
5
edits

Navigation menu