Changeset 15909 for lang/javascript/vimperator-plugins/trunk
- Timestamp:
- 07/17/08 07:58:10 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/gmperator.js
r14671 r15909 5 5 * @author teramako teramako@gmail.com 6 6 * @namespace http://d.hatena.ne.jp/teramako/ 7 * @version 0. 3a7 * @version 0.4a 8 8 * ==/VimperatorPlugin== 9 9 * … … 41 41 * and excludes to "http://example.com/*" 42 42 * 43 * --------------------------- 44 * Autocommand 45 * --------------------------- 46 * Available events: 47 * 'GMInjectedScript' -> when open either foreground or background 48 * 'GMActiveScript' -> when TabSelect or open foreground 49 * e.g.) 50 * autocmd GMActiveScript scriptName\.user\.js$ :echo "scriptName is executing" 51 * when any URL and scriptName.user.js is executing 52 * 43 53 * }}} 44 54 * --------------------------- … … 47 57 * {{{ 48 58 * 49 * 1). you can access to the sandbox of Greasemonkey !!! 50 * 2). you can register commands to execute 51 * when the user script is executed on the URI 52 * @see liberator.plugins.gmperator.addAutoCommand 59 * you can access to the sandbox of Greasemonkey !!! 53 60 * 54 61 * liberator.plugins.gmperator => ( … … 69 76 * encludes : {String[]} 70 77 * ) 71 * addAutoCommand : function( uri, script, cmd )72 * If both of uri and script are matched73 *74 78 * ) 75 79 * }}} … … 133 137 } 134 138 return list.length > 0 ? list : null; 135 },136 addAutoCommand: function(uri, script, cmd){137 var reg = uri+'.*\n'+script+'\.user\.js';138 autocommands.add('GMInjectedScript', reg, cmd);139 },140 removeAutoCommand: function(uri, script){141 var reg = uri+'.*\n'+script+'\.user\.js';142 autocommands.remove('GMInjectedScript', reg);143 139 }, 144 140 };
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)