mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 17:27:57 +01:00
declare some accidentally global vars
This commit is contained in:
@@ -75,15 +75,15 @@ vimperator.Hints = function() //{{{
|
|||||||
x = Number(coords[0]);
|
x = Number(coords[0]);
|
||||||
y = Number(coords[1]);
|
y = Number(coords[1]);
|
||||||
}
|
}
|
||||||
doc = window.content.document;
|
var doc = window.content.document;
|
||||||
view = window.document.defaultView;
|
var view = window.document.defaultView;
|
||||||
|
|
||||||
var evt = doc.createEvent('MouseEvents');
|
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);
|
elem.dispatchEvent(evt);
|
||||||
|
|
||||||
var evt = doc.createEvent('MouseEvents');
|
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);
|
elem.dispatchEvent(evt);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -519,8 +519,8 @@ outer:
|
|||||||
if (!hintsGenerated)
|
if (!hintsGenerated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
doc = docs.pop();
|
var doc = docs.pop();
|
||||||
if(doc);
|
if (doc);
|
||||||
removeHints(doc, 0);
|
removeHints(doc, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -561,13 +561,13 @@ outer:
|
|||||||
case "<BS>":
|
case "<BS>":
|
||||||
if (hintNumber > 0 && !usedTabKey)
|
if (hintNumber > 0 && !usedTabKey)
|
||||||
{
|
{
|
||||||
hintNumber = Math.floor(hintNumber/10);
|
hintNumber = Math.floor(hintNumber / 10);
|
||||||
}
|
}
|
||||||
else if (hintString != "")
|
else if (hintString != "")
|
||||||
{
|
{
|
||||||
usedTabKey = false;
|
usedTabKey = false;
|
||||||
hintNumber = 0;
|
hintNumber = 0;
|
||||||
hintString = hintString.substr(0, hintString.length-1);
|
hintString = hintString.substr(0, hintString.length - 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -135,6 +135,8 @@ vimperator.Options = function() //{{{
|
|||||||
|
|
||||||
function storePreference(name, value, vimperator_branch)
|
function storePreference(name, value, vimperator_branch)
|
||||||
{
|
{
|
||||||
|
var branch;
|
||||||
|
|
||||||
if (vimperator_branch)
|
if (vimperator_branch)
|
||||||
branch = vimperator_prefs;
|
branch = vimperator_prefs;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1154,12 +1154,12 @@ vimperator.StatusLine = function() //{{{
|
|||||||
{
|
{
|
||||||
progress_str = "[";
|
progress_str = "[";
|
||||||
var done = Math.floor(progress * 20);
|
var done = Math.floor(progress * 20);
|
||||||
for (i=0; i < done; i++)
|
for (var i = 0; i < done; i++)
|
||||||
progress_str += "=";
|
progress_str += "=";
|
||||||
|
|
||||||
progress_str += ">";
|
progress_str += ">";
|
||||||
|
|
||||||
for (i=19; i > done; i--)
|
for (var i = 19; i > done; i--)
|
||||||
progress_str += " ";
|
progress_str += " ";
|
||||||
|
|
||||||
progress_str += "]";
|
progress_str += "]";
|
||||||
|
|||||||
@@ -212,7 +212,8 @@ const vimperator = (function() //{{{
|
|||||||
if (!string)
|
if (!string)
|
||||||
return [null, null, null];
|
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
|
// Other variables should be implemented
|
||||||
if (match[1] == "g")
|
if (match[1] == "g")
|
||||||
|
|||||||
Reference in New Issue
Block a user