~midori/midori/trunk

« back to all changes in this revision

Viewing changes to extensions/adblock/subscriptions.vala

  • Committer: Paweł Forysiuk
  • Date: 2014-03-20 20:09:34 UTC
  • mto: This revision was merged to the branch mainline in revision 6615.
  • Revision ID: tuxator@o2.pl-20140320200934-8fwsjsu920nfos3z
Add  adblock:css debug token for displaying element hider selectors

Show diffs side-by-side

added added

removed removed

Lines of Context:
173
173
            && !(element.split("[")[0] in valid_elements))
174
174
                is_valid = false;
175
175
 
176
 
            if (!is_valid && debug_parse)
177
 
                message ("Adblock: Invalid selector: %s", element);
 
176
 
 
177
            bool debug_selectors = "adblock:css" in (Environment.get_variable ("MIDORI_DEBUG") ?? "");
 
178
            if (debug_selectors)
 
179
                stdout.printf ("Adblock '%s' %s: %s\n",
 
180
                    this.title, is_valid ? "selector" : "INVALID?", element);
178
181
 
179
182
            return is_valid;
180
183
        }