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

Side by Side Diff: pages/filter-cheatsheet.html

Issue 29615667: Issue 6069 - Add documentation for :-abp-contains() selector (Closed) Base URL: https://hg.adblockplus.org/web.adblockplus.org/
Patch Set: fix nit Created Nov. 29, 2017, 10:35 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pages/filters.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 title=Adblock Plus filters explained 1 title=Adblock Plus filters explained
2 2
3 <head> 3 <head>
4 <style type="text/css"> 4 <style type="text/css">
5 #content 5 #content
6 { 6 {
7 max-width: none; 7 max-width: none;
8 } 8 }
9 9
10 canvas 10 canvas
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 803
804 <table> 804 <table>
805 <col class="selector"> 805 <col class="selector">
806 <col class="selectorPurpose"> 806 <col class="selectorPurpose">
807 <tr> 807 <tr>
808 <th>{{ pseudo-class-header[header] Pseudo-class }}</th> 808 <th>{{ pseudo-class-header[header] Pseudo-class }}</th>
809 <th>{{ s127 Purpose }}</th> 809 <th>{{ s127 Purpose }}</th>
810 </tr> 810 </tr>
811 <tr> 811 <tr>
812 <td><code>:-abp-properties()</code></td> 812 <td><code>:-abp-properties()</code></td>
813 <td>{{ abp-properties-purpose Select an element if its CSS style properties match what's specified }}</td> 813 <td>{{ abp-properties-purpose Select an element if its CSS style properties match what's specified. You can pass a regular expression by surrounding it with "/". }}</td>
814 </tr> 814 </tr>
815 <tr> 815 <tr>
816 <td><code>:-abp-has()</code></td> 816 <td><code>:-abp-has()</code></td>
817 <td>{{ abp-has-purpose Select an element if its content subtree match the se lector specified }}</td> 817 <td>{{ abp-has-purpose Select an element if its content subtree match the se lector specified }}</td>
818 </tr> 818 </tr>
819 <tr>
820 <td><code>:-abp-contains()</code></td>
821 <td>{{ abp-contains-purpose Select an element if its text content contains t he specified string }}</td>
822 </tr>
819 </table> 823 </table>
820 824
821 <p>{{ abp-pseudo-select-2 When writing element hiding filters that make use thos e you must use the <code>#?#</code> syntax (replace <code>##</code> with <code># ?#</code>) and take care to specify one or more domains. Some examples: }}</p> 825 <p>{{ abp-pseudo-select-2 When writing element hiding filters that make use thos e you must use the <code>#?#</code> syntax (replace <code>##</code> with <code># ?#</code>) and take care to specify one or more domains. Some examples: }}</p>
822 826
823 <table> 827 <table>
824 <col class="selector"> 828 <col class="selector">
825 <col class="selectorPurpose"> 829 <col class="selectorPurpose">
826 <tr> 830 <tr>
827 <th>{{ s126 Selector }}</th> 831 <th>{{ s126 Selector }}</th>
828 <th>{{ s127 Purpose }}</th> 832 <th>{{ s127 Purpose }}</th>
829 </tr> 833 </tr>
830 <tr> 834 <tr>
831 <td><code>example.com#?#div:-abp-properties(width:300px;height:250px;)</code ></td> 835 <td><code>example.com#?#div:-abp-properties(width:300px;height:250px;)</code ></td>
832 <td>{{ abp-properties-example Matches <code><fix>div</fix></code> elements w hose style contain the specified properties }}</td> 836 <td>{{ abp-properties-example Matches <code><fix>div</fix></code> elements w hose style contain the specified properties }}</td>
833 </tr> 837 </tr>
834 <tr> 838 <tr>
835 <td><code>example.com#?#div:-abp-has(&gt; div &gt; img.advert)</code></td> 839 <td><code>example.com#?#div:-abp-has(&gt; div &gt; img.advert)</code></td>
836 <td>{{ abp-has-example1 Matches <code><fix>div</fix></code> elements that co ntain as a direct descendant a <code><fix>div</fix></code> element whose direct descendant is an <code><fix>img</fix></code> with the class "advert" }}</td> 840 <td>{{ abp-has-example1 Matches <code><fix>div</fix></code> elements that co ntain as a direct descendant a <code><fix>div</fix></code> element whose direct descendant is an <code><fix>img</fix></code> with the class "advert" }}</td>
837 </tr> 841 </tr>
838 <tr> 842 <tr>
839 <td><code>example.com#?#div:-abp-has(&gt; div &gt; img:-abp-properties(width :300px;height:250px;))</code></td> 843 <td><code>example.com#?#div:-abp-has(&gt; div &gt; img:-abp-properties(width :300px;height:250px;))</code></td>
840 <td>{{ abp-has-example2 Matches <code><fix>div</fix></code> elements that co ntain as a direct descendant a <code><fix>div</fix></code> element whose direct descendant is an <code><fix>img</fix></code> element whose style properties cont ain the specified properties, a <code><fix>width</fix></code> of 300 pixels and an <code><fix>height</fix></code> of 250 pixels }}</td> 844 <td>{{ abp-has-example2 Matches <code><fix>div</fix></code> elements that co ntain as a direct descendant a <code><fix>div</fix></code> element whose direct descendant is an <code><fix>img</fix></code> element whose style properties cont ain the specified properties, a <code><fix>width</fix></code> of 300 pixels and an <code><fix>height</fix></code> of 250 pixels }}</td>
841 </tr> 845 </tr>
842 <tr> 846 <tr>
843 <td><code>example.com#?#div:-abp-has(&gt; div &gt; img:-abp-properties(WidTh :300px;hEigHt:250px;))</code></td> 847 <td><code>example.com#?#div:-abp-has(&gt; div &gt; img:-abp-properties(WidTh :300px;hEigHt:250px;))</code></td>
844 <td>{{ abp-has-example3 Since the CSS properties are matched case-insensitiv ely, this filter matches the same thing as above }}</td> 848 <td>{{ abp-has-example3 Since the CSS properties are matched case-insensitiv ely, this filter matches the same thing as above }}</td>
845 </tr> 849 </tr>
846 <tr> 850 <tr>
851 <td><code>example.com#?#div:-abp-has(> span:-abp-contains(Advertisment))</co de></td>
852 <td>{{ abp-contains-example1 Matches <code><fix>div</fix></code> elements th at have a direct descendent <code><fix>span</fix></code> element containing the text "Advertisment" }}</td>
853 </tr>
854 <tr>
847 <td><code>example.com#?#div &gt; img:-abp-properties(width:*px;height:250px; )</code></td> 855 <td><code>example.com#?#div &gt; img:-abp-properties(width:*px;height:250px; )</code></td>
848 <td>{{ abp-properties-example1 By using a wildcard <code>*</code>, this filt er matches an <code>img</code> whose CSS style properties have a <code>width</co de> specified in pixels and a <code>height</code> of 250 pixels }}</td> 856 <td>{{ abp-properties-example1 By using a wildcard <code>*</code>, this filt er matches an <code>img</code> whose CSS style properties have a <code>width</co de> specified in pixels and a <code>height</code> of 250 pixels }}</td>
849 </tr> 857 </tr>
850 <tr> 858 <tr>
851 <td><code>example.com#?#div &gt; img:-abp-properties(/width: 3[2-8]px;/)</co de></td> 859 <td><code>example.com#?#div &gt; img:-abp-properties(/width: 3[2-8]px;/)</co de></td>
852 <td>{{ abp-properties-example2 By using a regular expression, this filter ma tches an <code>img</code> whose CSS style properties have a <code>width</code> b etween 32 and 38 pixels }}</td> 860 <td>{{ abp-properties-example2 By using a regular expression, this filter ma tches an <code>img</code> whose CSS style properties have a <code>width</code> b etween 32 and 38 pixels }}</td>
853 </tr> 861 </tr>
854 </table> 862 </table>
855 863
OLDNEW
« no previous file with comments | « no previous file | pages/filters.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld