[Pkg-mozext-commits] [requestpolicy] 178/257: [ref] use template strings to avoid "\""

David Prévot taffit at moszumanska.debian.org
Thu Jan 28 03:20:10 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository requestpolicy.

commit ba2390073d88165156ec0cf033e122bf8237f1a1
Author: Martin Kimmerle <dev at 256k.de>
Date:   Tue Dec 1 17:30:48 2015 +0100

    [ref] use template strings to avoid "\""
---
 src/content/lib/utils/domains.jsm | 2 +-
 src/content/settings/common.js    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/content/lib/utils/domains.jsm b/src/content/lib/utils/domains.jsm
index 0c04f78..ed49b48 100644
--- a/src/content/lib/utils/domains.jsm
+++ b/src/content/lib/utils/domains.jsm
@@ -278,7 +278,7 @@ DomainUtil.parseRefresh = function(refreshString) {
   if (url) {
     var first = url[0];
     var last = url[url.length - 1];
-    if (first === last && (first === "'" || first === "\"")) {
+    if (first === last && (first === "'" || first === `"`)) {
       url = url.substring(1, url.length - 1);
     }
   }
diff --git a/src/content/settings/common.js b/src/content/settings/common.js
index fc9000f..89e1411 100644
--- a/src/content/settings/common.js
+++ b/src/content/settings/common.js
@@ -110,7 +110,7 @@ var {common, WinEnv, elManager, $id, $str} = (function() {
       //                  be confused with `*://http:*`. The string `http://*`
       //                  wouldn't be correct for all cases, since there are
       //                  URIs _without_ a host.
-      return "scheme \"" + ruleDataPart.s + "\"";
+      return `scheme "${ruleDataPart.s}"`;
     }
     var str = "";
     if (ruleDataPart.s || ruleDataPart.port) {
@@ -127,7 +127,7 @@ var {common, WinEnv, elManager, $id, $str} = (function() {
 
   common.localize = function(stringNames) {
     stringNames.forEach(function(name) {
-      $("[data-string=\"" + name + "\"]").each(function() {
+      $(`[data-string="${name}"]`).each(function() {
         $(this).text($str(name));
       });
     });

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git



More information about the Pkg-mozext-commits mailing list