Changeset 26588

Show
Ignore:
Timestamp:
12/12/08 22:43:12 (4 years ago)
Author:
hogelog
Message:
  • fix :gmcommand
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/gmperator.js

    r25306 r26588  
    352352    function(args,special){ 
    353353        var commander = GM_BrowserUI.getCommander(content); 
     354        var commandName = args[0]; 
    354355        for (let i=0,l=commander.menuItems.length; i<l; i++){ 
    355356            let menuItem = commander.menuItems[i]; 
    356             if (menuItem.getAttribute('label') == args.string){ 
     357            if (menuItem.getAttribute('label') == commandName){ 
    357358                menuItem._commandFunc(); 
    358359                return; 
    359360            } 
    360361        } 
    361         liberator.echoerr(args.string + ' is not defined userscript command.'); 
     362        liberator.echoerr(commandName + ' is not defined userscript command.'); 
    362363    }, 
    363364    { 
     
    370371                return this.test(item[0]); 
    371372            },exp); 
    372         } 
     373        }, 
     374        argCount: "1" 
    373375    } 
    374376); //}}}