summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2009-06-02 19:41:22 +1000
committerDoug Kearns <dougkearns@gmail.com>2009-06-04 14:30:46 +1000
commit09d8af904466f157de7e10a0f0b2bde44ddffb69 (patch)
tree090d8e8f6fac7d2ba0ec97e6efba8cfbfbde5687
parente762b6f9d457459da647b3a3eba189cdd8a4465c (diff)
downloadpentadactyl-09d8af904466f157de7e10a0f0b2bde44ddffb69.tar.gz
Change multiline beep guard clauses to single line formatting.
-rw-r--r--common/content/buffer.js5
-rw-r--r--common/content/editor.js5
-rw-r--r--common/content/hints.js13
-rw-r--r--common/content/tabs.js5
-rw-r--r--vimperator/content/bookmarks.js5
-rw-r--r--vimperator/content/config.js10
-rw-r--r--xulmus/content/bookmarks.js5
-rw-r--r--xulmus/content/config.js10
8 files changed, 12 insertions, 46 deletions
diff --git a/common/content/buffer.js b/common/content/buffer.js
index ec8a5cd6..2f84a274 100644
--- a/common/content/buffer.js
+++ b/common/content/buffer.js
@@ -1681,10 +1681,7 @@ function Marks() //{{{
function (arg)
{
if (/[^a-zA-Z]/.test(arg))
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
marks.add(arg);
},
diff --git a/common/content/editor.js b/common/content/editor.js
index a3f0c5e3..1f722d81 100644
--- a/common/content/editor.js
+++ b/common/content/editor.js
@@ -546,10 +546,7 @@ function Editor() //{{{
let text = getEditor().value;
let pos = getEditor().selectionStart;
if (pos >= text.length)
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
let chr = text[pos];
getEditor().value = text.substring(0, pos) +
(chr == chr.toLocaleLowerCase() ? chr.toLocaleUpperCase() : chr.toLocaleLowerCase()) +
diff --git a/common/content/hints.js b/common/content/hints.js
index 23ddda09..33ea8fa7 100644
--- a/common/content/hints.js
+++ b/common/content/hints.js
@@ -913,10 +913,7 @@ function Hints() //{{{
{
hintMode = hintModes[minor];
if (!hintMode)
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
commandline.input(hintMode.prompt + ": ", null, { onChange: onInput });
modes.extended = modes.HINTS;
@@ -1013,8 +1010,7 @@ function Hints() //{{{
{
usedTabKey = false;
hintNumber = 0;
- liberator.beep();
- return;
+ return void liberator.beep();
}
break;
@@ -1053,10 +1049,7 @@ function Hints() //{{{
showActiveHint(hintNumber, oldHintNumber || 1);
if (hintNumber == 0 || hintNumber > validHints.length)
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
// 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
diff --git a/common/content/tabs.js b/common/content/tabs.js
index f7b24c33..6e768ab3 100644
--- a/common/content/tabs.js
+++ b/common/content/tabs.js
@@ -961,10 +961,7 @@ function Tabs() //{{{
let index = indexFromSpec(spec, wrap);
// FIXME:
if (index == -1)
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
getBrowser().mTabContainer.selectedIndex = index;
},
diff --git a/vimperator/content/bookmarks.js b/vimperator/content/bookmarks.js
index b1998d32..02d2b8d1 100644
--- a/vimperator/content/bookmarks.js
+++ b/vimperator/content/bookmarks.js
@@ -915,10 +915,7 @@ function QuickMarks() //{{{
function (arg)
{
if (/[^a-zA-Z0-9]/.test(arg))
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
quickmarks.add(arg, buffer.URL);
},
diff --git a/vimperator/content/config.js b/vimperator/content/config.js
index d8016b51..655abe07 100644
--- a/vimperator/content/config.js
+++ b/vimperator/content/config.js
@@ -147,10 +147,7 @@ const config = { //{{{
{
let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/);
if (!matches)
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
let [, pre, number, post] = matches;
let newNumber = parseInt(number, 10) + count;
@@ -305,10 +302,7 @@ const config = { //{{{
{
let uri = content.document.location;
if (/(about|mailto):/.test(uri.protocol)) // exclude these special protocols for now
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
liberator.open(uri.protocol + "//" + (uri.host || "") + "/");
});
diff --git a/xulmus/content/bookmarks.js b/xulmus/content/bookmarks.js
index 8f3036fd..77e7eec5 100644
--- a/xulmus/content/bookmarks.js
+++ b/xulmus/content/bookmarks.js
@@ -967,10 +967,7 @@ function QuickMarks() //{{{
function (arg)
{
if (/[^a-zA-Z0-9]/.test(arg))
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
quickmarks.add(arg, buffer.URL);
},
diff --git a/xulmus/content/config.js b/xulmus/content/config.js
index 9baad18f..f87dbb42 100644
--- a/xulmus/content/config.js
+++ b/xulmus/content/config.js
@@ -201,10 +201,7 @@ const config = { //{{{
{
let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/);
if (!matches)
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
let [, pre, number, post] = matches;
let newNumber = parseInt(number, 10) + count;
@@ -407,10 +404,7 @@ const config = { //{{{
{
let uri = content.document.location;
if (/(about|mailto):/.test(uri.protocol)) // exclude these special protocols for now
- {
- liberator.beep();
- return;
- }
+ return void liberator.beep();
liberator.open(uri.protocol + "//" + (uri.host || "") + "/");
});