Troubleshoot Block «Remember password» element on Facebook

Mr.X

Level 9
Thread author
Verified
Well-known
Forum Veteran
Aug 2, 2014
409
1,080
768
58
Mexico
Briefly explain your current issue(s)
How to block it using Adguard Adblocker Extension (Chrome).
Steps taken to resolve, but have been unsuccessful
I tried "Block ads manually" (context menu). It works until I refresh the page, it reappears again.
Your current Antivirus
None
2935.png
 
@Bot , now make a generic rule out of these four lines:
Code:
<div class="box_a"><div><div class="adspot"><span class="placeholder"></span><div id="div-gpt-ad-ddnotamexicoZA_box_a"></div></div></div></div>
<div class="box_b"><div><div class="adspot"><span class="placeholder"></span><div id="div-gpt-ad-ddnotamexicoZA_box_b" data-google-query-id="COnlzsjquZMDFRk4RAgdS3AjPA"><div id="google_ads_iframe_/21624040141/ddnotamexicoZA_box_b_0__container__" style="border: 0pt none; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;" data-darkreader-inline-border-top="" data-darkreader-inline-border-right="" data-darkreader-inline-border-bottom="" data-darkreader-inline-border-left=""><iframe id="google_ads_iframe_/21624040141/ddnotamexicoZA_box_b_0" name="google_ads_iframe_/21624040141/ddnotamexicoZA_box_b_0" title="3rd party ad content" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" aria-label="Advertisement" tabindex="0" allow="private-state-token-redemption;attribution-reporting" data-google-container-id="3" style="border: 0px; vertical-align: bottom; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;" data-darkreader-inline-border-top="" data-darkreader-inline-border-right="" data-darkreader-inline-border-bottom="" data-darkreader-inline-border-left="" data-load-complete="true"></iframe></div></div></div></div></div>
<div class="box_c"><div><div class="adspot"><span class="placeholder"></span><div id="div-gpt-ad-ddnotamexicoZA_box_c"></div></div></div></div>
<div class="box_e"><div><div class="adspot"><span class="placeholder"></span><div id="div-gpt-ad-ddnotamexicoZA_box_e" data-google-query-id="CIrFz5HruZMDFeSsOgUdQS0HAA"><div id="google_ads_iframe_/21624040141/ddnotamexicoZA_box_e_0__container__" style="border: 0pt none; margin: auto; text-align: center; width: 336px; height: 280px;"><iframe frameborder="0" src="https://c82ff7a65a305c4ca050876b245bf4f8.safeframe.googlesyndication.com/safeframe/1-0-45/html/container.html" id="google_ads_iframe_/21624040141/ddnotamexicoZA_box_e_0" title="Contenido de anuncios de terceros" name="" scrolling="no" marginwidth="0" marginheight="0" width="336" height="280" data-is-safeframe="true" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" allow="private-state-token-redemption;attribution-reporting" aria-label="Anuncio" tabindex="0" data-google-container-id="6" style="border: 0px; vertical-align: bottom;" data-load-complete="true"></iframe></div></div></div></div></div>
Generic rule for all four

Use this:

Code:
##div[class^="box_"]:has(.adspot > [id^="div-gpt-ad-"])

Simpler version

If you only want to hide the ad container itself and not the outer box:

Code:
##div.adspot:has(> [id^="div-gpt-ad-"])

Why this works
  • div[class^="box_"] matches wrappers like box_a, box_b, box_c, box_e.
  • [id^="div-gpt-ad-"] generically matches GPT ad slot IDs.
  • This avoids hardcoding each individual box letter.

Best overall choice

For your four examples, the most complete generic rule is:

Code:
##div[class^="box_"]:has(.adspot > [id^="div-gpt-ad-"])
 
  • Like
Reactions: Mr.X
Upvote 0
@Bot , thanks, this one worked:
Code:
##div[class^="box_"]:has(.adspot > [id^="div-gpt-ad-"])
Glad that worked.

Why it worked well
  • It does not depend on the exact box name like box_a or box_e.
  • It keys off the more stable GPT ad slot pattern: id^="div-gpt-ad-".
  • It hides the full wrapper, so you usually do not get leftover blank space.

Working rule

Code:
##div[class^="box_"]:has(.adspot > [id^="div-gpt-ad-"])

If you want, I can keep helping with the next element and keep the selectors as generic as possible.
 
  • Like
Reactions: Mr.X
Upvote 0
@Bot and @harlan4096 @Jack
I can't post here the code found in the attached screenshots.
The spoiler is empty

There is no HTML/code in your post, so I cannot safely derive a generic rule from it.

What to do instead
  • Paste the element HTML directly in a
    Code:
     block.
    [*]Or paste just the key part around the unique container, attributes, and nearby text.
    [*]If the forum blocks the full snippet, split it into 2–3 smaller [CODE] blocks.
    [/LIST]
    
    [B]Important[/B]
    
    A screenshot alone is usually not enough for a reliable cosmetic rule. The selector should be based on actual DOM attributes or structure, not appearance.
    
    Once the HTML is posted, I can turn it into a generic rule.
 
  • Like
Reactions: harlan4096 and Mr.X
Upvote 0
@Bot , now these ones:
Code:
<div id="iframedazn"><div class="AV698648d5527b2c4dd1051178" style="width: 100%; margin: 0px auto; max-width: 640px;"><div id="aniBox" style="width: 100%;">

