mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 10:17:59 +01:00
Change multiline beep guard clauses to single line formatting.
This commit is contained in:
@@ -1681,10 +1681,7 @@ function Marks() //{{{
|
|||||||
function (arg)
|
function (arg)
|
||||||
{
|
{
|
||||||
if (/[^a-zA-Z]/.test(arg))
|
if (/[^a-zA-Z]/.test(arg))
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
marks.add(arg);
|
marks.add(arg);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -546,10 +546,7 @@ function Editor() //{{{
|
|||||||
let text = getEditor().value;
|
let text = getEditor().value;
|
||||||
let pos = getEditor().selectionStart;
|
let pos = getEditor().selectionStart;
|
||||||
if (pos >= text.length)
|
if (pos >= text.length)
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let chr = text[pos];
|
let chr = text[pos];
|
||||||
getEditor().value = text.substring(0, pos) +
|
getEditor().value = text.substring(0, pos) +
|
||||||
(chr == chr.toLocaleLowerCase() ? chr.toLocaleUpperCase() : chr.toLocaleLowerCase()) +
|
(chr == chr.toLocaleLowerCase() ? chr.toLocaleUpperCase() : chr.toLocaleLowerCase()) +
|
||||||
|
|||||||
@@ -913,10 +913,7 @@ function Hints() //{{{
|
|||||||
{
|
{
|
||||||
hintMode = hintModes[minor];
|
hintMode = hintModes[minor];
|
||||||
if (!hintMode)
|
if (!hintMode)
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
commandline.input(hintMode.prompt + ": ", null, { onChange: onInput });
|
commandline.input(hintMode.prompt + ": ", null, { onChange: onInput });
|
||||||
modes.extended = modes.HINTS;
|
modes.extended = modes.HINTS;
|
||||||
|
|
||||||
@@ -1013,8 +1010,7 @@ function Hints() //{{{
|
|||||||
{
|
{
|
||||||
usedTabKey = false;
|
usedTabKey = false;
|
||||||
hintNumber = 0;
|
hintNumber = 0;
|
||||||
liberator.beep();
|
return void liberator.beep();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1053,10 +1049,7 @@ function Hints() //{{{
|
|||||||
showActiveHint(hintNumber, oldHintNumber || 1);
|
showActiveHint(hintNumber, oldHintNumber || 1);
|
||||||
|
|
||||||
if (hintNumber == 0 || hintNumber > validHints.length)
|
if (hintNumber == 0 || hintNumber > validHints.length)
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if we write a numeric part like 3, but we have 45 hints, only follow
|
// if we write a numeric part like 3, but we have 45 hints, only follow
|
||||||
// the hint after a timeout, as the user might have wanted to follow link 34
|
// the hint after a timeout, as the user might have wanted to follow link 34
|
||||||
|
|||||||
@@ -961,10 +961,7 @@ function Tabs() //{{{
|
|||||||
let index = indexFromSpec(spec, wrap);
|
let index = indexFromSpec(spec, wrap);
|
||||||
// FIXME:
|
// FIXME:
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
getBrowser().mTabContainer.selectedIndex = index;
|
getBrowser().mTabContainer.selectedIndex = index;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -915,10 +915,7 @@ function QuickMarks() //{{{
|
|||||||
function (arg)
|
function (arg)
|
||||||
{
|
{
|
||||||
if (/[^a-zA-Z0-9]/.test(arg))
|
if (/[^a-zA-Z0-9]/.test(arg))
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
quickmarks.add(arg, buffer.URL);
|
quickmarks.add(arg, buffer.URL);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -147,10 +147,7 @@ const config = { //{{{
|
|||||||
{
|
{
|
||||||
let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/);
|
let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/);
|
||||||
if (!matches)
|
if (!matches)
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let [, pre, number, post] = matches;
|
let [, pre, number, post] = matches;
|
||||||
let newNumber = parseInt(number, 10) + count;
|
let newNumber = parseInt(number, 10) + count;
|
||||||
@@ -305,10 +302,7 @@ const config = { //{{{
|
|||||||
{
|
{
|
||||||
let uri = content.document.location;
|
let uri = content.document.location;
|
||||||
if (/(about|mailto):/.test(uri.protocol)) // exclude these special protocols for now
|
if (/(about|mailto):/.test(uri.protocol)) // exclude these special protocols for now
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
liberator.open(uri.protocol + "//" + (uri.host || "") + "/");
|
liberator.open(uri.protocol + "//" + (uri.host || "") + "/");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -967,10 +967,7 @@ function QuickMarks() //{{{
|
|||||||
function (arg)
|
function (arg)
|
||||||
{
|
{
|
||||||
if (/[^a-zA-Z0-9]/.test(arg))
|
if (/[^a-zA-Z0-9]/.test(arg))
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
quickmarks.add(arg, buffer.URL);
|
quickmarks.add(arg, buffer.URL);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -201,10 +201,7 @@ const config = { //{{{
|
|||||||
{
|
{
|
||||||
let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/);
|
let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/);
|
||||||
if (!matches)
|
if (!matches)
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let [, pre, number, post] = matches;
|
let [, pre, number, post] = matches;
|
||||||
let newNumber = parseInt(number, 10) + count;
|
let newNumber = parseInt(number, 10) + count;
|
||||||
@@ -407,10 +404,7 @@ const config = { //{{{
|
|||||||
{
|
{
|
||||||
let uri = content.document.location;
|
let uri = content.document.location;
|
||||||
if (/(about|mailto):/.test(uri.protocol)) // exclude these special protocols for now
|
if (/(about|mailto):/.test(uri.protocol)) // exclude these special protocols for now
|
||||||
{
|
return void liberator.beep();
|
||||||
liberator.beep();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
liberator.open(uri.protocol + "//" + (uri.host || "") + "/");
|
liberator.open(uri.protocol + "//" + (uri.host || "") + "/");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user