diff --git a/content/hints.js b/content/hints.js index 034cf83a..93f2d9f7 100644 --- a/content/hints.js +++ b/content/hints.js @@ -496,15 +496,15 @@ vimperator.Hints = function() //{{{ x = Number(coords[0]); y = Number(coords[1]); } - doc = window.content.document; - view = window.document.defaultView; + var doc = window.content.document; + var view = window.document.defaultView; var evt = doc.createEvent('MouseEvents'); - evt.initMouseEvent('mousedown', true, true, view, 1, x+1, y+1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/ new_tab, 0, null); + evt.initMouseEvent('mousedown', true, true, view, 1, x + 1, y + 1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/ new_tab, 0, null); elem.dispatchEvent(evt); var evt = doc.createEvent('MouseEvents'); - evt.initMouseEvent('click', true, true, view, 1, x+1, y+1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/ new_tab, 0, null); + evt.initMouseEvent('click', true, true, view, 1, x + 1, y + 1, 0, 0, /*ctrl*/ new_tab, /*event.altKey*/0, /*event.shiftKey*/ new_window, /*event.metaKey*/ new_tab, 0, null); elem.dispatchEvent(evt); // for 'pure' open calls without a new tab or window it doesn't diff --git a/content/options.js b/content/options.js index d330fd94..5863bb98 100644 --- a/content/options.js +++ b/content/options.js @@ -135,6 +135,8 @@ vimperator.Options = function() //{{{ function storePreference(name, value, vimperator_branch) { + var branch; + if (vimperator_branch) branch = vimperator_prefs; else diff --git a/content/ui.js b/content/ui.js index c7f4414b..91a851eb 100644 --- a/content/ui.js +++ b/content/ui.js @@ -1164,12 +1164,12 @@ vimperator.StatusLine = function() //{{{ { progress_str = "["; var done = Math.floor(progress * 20); - for (i=0; i < done; i++) + for (var i = 0; i < done; i++) progress_str += "="; progress_str += ">"; - for (i=19; i > done; i--) + for (var i = 19; i > done; i--) progress_str += " "; progress_str += "]"; diff --git a/content/vimperator.js b/content/vimperator.js index fe6093c6..1a4fa6a4 100644 --- a/content/vimperator.js +++ b/content/vimperator.js @@ -328,7 +328,8 @@ const vimperator = (function() //{{{ if (!string) return [null, null, null]; - if (match = string.match(/^([bwtglsv]):(\w+)/)) // Variable + var match = string.match(/^([bwtglsv]):(\w+)/); + if (match) // Variable { // Other variables should be implemented if (match[1] == "g")