[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 183/483: In expressions without tag name, '*' is added only if necessary (no other qualifiers selected)

David Prévot taffit at moszumanska.debian.org
Thu Jan 22 21:41:39 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 c86c8eb31eb1c48643eef8f79907cb3c1c604d86
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Tue Oct 13 14:14:29 2009 +0200

    In expressions without tag name, '*' is added only if necessary (no other qualifiers selected)
---
 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 2f45fd9..0527cf7 100644
--- a/chrome/content/composer.js
+++ b/chrome/content/composer.js
@@ -192,7 +192,7 @@ function init() {
 function updateExpression() {
   var curNode = nodeData;
   while (curNode) {
-    let expression = (curNode.tagName.checked ? curNode.tagName.value : "*");
+    let expression = (curNode.tagName.checked ? curNode.tagName.value : "");
 
     for (var i = 0; i < curNode.attributes.length; i++) {
       var attr = curNode.attributes[i];
@@ -246,6 +246,9 @@ function updateExpression() {
     if ("lastChild" in curNode && curNode.lastChild.checked)
       expression += ":last-child";
 
+    if (expression == "")
+      expression = "*";
+
     curNode.expression = expression;
 
     if (curNode.prevSibling)

-- 
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