summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2008-12-21 22:01:13 +1100
committerDoug Kearns <dougkearns@gmail.com>2008-12-21 22:07:16 +1100
commitfbb1f33faba482cff7976ddb80fb3f8f1cdaa161 (patch)
tree9bcf809952b6504797996fa6a2975042c14de922
parent9ac029441f7179d0bd260a6bf08c067584ede121 (diff)
downloadpentadactyl-fbb1f33faba482cff7976ddb80fb3f8f1cdaa161.tar.gz
Use the RegExp global function rather than calling the constructor.
-rw-r--r--common/content/commands.js2
-rw-r--r--common/content/events.js4
-rw-r--r--common/content/util.js2
-rw-r--r--vimperator/content/bookmarks.js2
4 files changed, 5 insertions, 5 deletions
diff --git a/common/content/commands.js b/common/content/commands.js
index 6e7bd58e..d2682d54 100644
--- a/common/content/commands.js
+++ b/common/content/commands.js
@@ -176,7 +176,7 @@ Command.prototype = {
let matches = args.match(/(.*)<<\s*(\S+)$/);
if (matches && matches[2])
{
- commandline.inputMultiline(new RegExp("^" + matches[2] + "$", "m"),
+ commandline.inputMultiline(RegExp("^" + matches[2] + "$", "m"),
function (args) { exec(matches[1] + "\n" + args); });
return;
}
diff --git a/common/content/events.js b/common/content/events.js
index ef0d429c..7c7d486d 100644
--- a/common/content/events.js
+++ b/common/content/events.js
@@ -817,13 +817,13 @@ function Events() //{{{
if (!filter)
return macros;
- let re = new RegExp(filter);
+ let re = RegExp(filter);
return ([macro, keys] for ([macro, keys] in macros) if (re.test(macro)));
},
deleteMacros: function (filter)
{
- let re = new RegExp(filter);
+ let re = RegExp(filter);
for (let [item,] in macros)
{
diff --git a/common/content/util.js b/common/content/util.js
index 475ff3c1..41b9d3f3 100644
--- a/common/content/util.js
+++ b/common/content/util.js
@@ -475,7 +475,7 @@ const util = { //{{{
// and returns an array ['www.google.com/search?q=bla', 'www.osnews.com']
stringToURLArray: function stringToURLArray(str)
{
- let urls = str.split(new RegExp("\s*" + options["urlseparator"] + "\s*"));
+ let urls = str.split(RegExp("\s*" + options["urlseparator"] + "\s*"));
return urls.map(function (url) {
try
diff --git a/vimperator/content/bookmarks.js b/vimperator/content/bookmarks.js
index 2335eebc..277b5ccd 100644
--- a/vimperator/content/bookmarks.js
+++ b/vimperator/content/bookmarks.js
@@ -1003,7 +1003,7 @@ function QuickMarks() //{{{
remove: function remove(filter)
{
- var pattern = new RegExp("[" + filter.replace(/\s+/g, "") + "]");
+ var pattern = RegExp("[" + filter.replace(/\s+/g, "") + "]");
for (let [qmark,] in qmarks)
{