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

Jump to navigation Jump to search
Line 727: Line 727:
<pre>
<pre>
CmdUtils.CreateCommand({
CmdUtils.CreateCommand({
   name: "tab",
   names: ["tab"],
   takes: {"tab name": noun_type_tab},
   arguments: {object: noun_type_tab},


   execute: function( directObj ) {
   execute: function( arguments ) {
     var tabName = directObj.text;
     var tabName = arguments.object.text;
     var tabs = noun_type_tab.getTabs();
     var tabs = noun_type_tab.getTabs();
     tabs[tabName]._window.focus();
     tabs[tabName]._window.focus();
Line 737: Line 737:
   },
   },


   preview: function( pblock, directObj ) {
   preview: function( pblock, arguments ) {
     var tabName = directObj.text;
     var tabName = arguments.object.text;
     if( tabName.length > 1 ){
     if( tabName.length > 1 ){
         var msg = "Changes to <b style=\"color:yellow\">%s</b> tab.";
         var msg = "Changes to <b style=\"color:yellow\">%s</b> tab.";
1,007

edits

Navigation menu