<div id="aniplayer_AV698648d5527b2c4dd1051178-1774400666684" style="width: 100%;"></div></div></div><x-script async="" id="AV698648d5527b2c4dd1051178"

type="text/x-javascript" src="hxxps://tg1[.]stoic-media[.]com/api/adserver/spt?AV_TAGID=698648d5527b2c4dd1051178&amp;AV_PUBLISHERID=6986481f79a586c8500319c4">

</x-script></div>

<div id="iframedazn"><div class="AV698648d5527b2c4dd1051178" style="width: 100%; margin: 0px auto; max-width: 640px;"><div id="aniBox" style="width: 100%;">

<div id="aniplayer_AV698648d5527b2c4dd1051178-1774400669385" style="width: 100%;"></div></div></div><x-script async="" id="AV698648d5527b2c4dd1051178"

type="text/x-javascript" src="hxxps://tg1[.]stoic-media[.]com/api/adserver/spt?AV_TAGID=698648d5527b2c4dd1051178&amp;AV_PUBLISHERID=6986481f79a586c8500319c4">

</x-script></div>
 
Upvote 0
@Bot , now these ones:
Code:
<div id="iframedazn"><div class="AV698648d5527b2c4dd1051178" style="width: 100%; margin: 0px auto; max-width: 640px;"><div id="aniBox" style="width: 100%;">

<div id="aniplayer_AV698648d5527b2c4dd1051178-1774400666684" style="width: 100%;"></div></div></div><x-script async="" id="AV698648d5527b2c4dd1051178"

type="text/x-javascript" src="hxxps://tg1[.]stoic-media[.]com/api/adserver/spt?AV_TAGID=698648d5527b2c4dd1051178&amp;AV_PUBLISHERID=6986481f79a586c8500319c4">

</x-script></div>

<div id="iframedazn"><div class="AV698648d5527b2c4dd1051178" style="width: 100%; margin: 0px auto; max-width: 640px;"><div id="aniBox" style="width: 100%;">

<div id="aniplayer_AV698648d5527b2c4dd1051178-1774400669385" style="width: 100%;"></div></div></div><x-script async="" id="AV698648d5527b2c4dd1051178"

type="text/x-javascript" src="hxxps://tg1[.]stoic-media[.]com/api/adserver/spt?AV_TAGID=698648d5527b2c4dd1051178&amp;AV_PUBLISHERID=6986481f79a586c8500319c4">

</x-script></div>
Generic rule

Use this:

Code:
##div#iframedazn:has([id^="aniplayer_"]):has(x-script[src*="stoic-media.com/api/adserver/spt"])

Simpler variant

If that site always uses the same wrapper:

Code:
##div#iframedazn

Why the first rule is better
  • #iframedazn targets the wrapper you showed.
  • [id^="aniplayer_"] matches the generated player container generically.
  • x-script[src*="stoic-media.com/api/adserver/spt"] keys on the adserver source, which is more specific and safer.

Best choice

The most generic but still anchored selector from your snippet is:

Code:
##div#iframedazn:has([id^="aniplayer_"]):has(x-script[src*="stoic-media.com/api/adserver/spt"])
 
  • Like
Reactions: Mr.X
Upvote 0
@Bot
Now make a generic rule for this one
Code:
<div class="topleader homepage__topleader_1 pb-3" id="topleader"><div><div class="adspot"><span class="placeholder"></span><div id="div-gpt-ad-homepage__topleader_1" data-google-query-id="CLKNwt6hxZMDFQIATwgdYv8hHQ"><div id="google_ads_iframe_/21624040141/homepage__topleader_1_0__container__" style="border: 0pt none; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;" data-darkreader-inline-border-top="" data-darkreader-inline-border-right="" data-darkreader-inline-border-bottom="" data-darkreader-inline-border-left=""><iframe id="google_ads_iframe_/21624040141/homepage__topleader_1_0" name="google_ads_iframe_/21624040141/homepage__topleader_1_0" title="Contenido de anuncios de terceros" width="970" height="90" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" aria-label="Anuncio" tabindex="0" allow="private-state-token-redemption;attribution-reporting" data-google-container-id="1" style="border: 0px; vertical-align: bottom; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;" data-darkreader-inline-border-top="" data-darkreader-inline-border-right="" data-darkreader-inline-border-bottom="" data-darkreader-inline-border-left="" data-load-complete="true"></iframe></div></div></div></div></div>
 
Upvote 0
@Bot
Now make a generic rule for this one
Code:
<div class="topleader homepage__topleader_1 pb-3" id="topleader"><div><div class="adspot"><span class="placeholder"></span><div id="div-gpt-ad-homepage__topleader_1" data-google-query-id="CLKNwt6hxZMDFQIATwgdYv8hHQ"><div id="google_ads_iframe_/21624040141/homepage__topleader_1_0__container__" style="border: 0pt none; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;" data-darkreader-inline-border-top="" data-darkreader-inline-border-right="" data-darkreader-inline-border-bottom="" data-darkreader-inline-border-left=""><iframe id="google_ads_iframe_/21624040141/homepage__topleader_1_0" name="google_ads_iframe_/21624040141/homepage__topleader_1_0" title="Contenido de anuncios de terceros" width="970" height="90" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" aria-label="Anuncio" tabindex="0" allow="private-state-token-redemption;attribution-reporting" data-google-container-id="1" style="border: 0px; vertical-align: bottom; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;" data-darkreader-inline-border-top="" data-darkreader-inline-border-right="" data-darkreader-inline-border-bottom="" data-darkreader-inline-border-left="" data-load-complete="true"></iframe></div></div></div></div></div>
Generic rule

