aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cookie.js11
-rw-r--r--exShowElementInfo.js4
-rw-r--r--gmperator.js2
-rw-r--r--walk-input.js8
4 files changed, 13 insertions, 12 deletions
diff --git a/cookie.js b/cookie.js
index 3ec462e..9ff8c0a 100644
--- a/cookie.js
+++ b/cookie.js
@@ -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));