Check that the hide-if-canvas-contains snippet is working as expected.
Test the basic usage of the snippet when fillText() is called.
abptestpages.org#$#hide-if-canvas-contains /sponsored/ .ft-canvas-parent
Test the basic usage of the snippet when strokeText() is called.
abptestpages.org#$#hide-if-canvas-contains /sponsored/ .st-canvas-parent
Test that the snippet accumulates text when strokeText() is called once per character rather than in a single call.
abptestpages.org#$#hide-if-canvas-contains /sponsored/ .sta-canvas-parent
Test the basic usage of the snippet when drawImage() is called.
abptestpages.org#$#hide-if-canvas-contains /\/ads\// .di-canvas-parent
Test the snippet when drawImage() is called with an image sourced from toDataURL().
abptestpages.org#$#hide-if-canvas-contains /AAAAoAAAAKCA/ .tdu-canvas-parent
Test that clearRectBehavior=always resets the text buffer on any clearRect() call, including partial ones. Text drawn in two separate phases separated by a partial clearRect should not combine to form a match.
abptestpages.org#$#hide-if-canvas-contains /sponsored/ .crba-canvas-parent always
Test that mode="data" matches the pattern against the canvas data URL (canvas.toDataURL()), which is a base64-encoded PNG. The pattern UgAAACUAAAAX is the base64 of the PNG header bytes that end the IHDR chunk name and store the image width and height, here 37 (0x25) and 23 (0x17). Every browser writes this header the same way, unlike the pixel data, so only the 37×23 canvas matches and the 20×20 ones do not.
abptestpages.org#$#hide-if-canvas-contains /UgAAACUAAAAX/ .dm-canvas-parent '' data