Use this:

Code:
##div#topleader:has(.adspot > [id^="div-gpt-ad-"])

More generic site-wide version

If the site uses the same pattern in multiple places:

Code:
##div[class*="leader"]:has(.adspot > [id^="div-gpt-ad-"])

Safer container-level option

If you only want to hide the ad block itself:

Code:
##div.adspot:has(> [id^="div-gpt-ad-"])

Best choice for your snippet

The most direct generic selector from what you posted is:

Code:
##div#topleader:has(.adspot > [id^="div-gpt-ad-"])

That should remove the whole top leader wrapper, not just the iframe inside it.
 
  • Like
Reactions: Mr.X
Upvote 0
@Bot
Code:
<div class="col-md-12 homepage__box_4"><div><div class="adspot"><span class="placeholder"></span><div id="div-gpt-ad-homepage__box_4" data-google-query-id="COiVy_CjxZMDFawfRAgdY78Y-A"><div id="google_ads_iframe_/21624040141/homepage__box_4_0__container__" style="border: 0pt none; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;" data-darkreader-inline-border-top="" data-darkreader-inline-border-right="" data-darkreader-inline-border-bottom="" data-darkreader-inline-border-left=""><iframe id="google_ads_iframe_/21624040141/homepage__box_4_0" name="google_ads_iframe_/21624040141/homepage__box_4_0" title="3rd party ad content" width="468" height="60" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" aria-label="Advertisement" tabindex="0" allow="private-state-token-redemption;attribution-reporting" data-google-container-id="3" style="border: 0px; vertical-align: bottom; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;" data-darkreader-inline-border-top="" data-darkreader-inline-border-right="" data-darkreader-inline-border-bottom="" data-darkreader-inline-border-left="" data-load-complete="true"></iframe></div></div></div></div></div>
 
Upvote 0
@Bot
Code:
<div class="col-md-12 homepage__box_4"><div><div class="adspot"><span class="placeholder"></span><div id="div-gpt-ad-homepage__box_4" data-google-query-id="COiVy_CjxZMDFawfRAgdY78Y-A"><div id="google_ads_iframe_/21624040141/homepage__box_4_0__container__" style="border: 0pt none; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;" data-darkreader-inline-border-top="" data-darkreader-inline-border-right="" data-darkreader-inline-border-bottom="" data-darkreader-inline-border-left=""><iframe id="google_ads_iframe_/21624040141/homepage__box_4_0" name="google_ads_iframe_/21624040141/homepage__box_4_0" title="3rd party ad content" width="468" height="60" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" aria-label="Advertisement" tabindex="0" allow="private-state-token-redemption;attribution-reporting" data-google-container-id="3" style="border: 0px; vertical-align: bottom; --darkreader-inline-border-top: 0px; --darkreader-inline-border-right: 0px; --darkreader-inline-border-bottom: 0px; --darkreader-inline-border-left: 0px;" data-darkreader-inline-border-top="" data-darkreader-inline-border-right="" data-darkreader-inline-border-bottom="" data-darkreader-inline-border-left="" data-load-complete="true"></iframe></div></div></div></div></div>
Generic rule

Use this:

Code:
##div[class*="box_"]:has(.adspot > [id^="div-gpt-ad-"])

More specific version for this exact block type

Code:
##div.homepage__box_4:has(.adspot > [id^="div-gpt-ad-"])

Why this works
  • class*="box_" matches wrappers like homepage__box_4 without hardcoding the full class string.
  • .adspot > [id^="div-gpt-ad-"] targets the GPT ad slot pattern you already confirmed on the same site.
  • Hiding the outer wrapper helps avoid leftover spacing.

Best choice

For consistency with the earlier working rules on this site, the best generic selector is:

Code:
##div[class*="box_"]:has(.adspot > [id^="div-gpt-ad-"])
 
  • Thanks
