[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 428/483: Topic 9548 - Don't suggest an empty domain name in case of a host name with a trailing dot

David Prévot taffit at moszumanska.debian.org
Thu Jan 22 21:42:03 UTC 2015


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

taffit pushed a commit to branch master
in repository adblock-plus-element-hiding-helper.

commit 0d53c92fb8f14a342f1197fb486d596436eb0c68
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Sat Jun 23 15:15:03 2012 +0200

    Topic 9548 - Don't suggest an empty domain name in case of a host name with a trailing dot
---
 chrome/content/composer.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/chrome/content/composer.js b/chrome/content/composer.js
index a926b99..e3dad25 100644
--- a/chrome/content/composer.js
+++ b/chrome/content/composer.js
@@ -391,9 +391,12 @@ function fillDomains(domainData) {
 
   var parts = domainData.value.split(".");
   if (parts[0] == "")
-    parts.splice(0, 1);
+    parts.shift();
 
   for (var i = 1; i <= parts.length; i++) {
+    if (parts[parts.length - i] == "")
+      continue;
+
     var curDomain = parts.slice(parts.length - i).join(".");
 
     node = document.createElement("radio");

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus-element-hiding-helper.git



More information about the Pkg-mozext-commits mailing list