summaryrefslogtreecommitdiff
path: root/common/patterns.js
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2021-12-22 16:39:34 +0100
committerWojtek Kosior <koszko@koszko.org>2021-12-22 16:39:34 +0100
commitb590eaa2f64ead3384eadc6fe58f6358aa1a0478 (patch)
tree8f1e9403c1a75246c2a9a0afc4ab30706ea7afbe /common/patterns.js
parentb7378a9994724750198e0d165c575be8538334fb (diff)
downloadbrowser-extension-b590eaa2f64ead3384eadc6fe58f6358aa1a0478.tar.gz
browser-extension-b590eaa2f64ead3384eadc6fe58f6358aa1a0478.zip
reworked build system; added missing license notices
Diffstat (limited to 'common/patterns.js')
-rw-r--r--common/patterns.js13
1 files changed, 4 insertions, 9 deletions
diff --git a/common/patterns.js b/common/patterns.js
index 7d28dfe..0b1c3ad 100644
--- a/common/patterns.js
+++ b/common/patterns.js
@@ -72,9 +72,9 @@ function match_or_throw(regex, string, error_msg)
function deconstruct_url(url, use_limits=true)
{
- const max = MAX;
+ const max = Object.assign({}, MAX);
if (!use_limits) {
- for (key in MAX)
+ for (const key in MAX)
max[key] = Infinity;
}
@@ -129,6 +129,7 @@ function deconstruct_url(url, use_limits=true)
return deco;
}
+#EXPORT deconstruct_url
function* each_domain_pattern(deco)
{
@@ -183,10 +184,4 @@ function* each_url_pattern(url)
yield `${deco.proto}://${domain}${path}`;
}
}
-
-/*
- * EXPORTS_START
- * EXPORT each_url_pattern
- * EXPORT deconstruct_url
- * EXPORTS_END
- */
+#EXPORT each_url_pattern