Reactions: Mr.X
Upvote 0
@Bot Get a generic rule for this one:
<a class="x1i10hfl x1qjc9v5 xjbqb8w xjqpnuy xc5r6h4 xqeqjp1 x1phubyo x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x972fbf x10w94by x1qhh985 x14e42zd x9f619 x1ypdohk xdl72j9 x2lah0s x3ct3a4 xdj266r x14z9mp xat24cr x1lziwak x2lwn1j xeuugli xexx8yu xyri2b x18d9i69 x1c1uobl x1n2onr6 x16tdsg8 x1hl2dhg xggy1nq x1ja2u2z x1t137rt x1fmog5m xu25z0z x140muxe xo1y3bh x1q0g3np x87ps6o x1lku1pv x1rg5ohu x1a2a7pz x1pdlv7q" href="Facebook" rel="nofollow noreferrer license" role="link" tabindex="0" target="_blank"><div class="html-div x78zum5 x1i5p2am x1whfx0g xr2y4jy x1ihp6rs x972fbf x10w94by x1qhh985 x14e42zd x1ypdohk xjb2p0i xdj266r x1xegmmw xat24cr x13fj5qh x1yc453h x1y1aw1k xf159sx xwib8y2 xmzvs34 x1164lod x8du52y"><div class="html-div xdj266r x14z9mp xat24cr x1lziwak xexx8yu xyri2b x18d9i69 x1c1uobl xamitd3 x1r8uery x1iyjqo2 xs83m0k xeuugli"><div id="_r_12l_"><span aria-labelledby="_r_12k_"><div class="x6s0dn4 x78zum5"><div class="xamitd3 x2lah0s x1kmanbg"><img data-imgperflogname="feedImage" class="x1y5e3q9 x1obq294 x5a5i1n xde0f50 x15x8krk x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x178xt8z x1lun4ml xso031l xpilrb4 x1lliihq x4zw9a1 x19kjcj4 xh8yej3 x1exxf4d xpv9jar x1nb4dca x1nmn18 xm47w4j" alt="" aria-hidden="true" referrerpolicy="origin-when-cross-origin" src="https://scontent.ftam1-1.fna.fbcdn....uQ6v2ZVWnt_uQuIh2UPnbdyOArUXw&amp;oe=6A2924DB"></div><div class="x1g0dm76"><div class="x78zum5 xdt5ytf xz62fqu x16ldp7u"><div class="xu06os2 x1ok221b"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lliihq x1s928wv xhkezso x1gmr53x x1cpjm7i x1fgarty x1943h6x xudqn12 x3x7a5m x6prxxf xvq8zen xk50ysn xzsf02u x1yc453h" dir="auto"><span class="x1lliihq x6ikm8r x10wlt62 x1n2onr6" style="-webkit-box-orient: vertical; -webkit-line-clamp: 3; display: -webkit-box;">Las Mejores Piernas están en #KFC</span></span></div><div class="xu06os2 x1ok221b"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lliihq x1s928wv xhkezso x1gmr53x x1cpjm7i x1fgarty x1943h6x x4zkp8e x3x7a5m x1nxh6w3 x1sibtaa xo1l8bm xi81zsa x1yc453h" dir="auto"><span class="x1lliihq x6ikm8r x10wlt62 x1n2onr6 x1j85h84" style="-webkit-box-orient: vertical; -webkit-line-clamp: 2; display: -webkit-box;"><div class="x1kyqaxf">kfc.com.mx</div></span></span></div></div></div></div></span></div></div></div><div class="x1ey2m1c xtijo5x x1o0tod xg01cxk x47corl x10l6tqk x13vifvy x1ebt8du x19991ni x1dhq9h x1fmog5m xu25z0z x140muxe xo1y3bh" role="none" data-visualcompletion="ignore" style="inset: 0px;"></div></a>
 
Upvote 0
@Bot Get a generic rule for this one:
<a class="x1i10hfl x1qjc9v5 xjbqb8w xjqpnuy xc5r6h4 xqeqjp1 x1phubyo x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x972fbf x10w94by x1qhh985 x14e42zd x9f619 x1ypdohk xdl72j9 x2lah0s x3ct3a4 xdj266r x14z9mp xat24cr x1lziwak x2lwn1j xeuugli xexx8yu xyri2b x18d9i69 x1c1uobl x1n2onr6 x16tdsg8 x1hl2dhg xggy1nq x1ja2u2z x1t137rt x1fmog5m xu25z0z x140muxe xo1y3bh x1q0g3np x87ps6o x1lku1pv x1rg5ohu x1a2a7pz x1pdlv7q" href="Facebook" rel="nofollow noreferrer license" role="link" tabindex="0" target="_blank"><div class="html-div x78zum5 x1i5p2am x1whfx0g xr2y4jy x1ihp6rs x972fbf x10w94by x1qhh985 x14e42zd x1ypdohk xjb2p0i xdj266r x1xegmmw xat24cr x13fj5qh x1yc453h x1y1aw1k xf159sx xwib8y2 xmzvs34 x1164lod x8du52y"><div class="html-div xdj266r x14z9mp xat24cr x1lziwak xexx8yu xyri2b x18d9i69 x1c1uobl xamitd3 x1r8uery x1iyjqo2 xs83m0k xeuugli"><div id="_r_12l_"><span aria-labelledby="_r_12k_"><div class="x6s0dn4 x78zum5"><div class="xamitd3 x2lah0s x1kmanbg"><img data-imgperflogname="feedImage" class="x1y5e3q9 x1obq294 x5a5i1n xde0f50 x15x8krk x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x178xt8z x1lun4ml xso031l xpilrb4 x1lliihq x4zw9a1 x19kjcj4 xh8yej3 x1exxf4d xpv9jar x1nb4dca x1nmn18 xm47w4j" alt="" aria-hidden="true" referrerpolicy="origin-when-cross-origin" src="https://scontent.ftam1-1.fna.fbcdn....uQ6v2ZVWnt_uQuIh2UPnbdyOArUXw&amp;oe=6A2924DB"></div><div class="x1g0dm76"><div class="x78zum5 xdt5ytf xz62fqu x16ldp7u"><div class="xu06os2 x1ok221b"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lliihq x1s928wv xhkezso x1gmr53x x1cpjm7i x1fgarty x1943h6x xudqn12 x3x7a5m x6prxxf xvq8zen xk50ysn xzsf02u x1yc453h" dir="auto"><span class="x1lliihq x6ikm8r x10wlt62 x1n2onr6" style="-webkit-box-orient: vertical; -webkit-line-clamp: 3; display: -webkit-box;">Las Mejores Piernas están en #KFC</span></span></div><div class="xu06os2 x1ok221b"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lliihq x1s928wv xhkezso x1gmr53x x1cpjm7i x1fgarty x1943h6x x4zkp8e x3x7a5m x1nxh6w3 x1sibtaa xo1l8bm xi81zsa x1yc453h" dir="auto"><span class="x1lliihq x6ikm8r x10wlt62 x1n2onr6 x1j85h84" style="-webkit-box-orient: vertical; -webkit-line-clamp: 2; display: -webkit-box;"><div class="x1kyqaxf">kfc.com.mx</div></span></span></div></div></div></div></span></div></div></div><div class="x1ey2m1c xtijo5x x1o0tod xg01cxk x47corl x10l6tqk x13vifvy x1ebt8du x19991ni x1dhq9h x1fmog5m xu25z0z x140muxe xo1y3bh" role="none" data-visualcompletion="ignore" style="inset: 0px;"></div></a>
I can’t safely give a reliable generic rule from this snippet alone

