Skip to content

Commit a8429f4

Browse files
committed
Merge pull request #403 from vimperator/fix-validator-warnings
Fix some validator warnings
2 parents c0ce5ca + 86ee4f2 commit a8429f4

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

common/content/buffer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,6 @@ const Buffer = Module("buffer", {
671671
* @param {Node} elem The context element.
672672
*/
673673
openContextMenu: function (elem) {
674-
document.popupNode = elem;
675674
let menu = document.getElementById("contentAreaContextMenu");
676675
menu.showPopup(elem, -1, -1, "context", "bottomleft", "topleft");
677676
},

common/content/commandline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1762,7 +1762,7 @@ const ItemList = Class("ItemList", {
17621762
this._divNodes.completions.appendChild(context.cache.nodes.root);
17631763
}, this);
17641764

1765-
setTimeout(this.closure._autoSize, 0);
1765+
this.setTimeout(this.closure._autoSize, 0);
17661766
},
17671767

17681768
/**

common/content/commands.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ const Commands = Module("commands", {
892892
if ((res = str.match(/^()((?:[^\\\s"']|\\.)+)((?:\\$)?)/)))
893893
arg += res[2].replace(/\\(.)/g, "$1");
894894
else if ((res = str.match(/^(")((?:[^\\"]|\\.)*)("?)/)))
895-
arg += eval(res[0] + (res[3] ? "" : '"'));
895+
arg += JSON.parse(res[0] + (res[3] ? "" : '"'));
896896
else if ((res = str.match(/^(')((?:[^\\']|\\.)*)('?)/)))
897897
arg += res[2].replace(/\\(.)/g, function (n0, n1) /[\\']/.test(n1) ? n1 : n0);
898898
break;
@@ -901,7 +901,7 @@ const Commands = Module("commands", {
901901
if ((res = str.match(/^()((?:[^\\\s"']|\\.)+)((?:\\$)?)/)))
902902
arg += res[2].replace(/\\(.)/g, "$1");
903903
else if ((res = str.match(/^(")((?:[^\\"]|\\.)*)("?)/)))
904-
arg += eval(res[0] + (res[3] ? "" : '"'));
904+
arg += JSON.parse(res[0] + (res[3] ? "" : '"'));
905905
else if ((res = str.match(/^(')((?:[^']|'')*)('?)/)))
906906
arg += res[2].replace("''", "'", "g");
907907
break;
@@ -912,7 +912,7 @@ const Commands = Module("commands", {
912912
else if ((res = str.match(/^(""")((?:.?.?[^"])*)((?:""")?)/)))
913913
arg += res[2];
914914
else if ((res = str.match(/^(")((?:[^\\"]|\\.)*)("?)/)))
915-
arg += eval(res[0] + (res[3] ? "" : '"'));
915+
arg += JSON.parse(res[0] + (res[3] ? "" : '"'));
916916
else if ((res = str.match(/^(')((?:[^\\']|\\.)*)('?)/)))
917917
arg += res[2].replace(/\\(.)/g, function (n0, n1) /[\\']/.test(n1) ? n1 : n0);
918918
break;

0 commit comments

Comments
 (0)