diff options
author | teramako | 2008-07-16 22:58:10 +0000 |
---|---|---|
committer | teramako | 2008-07-16 22:58:10 +0000 |
commit | e2d70ed12874cf28f9d62105a80196360e03faad (patch) | |
tree | fdcff03fff7ed7a8585a3a4030b725cb264007bd /gmperator.js | |
parent | fa1e9ed83fb4df98d4903b265da965cbb6aab40b (diff) | |
download | vimperator-plugins-e2d70ed12874cf28f9d62105a80196360e03faad.tar.bz2 |
autocommand登録メソッドの削除とコメント追加
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@15909 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'gmperator.js')
-rw-r--r-- | gmperator.js | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/gmperator.js b/gmperator.js index c39be51..4011621 100644 --- a/gmperator.js +++ b/gmperator.js @@ -4,7 +4,7 @@ * @description Vimperator plugin for Greasemonkey * @author teramako teramako@gmail.com * @namespace http://d.hatena.ne.jp/teramako/ - * @version 0.3a + * @version 0.4a * ==/VimperatorPlugin== * * --------------------------- @@ -40,16 +40,23 @@ * includes to "http://*" and "https://*", * and excludes to "http://example.com/*" * + * --------------------------- + * Autocommand + * --------------------------- + * Available events: + * 'GMInjectedScript' -> when open either foreground or background + * 'GMActiveScript' -> when TabSelect or open foreground + * e.g.) + * autocmd GMActiveScript scriptName\.user\.js$ :echo "scriptName is executing" + * when any URL and scriptName.user.js is executing + * * }}} * --------------------------- * For plugin developer: * --------------------------- * {{{ * - * 1). you can access to the sandbox of Greasemonkey !!! - * 2). you can register commands to execute - * when the user script is executed on the URI - * @see liberator.plugins.gmperator.addAutoCommand + * you can access to the sandbox of Greasemonkey !!! * * liberator.plugins.gmperator => ( * allItem : return object of key : {panalID}, @@ -68,9 +75,6 @@ * includes : {String[]} * encludes : {String[]} * ) - * addAutoCommand : function( uri, script, cmd ) - * If both of uri and script are matched - * * ) * }}} */ @@ -133,14 +137,6 @@ liberator.plugins.gmperator = (function(){ //{{{ } return list.length > 0 ? list : null; }, - addAutoCommand: function(uri, script, cmd){ - var reg = uri+'.*\n'+script+'\.user\.js'; - autocommands.add('GMInjectedScript', reg, cmd); - }, - removeAutoCommand: function(uri, script){ - var reg = uri+'.*\n'+script+'\.user\.js'; - autocommands.remove('GMInjectedScript', reg); - }, }; // }}} // ----------------------- |