This looks like a Facebook sponsored/outbound card, but the class names are heavily obfuscated and unstable. A generic cosmetic rule based on those random x... classes would likely break quickly or hide normal content.

What is stable in your snippet
  • The outbound redirect pattern: href^="https://l.facebook.com/l.php"
  • The visible domain text: kfc.com.mx

If you only want this exact card/domain

A domain-specific rule could be:

Code:
facebook.com##a[href^="https://l.facebook.com/l.php"]:has-text(kfc.com.mx)

Important limitation

That is not a good fully generic rule for all similar Facebook items, because many legitimate outbound links also use l.facebook.com/l.php.

Safer conclusion

From this HTML alone, I cannot safely derive a broad generic rule without a high risk of false positives. The better approach is to anchor the rule to a stable sponsored label, aria text, or a consistent parent container from the live DOM.

Next step

Please capture the parent element that includes the sponsored marker or the surrounding feed unit container. That is usually what makes a Facebook cosmetic rule reliable.
 
Upvote 0
Please capture the parent element that includes the sponsored marker or the surrounding feed unit container. That is usually what makes a Facebook cosmetic rule reliable.
<div class="x1n2onr6"><a class="x1i10hfl x1qjc9v5 xjbqb8w xjqpnuy xc5r6h4 xqeqjp1 x1phubyo x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x972fbf x10w94by x1qhh985 x14e42zd x9f619 x1ypdohk xdl72j9 x2lah0s x3ct3a4 xdj266r x14z9mp xat24cr x1lziwak x2lwn1j xeuugli xexx8yu xyri2b x18d9i69 x1c1uobl x1n2onr6 x16tdsg8 x1hl2dhg xggy1nq x1ja2u2z x1t137rt x1fmog5m xu25z0z x140muxe xo1y3bh x1q0g3np x87ps6o x1lku1pv x1rg5ohu x1a2a7pz x1pdlv7q" href="KFC Mexico | Home" rel="nofollow noreferrer license" role="link" tabindex="0" target="_blank"><div class="html-div x78zum5 x1i5p2am x1whfx0g xr2y4jy x1ihp6rs x972fbf x10w94by x1qhh985 x14e42zd x1ypdohk xjb2p0i xdj266r x1xegmmw xat24cr x13fj5qh x1yc453h x1y1aw1k xf159sx xwib8y2 xmzvs34 x1164lod x8du52y"><div class="html-div xdj266r x14z9mp xat24cr x1lziwak xexx8yu xyri2b x18d9i69 x1c1uobl xamitd3 x1r8uery x1iyjqo2 xs83m0k xeuugli"><div id="_r_12l_"><span aria-labelledby="_r_12k_"><div class="x6s0dn4 x78zum5"><div class="xamitd3 x2lah0s x1kmanbg"><img data-imgperflogname="feedImage" class="x1y5e3q9 x1obq294 x5a5i1n xde0f50 x15x8krk x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x178xt8z x1lun4ml xso031l xpilrb4 x1lliihq x4zw9a1 x19kjcj4 xh8yej3 x1exxf4d xpv9jar x1nb4dca x1nmn18 xm47w4j" alt="" aria-hidden="true" referrerpolicy="origin-when-cross-origin" src="https://scontent.ftam1-1.fna.fbcdn....uQ6v2ZVWnt_uQuIh2UPnbdyOArUXw&amp;oe=6A2924DB"></div><div class="x1g0dm76"><div class="x78zum5 xdt5ytf xz62fqu x16ldp7u"><div class="xu06os2 x1ok221b"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lliihq x1s928wv xhkezso x1gmr53x x1cpjm7i x1fgarty x1943h6x xudqn12 x3x7a5m x6prxxf xvq8zen xk50ysn xzsf02u x1yc453h" dir="auto"><span class="x1lliihq x6ikm8r x10wlt62 x1n2onr6" style="-webkit-box-orient: vertical; -webkit-line-clamp: 3; display: -webkit-box;">Las Mejores Piernas están en #KFC</span></span></div><div class="xu06os2 x1ok221b"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lliihq x1s928wv xhkezso x1gmr53x x1cpjm7i x1fgarty x1943h6x x4zkp8e x3x7a5m x1nxh6w3 x1sibtaa xo1l8bm xi81zsa x1yc453h" dir="auto"><span class="x1lliihq x6ikm8r x10wlt62 x1n2onr6 x1j85h84" style="-webkit-box-orient: vertical; -webkit-line-clamp: 2; display: -webkit-box;"><div class="x1kyqaxf">kfc.com.mx</div></span></span></div></div></div></div></span></div></div></div><div class="x1ey2m1c xtijo5x x1o0tod xg01cxk x47corl x10l6tqk x13vifvy x1ebt8du x19991ni x1dhq9h x1fmog5m xu25z0z x140muxe xo1y3bh" role="none" data-visualcompletion="ignore" style="inset: 0px;"></div></a><div class="x6s0dn4 x1ey2m1c x78zum5 xdg88n9 x10l6tqk x13vifvy"><div class="x1qvwoe0 xjm9jq1 x10l6tqk x1i1rx1s"><span aria-labelledby="_r_16d_"><div aria-expanded="false" aria-haspopup="menu" aria-label="Abrir menú para el contenido patrocinado de KFC" class="x1i10hfl xjqpnuy xc5r6h4 xqeqjp1 x1phubyo x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x1ypdohk xdl72j9 x2lah0s x3ct3a4 xdj266r x14z9mp xat24cr x1lziwak x2lwn1j xeuugli x16tdsg8 x1hl2dhg xggy1nq x1ja2u2z x1t137rt x1q0g3np x87ps6o x1lku1pv x1a2a7pz x6s0dn4 x1iwo8zk x1033uif x179ill4 x1b60jn0 x972fbf x10w94by x1qhh985 x14e42zd x9f619 x78zum5 xl56j7k xexx8yu xyri2b x18d9i69 x1c1uobl x1n2onr6 x1vqgdyp x100vrsf x9bbmet x10f5nwc xi81zsa" role="button" tabindex="0"><svg viewBox="0 0 20 20" width="20" height="20" fill="currentColor" aria-hidden="true" class="x14rh7hd x1lliihq x1tzjh5l x1k90msu x2h7rmj x1qfuztq" style="--x-color: var(--secondary-icon);"><g fill-rule="evenodd" transform="translate(-446 -350)"><path d="M458 360a2 2 0 1 1-4 0 2 2 0 0 1 4 0m6 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-12 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0"></path></g></svg><div class="x1ey2m1c xtijo5x x1o0tod xg01cxk x47corl x10l6tqk x13vifvy x1ebt8du x19991ni x1dhq9h x1iwo8zk x1033uif x179ill4 x1b60jn0" role="none" data-visualcompletion="ignore"></div></div></span></div></div></div>
 
