mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 06:38:12 +01:00
whitespace fixes
This commit is contained in:
@@ -218,7 +218,7 @@ liberator.Completion = function () //{{{
|
|||||||
// make sure we receive strings, otherwise a man-in-the-middle attack
|
// make sure we receive strings, otherwise a man-in-the-middle attack
|
||||||
// could return objects which toString() method could be called to
|
// could return objects which toString() method could be called to
|
||||||
// execute untrusted code
|
// execute untrusted code
|
||||||
if(typeof(item) != "string")
|
if (typeof item != "string")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
completions.push([(matches ? matches[1] : "") + item, engine.name + " suggestion"]);
|
completions.push([(matches ? matches[1] : "") + item, engine.name + " suggestion"]);
|
||||||
|
|||||||
@@ -433,7 +433,8 @@ liberator.Hints = function () //{{{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// the current word matches same characters as the previous word
|
// the current word matches same characters as the previous word
|
||||||
if (wcIdx > 0) {
|
if (wcIdx > 0)
|
||||||
|
{
|
||||||
var prevCharIdx = charIdx;
|
var prevCharIdx = charIdx;
|
||||||
// now check if it matches additional characters
|
// now check if it matches additional characters
|
||||||
for (; wcIdx < word.length && charIdx < chars.length; wcIdx++, charIdx++)
|
for (; wcIdx < word.length && charIdx < chars.length; wcIdx++, charIdx++)
|
||||||
@@ -458,7 +459,8 @@ liberator.Hints = function () //{{{
|
|||||||
}
|
}
|
||||||
// the current word doesn't match same characters as the previous word, just
|
// the current word doesn't match same characters as the previous word, just
|
||||||
// try to match the next characters
|
// try to match the next characters
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
var prevCharIdx = charIdx;
|
var prevCharIdx = charIdx;
|
||||||
for (var i = 0; i < word.length && charIdx < chars.length; i++, charIdx++)
|
for (var i = 0; i < word.length && charIdx < chars.length; i++, charIdx++)
|
||||||
{
|
{
|
||||||
@@ -466,7 +468,8 @@ liberator.Hints = function () //{{{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prevCharIdx == charIdx) {
|
if (prevCharIdx == charIdx)
|
||||||
|
{
|
||||||
if (! allowWordOverleaping)
|
if (! allowWordOverleaping)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -502,7 +505,8 @@ liberator.Hints = function () //{{{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; strIdx < strings.length; strIdx++) {
|
for (; strIdx < strings.length; strIdx++)
|
||||||
|
{
|
||||||
if (strings[strIdx].length != 0)
|
if (strings[strIdx].length != 0)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user