diff --git a/content/completion.js b/content/completion.js index 948ef738..22a773c5 100644 --- a/content/completion.js +++ b/content/completion.js @@ -312,7 +312,7 @@ liberator.Completion = function () //{{{ "var comp = [];" + "var type = '';" + "var value = '';" + - "var obj = eval('with(liberator){" + objects[o] + "}');" + + "var obj = eval('with (liberator) {" + objects[o] + "}');" + "for (var i in obj) {" + " try { type = typeof(obj[i]); } catch (e) { type = 'unknown type'; };" + " if (type == 'number' || type == 'string' || type == 'boolean') {" + diff --git a/content/hints.js b/content/hints.js index bad35209..1c5dab3f 100644 --- a/content/hints.js +++ b/content/hints.js @@ -31,6 +31,7 @@ liberator.Hints = function () //{{{ //////////////////////////////////////////////////////////////////////////////// ////////////////////// PRIVATE SECTION ///////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ + var modes = liberator.config.browserModes || [liberator.modes.NORMAL]; var submode = ""; // used for extended mode, can be "o", "t", "y", etc. @@ -183,7 +184,7 @@ liberator.Hints = function () //{{{ span = hints[i][2]; imgspan = hints[i][3]; - if (! validHint(text)) + if (!validHint(text)) { span.style.display = "none"; if (imgspan) @@ -471,7 +472,7 @@ liberator.Hints = function () //{{{ if (prevCharIdx == charIdx) { - if (! allowWordOverleaping) + if (!allowWordOverleaping) return false; } else @@ -499,7 +500,7 @@ liberator.Hints = function () //{{{ strIdx++; else if (word.indexOf(str) == 0) strIdx++; - else if (! allowWordOverleaping) + else if (!allowWordOverleaping) return false; if (strIdx == strings.length) diff --git a/content/io.js b/content/io.js index d901210d..74eb4d0f 100644 --- a/content/io.js +++ b/content/io.js @@ -587,7 +587,7 @@ lookup: // handle pure javascript files specially if (/\.js$/.test(filename)) { - eval("with(liberator){" + str + "}"); + eval("with (liberator) {" + str + "}"); } else { @@ -599,7 +599,7 @@ lookup: { if (heredocEnd.test(line)) { - eval("with(liberator){" + heredoc + "}"); + eval("with (liberator) {" + heredoc + "}"); heredoc = ""; heredocEnd = null; } diff --git a/content/liberator.js b/content/liberator.js index 57c29460..d4cda1a9 100644 --- a/content/liberator.js +++ b/content/liberator.js @@ -293,7 +293,7 @@ const liberator = (function () //{{{ { try { - eval("with(liberator) {" + args + "}"); + eval("with (liberator) {" + args + "}"); } catch (e) { @@ -352,7 +352,7 @@ const liberator = (function () //{{{ else { while (i--) - eval("with(liberator) {" + args + "}"); + eval("with (liberator) {" + args + "}"); } if (special) @@ -398,7 +398,7 @@ const liberator = (function () //{{{ if (args && args[0] == ":") liberator.execute(args); else - eval("with(liberator){" + args + "}"); + eval("with (liberator) {" + args + "}"); if (special) return; diff --git a/content/ui.js b/content/ui.js index 9e560f66..fc02bff8 100644 --- a/content/ui.js +++ b/content/ui.js @@ -261,7 +261,7 @@ liberator.CommandLine = function () //{{{ { // TODO: move to liberator.eval()? // with (liberator) means, liberator is the default namespace "inside" eval - arg = eval("with(liberator){" + arg + "}"); + arg = eval("with (liberator) {" + arg + "}"); } catch (e) {