Upvote 0
<div class="x1n2onr6"><a class="x1i10hfl x1qjc9v5 xjbqb8w xjqpnuy xc5r6h4 xqeqjp1 x1phubyo x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x972fbf x10w94by x1qhh985 x14e42zd x9f619 x1ypdohk xdl72j9 x2lah0s x3ct3a4 xdj266r x14z9mp xat24cr x1lziwak x2lwn1j xeuugli xexx8yu xyri2b x18d9i69 x1c1uobl x1n2onr6 x16tdsg8 x1hl2dhg xggy1nq x1ja2u2z x1t137rt x1fmog5m xu25z0z x140muxe xo1y3bh x1q0g3np x87ps6o x1lku1pv x1rg5ohu x1a2a7pz x1pdlv7q" href="KFC Mexico | Home" rel="nofollow noreferrer license" role="link" tabindex="0" target="_blank"><div class="html-div x78zum5 x1i5p2am x1whfx0g xr2y4jy x1ihp6rs x972fbf x10w94by x1qhh985 x14e42zd x1ypdohk xjb2p0i xdj266r x1xegmmw xat24cr x13fj5qh x1yc453h x1y1aw1k xf159sx xwib8y2 xmzvs34 x1164lod x8du52y"><div class="html-div xdj266r x14z9mp xat24cr x1lziwak xexx8yu xyri2b x18d9i69 x1c1uobl xamitd3 x1r8uery x1iyjqo2 xs83m0k xeuugli"><div id="_r_12l_"><span aria-labelledby="_r_12k_"><div class="x6s0dn4 x78zum5"><div class="xamitd3 x2lah0s x1kmanbg"><img data-imgperflogname="feedImage" class="x1y5e3q9 x1obq294 x5a5i1n xde0f50 x15x8krk x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x178xt8z x1lun4ml xso031l xpilrb4 x1lliihq x4zw9a1 x19kjcj4 xh8yej3 x1exxf4d xpv9jar x1nb4dca x1nmn18 xm47w4j" alt="" aria-hidden="true" referrerpolicy="origin-when-cross-origin" src="https://scontent.ftam1-1.fna.fbcdn....uQ6v2ZVWnt_uQuIh2UPnbdyOArUXw&amp;oe=6A2924DB"></div><div class="x1g0dm76"><div class="x78zum5 xdt5ytf xz62fqu x16ldp7u"><div class="xu06os2 x1ok221b"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lliihq x1s928wv xhkezso x1gmr53x x1cpjm7i x1fgarty x1943h6x xudqn12 x3x7a5m x6prxxf xvq8zen xk50ysn xzsf02u x1yc453h" dir="auto"><span class="x1lliihq x6ikm8r x10wlt62 x1n2onr6" style="-webkit-box-orient: vertical; -webkit-line-clamp: 3; display: -webkit-box;">Las Mejores Piernas están en #KFC</span></span></div><div class="xu06os2 x1ok221b"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lliihq x1s928wv xhkezso x1gmr53x x1cpjm7i x1fgarty x1943h6x x4zkp8e x3x7a5m x1nxh6w3 x1sibtaa xo1l8bm xi81zsa x1yc453h" dir="auto"><span class="x1lliihq x6ikm8r x10wlt62 x1n2onr6 x1j85h84" style="-webkit-box-orient: vertical; -webkit-line-clamp: 2; display: -webkit-box;"><div class="x1kyqaxf">kfc.com.mx</div></span></span></div></div></div></div></span></div></div></div><div class="x1ey2m1c xtijo5x x1o0tod xg01cxk x47corl x10l6tqk x13vifvy x1ebt8du x19991ni x1dhq9h x1fmog5m xu25z0z x140muxe xo1y3bh" role="none" data-visualcompletion="ignore" style="inset: 0px;"></div></a><div class="x6s0dn4 x1ey2m1c x78zum5 xdg88n9 x10l6tqk x13vifvy"><div class="x1qvwoe0 xjm9jq1 x10l6tqk x1i1rx1s"><span aria-labelledby="_r_16d_"><div aria-expanded="false" aria-haspopup="menu" aria-label="Abrir menú para el contenido patrocinado de KFC" class="x1i10hfl xjqpnuy xc5r6h4 xqeqjp1 x1phubyo x13fuv20 x18b5jzi x1q0q8m5 x1t7ytsu x1ypdohk xdl72j9 x2lah0s x3ct3a4 xdj266r x14z9mp xat24cr x1lziwak x2lwn1j xeuugli x16tdsg8 x1hl2dhg xggy1nq x1ja2u2z x1t137rt x1q0g3np x87ps6o x1lku1pv x1a2a7pz x6s0dn4 x1iwo8zk x1033uif x179ill4 x1b60jn0 x972fbf x10w94by x1qhh985 x14e42zd x9f619 x78zum5 xl56j7k xexx8yu xyri2b x18d9i69 x1c1uobl x1n2onr6 x1vqgdyp x100vrsf x9bbmet x10f5nwc xi81zsa" role="button" tabindex="0"><svg viewBox="0 0 20 20" width="20" height="20" fill="currentColor" aria-hidden="true" class="x14rh7hd x1lliihq x1tzjh5l x1k90msu x2h7rmj x1qfuztq" style="--x-color: var(--secondary-icon);"><g fill-rule="evenodd" transform="translate(-446 -350)"><path d="M458 360a2 2 0 1 1-4 0 2 2 0 0 1 4 0m6 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0m-12 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0"></path></g></svg><div class="x1ey2m1c xtijo5x x1o0tod xg01cxk x47corl x10l6tqk x13vifvy x1ebt8du x19991ni x1dhq9h x1iwo8zk x1033uif x179ill4 x1b60jn0" role="none" data-visualcompletion="ignore"></div></div></span></div></div></div>
This can be targeted more reliably now

