Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/utils.js

Issue 29452181: Noissue - Merge current tip to Edge bookmark (Closed)
Patch Set: Created May 30, 2017, 3:49 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/url.js ('k') | lib/whitelisting.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/utils.js
===================================================================
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -1,6 +1,6 @@
/*
* This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-2016 Eyeo GmbH
+ * Copyright (C) 2006-2017 eyeo GmbH
*
* Adblock Plus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -58,8 +58,10 @@
return null;
for (let prefix of prefixes.split(","))
+ {
if (new RegExp("^" + prefix + "\\b").test(this.appLocale))
return prefix;
+ }
return null;
},
@@ -74,7 +76,9 @@
if (!selectedItem)
selectedItem = subscription;
- let prefix = Utils.checkLocalePrefixMatch(subscription.getAttribute("prefixes"));
+ let prefix = Utils.checkLocalePrefixMatch(
+ subscription.getAttribute("prefixes")
+ );
if (prefix)
{
if (!selectedPrefix || selectedPrefix.length < prefix.length)
@@ -105,7 +109,8 @@
getDocLink(linkID)
{
let docLink = require("prefs").Prefs.documentation_link;
- return docLink.replace(/%LINK%/g, linkID).replace(/%LANG%/g, Utils.appLocale);
+ return docLink.replace(/%LINK%/g, linkID)
+ .replace(/%LANG%/g, Utils.appLocale);
},
yield()
« no previous file with comments | « lib/url.js ('k') | lib/whitelisting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld