diff options
author | drry | 2008-11-09 18:37:29 +0000 |
---|---|---|
committer | drry | 2008-11-09 18:37:29 +0000 |
commit | cd5d6210c14f77d5a538628f9ba8979c50ded99e (patch) | |
tree | 8ad718197151d2efa203e665ada1adf9f901a51e | |
parent | de59bc304b6ad1db848a7b6844cb0a0fa5bca9ea (diff) | |
download | vimperator-plugins-cd5d6210c14f77d5a538628f9ba8979c50ded99e.tar.bz2 |
* cosmetic changes.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@23077 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | cookie.js | 11 | ||||
-rw-r--r-- | exShowElementInfo.js | 4 | ||||
-rw-r--r-- | gmperator.js | 2 | ||||
-rw-r--r-- | walk-input.js | 8 |
4 files changed, 13 insertions, 12 deletions
@@ -1,4 +1,4 @@ -/* +/** * ==VimperatorPlugin== * @name cookie.js * @description display cookie in ':pageinfo'. @@ -68,7 +68,7 @@ CookieManager.prototype = { }, _deserializeCookie: function (cookieString) { - let cookies = cookieString.split('; '); + let cookies = cookieString.split(/; */); let cookie = {}; let key, val; for (let i=0, max=cookies.length ; i<max ; ++i) { @@ -92,7 +92,7 @@ CookieManager.prototype = { obj.key + '=' + obj.value, 'domain=' + obj.domain, 'expires=' + new Date(new Date().getTime() + obj.expires), - ].join(';'); + ].join('; '); this._setCookieString(string); }, }; @@ -101,7 +101,8 @@ liberator.modules.buffer.addPageInfoSection( 'c', 'Cookie', function (verbose) { - if (verbose) { + if(verbose) { + let p; let c = new CookieManager(liberator.modules.buffer.URL); for ([, p] in Iterator(c.properties())) { yield [p, c.getCookie(p)]; @@ -110,6 +111,6 @@ liberator.modules.buffer.addPageInfoSection( } ); -})() +})(); // vim: set sw=4 ts=4 et; diff --git a/exShowElementInfo.js b/exShowElementInfo.js index 66db75b..eeeb631 100644 --- a/exShowElementInfo.js +++ b/exShowElementInfo.js @@ -1,4 +1,4 @@ -/* +/** * ==VimperatorPlugin== * @name exShowElementInfo.js * @description extend feature that show element's information when extended-hints mode ";?" @@ -40,6 +40,6 @@ function addFeatureToMethodAfter(object, method, feature) { return tmp; }; } -})() +})(); // vim: set sw=4 ts=4 et; diff --git a/gmperator.js b/gmperator.js index e26c447..5606922 100644 --- a/gmperator.js +++ b/gmperator.js @@ -198,7 +198,7 @@ liberator.plugins.gmperator = (function(){ //{{{ } getBrowser().mTabContainer.addEventListener('TabClose',updateGmContainerList,false); getBrowser().mTabBox.addEventListener('TabSelect',dispatchGMTabSelect,false); - + config.autocommands.push(["GMInjectedScript","Triggered when UserScript is injected"]); config.autocommands.push(["GMActiveScript","Triggered when location is changed and injected UserScripts are exist"]); config.dialogs.push(["userscriptmanager", "Greasemonkey Manager", function(){GM_openUserScriptManager();}]); diff --git a/walk-input.js b/walk-input.js index eb0b8ea..ee7695a 100644 --- a/walk-input.js +++ b/walk-input.js @@ -31,7 +31,7 @@ var walkinput = function(forward) { var current = null; var next = null; var prev = null; - for (let i = 0; i < list.snapshotLength; ++i) { + for (let i = 0, l = list.snapshotLength; i < l; ++i) { let e = list.snapshotItem(i); if (e == focused) { current = e; @@ -43,13 +43,13 @@ var walkinput = function(forward) { } if (forward) { - (next || list.snapshotItem(0)).focus(); + (next || list.snapshotItem(0)).focus(); } else { - (prev || list.snapshotItem(list.snapshotLength - 1)).focus(); + (prev || list.snapshotItem(list.snapshotLength - 1)).focus(); } }; -mappings.add([modes.NORMAL, modes.INSERT], ['<M-i>', '<A-i>'], +mappings.add([modes.NORMAL, modes.INSERT], ['<M-i>', '<A-i>'], 'Walk Input Fields (Forward)', function () walkinput(true)); mappings.add([modes.NORMAL, modes.INSERT], ['<M-I>', '<A-I>'], 'Walk Input Fields (Backward)', function () walkinput(false)); |