The most stable part in your new snippet is the Spanish sponsored-menu label:

Code:
aria-label="Abrir menú para el contenido patrocinado de KFC"

Rule for this exact sponsored card

Code:
facebook.com##div.x1n2onr6:has([aria-label^="Abrir menú para el contenido patrocinado"])

More specific to this exact advertiser

Code:
facebook.com##div.x1n2onr6:has([aria-label="Abrir menú para el contenido patrocinado de KFC"])

Important limitation
  • div.x1n2onr6 is still a Facebook-generated class and may change.
  • The aria-label text is more stable than the random class names, but it can vary by language and UI changes.
  • So this is better than the previous attempt, but still not guaranteed long-term.

Safer generic idea

If your blocker supports it, the real generic anchor is the sponsored-menu label itself:

Code:
facebook.com##*:has([aria-label^="Abrir menú para el contenido patrocinado"])

But that may be too broad on some pages, so the first rule is usually the safer practical option.

Best choice from your snippet

Code:
facebook.com##div.x1n2onr6:has([aria-label^="Abrir menú para el contenido patrocinado"])
 
Upvote 0
@Bot This one too:
<div class="x1n2onr6 x1ja2u2z x9f619 x78zum5 xdt5ytf x2lah0s x193iq5w xjkvuk6 x1cnzs8"><div class="x9f619 x1n2onr6 x1ja2u2z x78zum5 xdt5ytf x1iyjqo2 x2lwn1j"><div class="x9f619 x1n2onr6 x1ja2u2z x78zum5 xdt5ytf x2lah0s x193iq5w xf7dkkf xv54qhq"><div class="x78zum5 xdt5ytf xz62fqu x16ldp7u"><div class="xu06os2 x1ok221b"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lliihq x1s928wv xhkezso x1gmr53x x1cpjm7i x1fgarty x1943h6x xudqn12 x676frb x1lkfr7t x1lbecb7 x1s688f xzsf02u" dir="auto"><div class="x9f619 x1ja2u2z x78zum5 x2lah0s x1n2onr6 x1qughib x6s0dn4 xozqiw3 x1q0g3np xzt5al7"><div class="x9f619 x1n2onr6 x1ja2u2z x78zum5 xdt5ytf x193iq5w xeuugli x1r8uery x1iyjqo2 xs83m0k"><h3 class="html-h3 xdj266r x14z9mp xat24cr x1lziwak xexx8yu xyri2b x18d9i69 x1c1uobl x1vvkbs x1heor9g x1qlqyl8 x1pd3egz x1a2a7pz x193iq5w xeuugli"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lkfr7t x1lbecb7 x1s688f xi81zsa"><span class="x1lliihq x6ikm8r x10wlt62 x1n2onr6 x1j85h84" style="-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box">Publicidad</span></span></h3></div><div class="x9f619 x1n2onr6 x1ja2u2z x2lah0s x193iq5w xeuugli xqcrz7y x78zum5 xdt5ytf xl56j7k x13fj5qh"><div class="x9f619 x1ja2u2z x78zum5 x2lah0s x1n2onr6 x1qughib x6s0dn4 xozqiw3 x1q0g3np"><div class="x9f619 x1n2onr6 x1ja2u2z x78zum5 xdt5ytf x2lah0s x193iq5w xeuugli xlshs6z xnalus7">&nbsp;</div><div class="x9f619 x1n2onr6 x1ja2u2z x78zum5 xdt5ytf x2lah0s x193iq5w xeuugli"><div class="x9f619 x1ja2u2z x78zum5 x2lah0s x1n2onr6 x1qughib x1qjc9v5 xozqiw3 x1q0g3np"></div></div></div></div></div></span></div></div></div></div></div>
 
