{"id":4271,"date":"2024-01-24T11:53:21","date_gmt":"2024-01-24T17:53:21","guid":{"rendered":"https:\/\/cocoalopez.com\/blog\/?p=4271"},"modified":"2024-01-24T11:53:24","modified_gmt":"2024-01-24T17:53:24","slug":"adblock-anything-that-uses-wildcards-or-random-numbers","status":"publish","type":"post","link":"https:\/\/cocoalopez.com\/blog\/?p=4271","title":{"rendered":"ADBLOCK anything that uses wildcards or random numbers"},"content":{"rendered":"\n<p>So recently I wanted to block the comments section on a website however the element blocking was not working as they used random strings at the end of the div ID.<\/p>\n\n\n\n<p>In this case the element appeared as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">###comment_iframe_65b14c04e9ff711034703604<\/code><\/pre>\n\n\n\n<p>Which when blocking will only block that page&#8217;s iframe and leave all the others appearing on other pages.<\/p>\n\n\n\n<p>So to block the iframe properly, we have to use a wildcard, which normally would be *, meaning that<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">###comment_iframe_*<\/code><\/pre>\n\n\n\n<p>Would be blocked, however that doesn&#8217;t work since Adblock, Ublock etc use CSS selectors, so instead we have to use <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">##[id^=\"comment_iframe_\"]<\/code><\/pre>\n\n\n\n<p>Which allow us to block everything after &#8220;iframe_&#8221;.<\/p>\n\n\n\n<p>For more info on CSS selectors please see:<\/p>\n\n\n\n<p><a href=\"https:\/\/drafts.csswg.org\/selectors-3\/#attribute-substrings\">https:\/\/drafts.csswg.org\/selectors-3\/#attribute-substrings<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So recently I wanted to block the comments section on a website however the element blocking was not working as they used random strings at the end of the div ID. In this case the element appeared as: Which when blocking will only block that page&#8217;s iframe and leave all the others appearing on other [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4272,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[31],"tags":[],"class_list":["post-4271","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips-y-tutoriales"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2024\/01\/image-1.png?fit=774%2C380&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9XJix-16T","jetpack-related-posts":[{"id":4305,"url":"https:\/\/cocoalopez.com\/blog\/?p=4305","url_meta":{"origin":4271,"position":0},"title":"Mute unwanted Headlines and Images from websites","author":"cgmodeler","date":"March 27, 2024","format":false,"excerpt":"Well it's been a while, elections are coming and I don't want to be reading bullshit about people I don't care for, so made this quick TAMPERMONKEY script that will filter anything containing the words on the list and clear the website up for you. With a little blur: \/\/\u2026","rel":"","context":"In &quot;Featured&quot;","block_context":{"text":"Featured","link":"https:\/\/cocoalopez.com\/blog\/?cat=1002"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2024\/03\/image-4.png?fit=1036%2C949&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2024\/03\/image-4.png?fit=1036%2C949&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2024\/03\/image-4.png?fit=1036%2C949&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2024\/03\/image-4.png?fit=1036%2C949&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":4224,"url":"https:\/\/cocoalopez.com\/blog\/?p=4224","url_meta":{"origin":4271,"position":1},"title":"How to block twitter sidebar + trending topics","author":"cgmodeler","date":"November 25, 2023","format":false,"excerpt":"Updated 6 June 2023 Twitter can be a great source of connections, industry news and light-hearted fun (if you follow the right people!). Unfortunately, the \u201cWhat\u2019s happening\u201d trending topics sidebar can be a constant source of misery that by now can be simply too much to bear. If you\u2019d rather\u2026","rel":"","context":"In &quot;Tips y Tutoriales&quot;","block_context":{"text":"Tips y Tutoriales","link":"https:\/\/cocoalopez.com\/blog\/?cat=31"},"img":{"alt_text":"Twitter on Samsung tablet screen","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2023\/11\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvcHgxMDI4NTEzLWltYWdlLWt6MmR6dXN6LmpwZw.jpg?fit=1200%2C801&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2023\/11\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvcHgxMDI4NTEzLWltYWdlLWt6MmR6dXN6LmpwZw.jpg?fit=1200%2C801&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2023\/11\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvcHgxMDI4NTEzLWltYWdlLWt6MmR6dXN6LmpwZw.jpg?fit=1200%2C801&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2023\/11\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvcHgxMDI4NTEzLWltYWdlLWt6MmR6dXN6LmpwZw.jpg?fit=1200%2C801&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2023\/11\/czNmcy1wcml2YXRlL3Jhd3BpeGVsX2ltYWdlcy93ZWJzaXRlX2NvbnRlbnQvbHIvcHgxMDI4NTEzLWltYWdlLWt6MmR6dXN6LmpwZw.jpg?fit=1200%2C801&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":4595,"url":"https:\/\/cocoalopez.com\/blog\/?p=4595","url_meta":{"origin":4271,"position":2},"title":"Tampermonkey Block BOTS from twitter","author":"cgmodeler","date":"July 3, 2025","format":false,"excerpt":"This tampermonkey script will block any bot from appearing on your timeline. Use tampermonkey for it to work. https:\/\/greasyfork.org\/en\/scripts\/541560-twitter-x-bot-and-flag-post-hider","rel":"","context":"In &quot;Featured&quot;","block_context":{"text":"Featured","link":"https:\/\/cocoalopez.com\/blog\/?cat=1002"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2025\/07\/image.png?fit=947%2C665&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2025\/07\/image.png?fit=947%2C665&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2025\/07\/image.png?fit=947%2C665&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2025\/07\/image.png?fit=947%2C665&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2944,"url":"https:\/\/cocoalopez.com\/blog\/?p=2944","url_meta":{"origin":4271,"position":3},"title":"Create tileable textures online","author":"cgmodeler","date":"October 20, 2020","format":false,"excerpt":"Use this tool to turn an existing, non-tileable stochastic texture into a tileable texture, by manipulating its edges using histogram-preserving blending. It works on all random-phase inputs, as well as on many non-random-phase inputs which are stochastic and non-periodic, typically natural textures such as moss, granite, sand, bark, etc. https:\/\/unity-grenoble.github.io\/website\/demo\/2020\/10\/16\/demo-histogram-preserving-blend-make-tileable.html\u2026","rel":"","context":"In &quot;Tips y Tutoriales&quot;","block_context":{"text":"Tips y Tutoriales","link":"https:\/\/cocoalopez.com\/blog\/?cat=31"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2017\/02\/Honeyview_2017-02-26_20-10-11.png?fit=1200%2C591&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2017\/02\/Honeyview_2017-02-26_20-10-11.png?fit=1200%2C591&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2017\/02\/Honeyview_2017-02-26_20-10-11.png?fit=1200%2C591&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2017\/02\/Honeyview_2017-02-26_20-10-11.png?fit=1200%2C591&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2017\/02\/Honeyview_2017-02-26_20-10-11.png?fit=1200%2C591&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":4332,"url":"https:\/\/cocoalopez.com\/blog\/?p=4332","url_meta":{"origin":4271,"position":4},"title":"Photoshop TIPS 1 Short TIPS for drawing animation backgrounds &#8211; Part 1 &#8211; A gradient map of the aori sky","author":"cgmodeler","date":"April 23, 2024","format":false,"excerpt":"The mini lecture I gave the other day at the \u201c3D Background Shop Community,\u201d a loose gathering of people who use 3DCG tools to create backgrounds for animation and manga, was surprisingly well received.Table of Contents Speed is the name of the game when it comes to animation background art!\u2026","rel":"","context":"In &quot;Tips y Tutoriales&quot;","block_context":{"text":"Tips y Tutoriales","link":"https:\/\/cocoalopez.com\/blog\/?cat=31"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2024\/04\/picture_pc_0e5b0989d5bb4efe85b19b09b6bb3013.webp?fit=800%2C471&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2024\/04\/picture_pc_0e5b0989d5bb4efe85b19b09b6bb3013.webp?fit=800%2C471&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2024\/04\/picture_pc_0e5b0989d5bb4efe85b19b09b6bb3013.webp?fit=800%2C471&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2024\/04\/picture_pc_0e5b0989d5bb4efe85b19b09b6bb3013.webp?fit=800%2C471&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3754,"url":"https:\/\/cocoalopez.com\/blog\/?p=3754","url_meta":{"origin":4271,"position":5},"title":"FAKE SSS for 3DS MAX Viewport","author":"cgmodeler","date":"October 9, 2022","format":false,"excerpt":"https:\/\/vimeo.com\/41147048 Code over here: http:\/\/www.aardolino.com\/blog\/ or Playing Remedy\u2019s Alan Wake for Xbox, and feeling lost seeing its marvelous forest environment, wondering about how to procedurally animate trees and vegetation using vertex colors, the idea of SS&F-SSS came out: use mesh thickness to modulate a SSS color. [Yes\u2026it\u2019s not related to\u2026","rel":"","context":"In &quot;Featured&quot;","block_context":{"text":"Featured","link":"https:\/\/cocoalopez.com\/blog\/?cat=1002"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/10\/imagen-7.png?fit=1016%2C784&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/10\/imagen-7.png?fit=1016%2C784&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/10\/imagen-7.png?fit=1016%2C784&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/cocoalopez.com\/blog\/wp-content\/uploads\/2022\/10\/imagen-7.png?fit=1016%2C784&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4271"}],"version-history":[{"count":1,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4271\/revisions"}],"predecessor-version":[{"id":4273,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4271\/revisions\/4273"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/4272"}],"wp:attachment":[{"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cocoalopez.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}