1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 15:37:59 +01:00

declare some accidentally global vars

This commit is contained in:
Doug Kearns
2007-11-03 08:51:07 +00:00
parent b17aec84a2
commit 34da6b0f0e
4 changed files with 14 additions and 11 deletions

View File

@@ -75,15 +75,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);
return true;
@@ -519,8 +519,8 @@ outer:
if (!hintsGenerated)
return;
doc = docs.pop();
if(doc);
var doc = docs.pop();
if (doc);
removeHints(doc, 0);
};
@@ -561,13 +561,13 @@ outer:
case "<BS>":
if (hintNumber > 0 && !usedTabKey)
{
hintNumber = Math.floor(hintNumber/10);
hintNumber = Math.floor(hintNumber / 10);
}
else if (hintString != "")
{
usedTabKey = false;
hintNumber = 0;
hintString = hintString.substr(0, hintString.length-1);
hintString = hintString.substr(0, hintString.length - 1);
}
else
{

View File

@@ -135,6 +135,8 @@ vimperator.Options = function() //{{{
function storePreference(name, value, vimperator_branch)
{
var branch;
if (vimperator_branch)
branch = vimperator_prefs;
else

View File

@@ -1154,12 +1154,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 += "]";

View File

@@ -212,7 +212,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")