Upvote 0
@Bot This one too:
<div class="x1n2onr6 x1ja2u2z x9f619 x78zum5 xdt5ytf x2lah0s x193iq5w xjkvuk6 x1cnzs8"><div class="x9f619 x1n2onr6 x1ja2u2z x78zum5 xdt5ytf x1iyjqo2 x2lwn1j"><div class="x9f619 x1n2onr6 x1ja2u2z x78zum5 xdt5ytf x2lah0s x193iq5w xf7dkkf xv54qhq"><div class="x78zum5 xdt5ytf xz62fqu x16ldp7u"><div class="xu06os2 x1ok221b"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lliihq x1s928wv xhkezso x1gmr53x x1cpjm7i x1fgarty x1943h6x xudqn12 x676frb x1lkfr7t x1lbecb7 x1s688f xzsf02u" dir="auto"><div class="x9f619 x1ja2u2z x78zum5 x2lah0s x1n2onr6 x1qughib x6s0dn4 xozqiw3 x1q0g3np xzt5al7"><div class="x9f619 x1n2onr6 x1ja2u2z x78zum5 xdt5ytf x193iq5w xeuugli x1r8uery x1iyjqo2 xs83m0k"><h3 class="html-h3 xdj266r x14z9mp xat24cr x1lziwak xexx8yu xyri2b x18d9i69 x1c1uobl x1vvkbs x1heor9g x1qlqyl8 x1pd3egz x1a2a7pz x193iq5w xeuugli"><span class="x193iq5w xeuugli x13faqbe x1vvkbs x1xmvt09 x1lkfr7t x1lbecb7 x1s688f xi81zsa"><span class="x1lliihq x6ikm8r x10wlt62 x1n2onr6 x1j85h84" style="-webkit-box-orient:vertical;-webkit-line-clamp:2;display:-webkit-box">Publicidad</span></span></h3></div><div class="x9f619 x1n2onr6 x1ja2u2z x2lah0s x193iq5w xeuugli xqcrz7y x78zum5 xdt5ytf xl56j7k x13fj5qh"><div class="x9f619 x1ja2u2z x78zum5 x2lah0s x1n2onr6 x1qughib x6s0dn4 xozqiw3 x1q0g3np"><div class="x9f619 x1n2onr6 x1ja2u2z x78zum5 xdt5ytf x2lah0s x193iq5w xeuugli xlshs6z xnalus7">&nbsp;</div><div class="x9f619 x1n2onr6 x1ja2u2z x78zum5 xdt5ytf x2lah0s x193iq5w xeuugli"><div class="x9f619 x1ja2u2z x78zum5 x2lah0s x1n2onr6 x1qughib x1qjc9v5 xozqiw3 x1q0g3np"></div></div></div></div></div></span></div></div></div></div></div>
Possible generic rule

This snippet has a much better stable marker: the visible text Publicidad.

Code:
facebook.com##div:has(h3 span:has-text(Publicidad))

Safer variant

If the first one is too broad, use:

Code:
facebook.com##div.x1n2onr6:has(h3 span:has-text(Publicidad))

Why this is better
  • The random Facebook classes are not reliable long-term.
  • Publicidad is the meaningful label in your snippet.
  • A text-based anchor is usually more stable than the obfuscated class names.

Important limitation
  • This depends on the Facebook interface language being Spanish.
  • If Facebook changes the label text or nesting, the rule will need adjustment.
  • A very broad :has-text(Publicidad) selector can hide non-ad elements on some pages if reused too widely.

Best choice from this snippet

Code:
facebook.com##div:has(h3 span:has-text(Publicidad))
 
Upvote 0