diff --git a/content/modules/command.js b/content/modules/command.js index 5adf878..b806802 100755 --- a/content/modules/command.js +++ b/content/modules/command.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const command = { +var command = { modules: null, /** diff --git a/content/modules/display.js b/content/modules/display.js index 78025eb..a6a310d 100755 --- a/content/modules/display.js +++ b/content/modules/display.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const display = (function () { +var display = (function () { const Cc = Components.classes; const Ci = Components.interfaces; const NOTIFY_ID = "ks-notify-message"; diff --git a/content/modules/ext.js b/content/modules/ext.js index e46b138..46198a5 100755 --- a/content/modules/ext.js +++ b/content/modules/ext.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const ext = function () { +var ext = function () { /** * @private */ diff --git a/content/modules/hook.js b/content/modules/hook.js index 348b6cb..6565c6c 100755 --- a/content/modules/hook.js +++ b/content/modules/hook.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const hook = { +var hook = { // ==== hooks ==== hookList: {}, // all hooks are stored in it diff --git a/content/modules/html.js b/content/modules/html.js index 3f21283..e5706af 100755 --- a/content/modules/html.js +++ b/content/modules/html.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const html = { +var html = { htmlTemplate: '\ \n\ \n\ diff --git a/content/modules/key.js b/content/modules/key.js index 5b3930d..84c4682 100755 --- a/content/modules/key.js +++ b/content/modules/key.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const key = { +var key = { modules: null, // "modules" is automatically added // by KeySnail.initModule in keysnail.js @@ -987,10 +987,11 @@ const key = { keyCode = KeyEvent.DOM_VK_DELETE; break; default: - let (keyName = aKey.replace(/^<|>$/g, "")) { + { + let keyName = aKey.replace(/^<|>$/g, ""); if (keyName in this.keyName2Code) keyCode = this.keyName2Code[keyName]; - }; + } break; } } diff --git a/content/modules/macro.js b/content/modules/macro.js index 6b8c7e5..9fd0575 100755 --- a/content/modules/macro.js +++ b/content/modules/macro.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const macro = { +var macro = { init: function () { this.sleepTime = 10; }, diff --git a/content/modules/plugins.js b/content/modules/plugins.js index 378b4af..14aea24 100644 --- a/content/modules/plugins.js +++ b/content/modules/plugins.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const plugins = { +var plugins = { modules : null, context : {}, options : {}, diff --git a/content/modules/prompt.js b/content/modules/prompt.js index ce1232b..0563727 100755 --- a/content/modules/prompt.js +++ b/content/modules/prompt.js @@ -6,11 +6,11 @@ */ // flags -const HIDDEN = 1; -const IGNORE = 2; -const ICON = 4; +var HIDDEN = 1; +var IGNORE = 2; +var ICON = 4; -const prompt = function () { +var prompt = function () { /** * @private */ @@ -739,11 +739,11 @@ const prompt = function () { } // if additional opts are found - let (tmp = command.split(",")) { - command = tmp[0]; - opts += tmp[1] || ""; - }; + let tmp = command.split(","); + command = tmp[0]; + opts += tmp[1] || ""; + } var next = 0; @@ -2329,8 +2329,8 @@ const prompt = function () { return true; }); - let (query = query.toLowerCase()) { + let query = query.toLowerCase(); // ignore case remains = remains.filter(function (c) { let text = getText(c).toLowerCase(); @@ -2344,7 +2344,7 @@ const prompt = function () { if (text.indexOf(query) !== -1) { matched.push(c); return false; } return true; }); - }; + } // mige! let migexp = new RegExp(window.xulMigemoCore.getRegExp(query), "i"); @@ -2402,13 +2402,14 @@ const prompt = function () { }); // ignore case - let (query = query.toLowerCase()) { + { + let query = query.toLowerCase(); remains = remains.filter(function (c) { let text = getText(c).toLowerCase(); if (text.indexOf(query) === 0) { matched.push(c); return false; } return true; }); - }; + } cc.collection = matched; } @@ -2460,8 +2461,8 @@ const prompt = function () { return true; }); - let (query = query.toLowerCase()) { + let query = query.toLowerCase(); // ignore case remains = remains.filter(function (c) { let text = getText(c).toLowerCase(); @@ -2475,7 +2476,7 @@ const prompt = function () { if (text.indexOf(query) !== -1) { matched.push(c); return false; } return true; }); - }; + } cc.collection = matched; } diff --git a/content/modules/shell.js b/content/modules/shell.js index 13cb982..4fc2f7c 100644 --- a/content/modules/shell.js +++ b/content/modules/shell.js @@ -1,4 +1,4 @@ -const shell = +var shell = (function () { const Cc = Components.classes; const Ci = Components.interfaces; @@ -161,13 +161,13 @@ const shell = optValue = args[i]; break; case option.BOOL: // 1 - let (v = {true : true, false : false}[args[i].toLowerCase()]) { + let v = {true : true, false : false}[args[i].toLowerCase()]; if (typeof v === "undefined") parsed.errorMsg = "Option [" + arg + "] expects boolean but invalid value is given"; else optValue = v; - }; + } break; case option.INT: // 1 if (+args[i] === parseInt(args[i])) @@ -176,13 +176,13 @@ const shell = parsed.errorMsg = "Option [" + arg + "] expects integer but invalid value is given"; break; case option.FLOAT: // 1 - let (v = parseFloat(args[i])) { + let v = parseFloat(args[i]); if (isNaN(v)) optValue = v; else parsed.errorMsg = "Option [" + arg + "] expects float but invalid value given"; - }; + } break; default: parsed.errorMsg = "Invalid type is specified for option " + arg; diff --git a/content/modules/style.js b/content/modules/style.js index 6de6968..144360a 100755 --- a/content/modules/style.js +++ b/content/modules/style.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const style = function () { +var style = function () { /** * @private */ diff --git a/content/modules/userscript.js b/content/modules/userscript.js index dc4cb44..bbaa7df 100755 --- a/content/modules/userscript.js +++ b/content/modules/userscript.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const userscript = { +var userscript = { // ==== user configuration file name ==== // at first .keysnail.js is used. When the file not found, // then the _keysnail.js is used instead. (for the Windows user) diff --git a/content/modules/util.js b/content/modules/util.js index dbf2554..a26b8a6 100755 --- a/content/modules/util.js +++ b/content/modules/util.js @@ -5,7 +5,7 @@ * @license The MIT License */ -const util = function () { +var util = function () { /** * @private */ diff --git a/content/pluginmanager.js b/content/pluginmanager.js index 9c8992f..ca6f23f 100644 --- a/content/pluginmanager.js +++ b/content/pluginmanager.js @@ -267,9 +267,9 @@ let ksPluginManager = (function () { // compatible version let versionMsg = ""; - let (minVersion = pluginInfo.minKeySnailVersion, - maxVersion = pluginInfo.maxKeySnailVersion) { + let minVersion = pluginInfo.minKeySnailVersion, + maxVersion = pluginInfo.maxKeySnailVersion; if (minVersion) versionMsg += util.getLocaleString("compatibleMinVersion", [minVersion]); if (maxVersion) diff --git a/plugins/_xul-growl.ks.js b/plugins/_xul-growl.ks.js index 978d510..c58d154 100755 --- a/plugins/_xul-growl.ks.js +++ b/plugins/_xul-growl.ks.js @@ -107,14 +107,14 @@ var xulGrowl = let panelStyle = 'border:none; width:300px;'; - let (xulRuntime = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime)) { + let xulRuntime = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime); if (xulRuntime.OS !== "Linux") { containerStyle += "-moz-border-radius:5px; margin-top: 10px;"; panelStyle += "background-color:transparent;"; } - }; + } // }} ======================================================================= //