Changes between Version 2 and Version 3 of Ticket #6809


Ignore:
Timestamp:
07/26/2018 12:30:15 PM (21 months ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6809 – Description

    v2 v3  
    1212 
    1313On any DOM modification, the snippet should use `document.querySelectorAll(selector)` to look up all elements that match the given CSS selector, then look for `search` in each element's text content and hide the element if the string is found. 
     14 
     15=== Hints for testers === 
     16 
     17Try this: 
     18 
     19{{{ 
     20<!-- test.html --> 
     21<div> 
     22  Lorem ipsum dolor sit amet, consectetur 
     23  adipiscing elit, sed do eiusmod tempor 
     24  incididunt ut labore et dolore magna aliqua. 
     25</div> 
     26<script src="script.js"></script> 
     27}}} 
     28 
     29{{{ 
     30/* script.js */ 
     31let ad = document.createElement("div"); 
     32ad.id = Math.random().toString(36).substring(2); 
     33ad.innerHTML = "<div>Best ad ever!</div>"; 
     34document.body.appendChild(ad); 
     35}}} 
     36 
     37The filter `#$#hide-if-contains 'Best ad ever!' div[id]` should hide the ad.