No longer blocking Facebook suggested posts

Wittier

Member
OK, please remove the previous rule and try this version, works on all interface languages when I tested and avoids blocking good content like previous one:

Code:
facebook.com#%#!function(){var e=new MutationObserver(function(){document.querySelectorAll('div[id^="substream_"] div[id^="hyperfeed_story_id"]').forEach(function(e){function o(e,o){for(s=e.querySelectorAll("i[class]"),socheck=0;socheck<s.length;socheck++)s[socheck].innerText.contains(o)&&(i=["1"],c=["1"],d=["1"],l=r=a=1,socheck=s.length)}function t(e,o,t,n,a){s=e.querySelectorAll('.userContentWrapper div[id^="fbfeed"][id*="sub_header_id"] a [data-content='+o+"]"),i=e.querySelectorAll('.userContentWrapper div[id^="fbfeed"][id*="sub_header_id"] a [data-content='+t+"]"),c=e.querySelectorAll('.userContentWrapper div[id^="fbfeed"][id*="sub_header_id"] a [data-content='+n+"]"),d=e.querySelectorAll('.userContentWrapper div[id^="fbfeed"][id*="sub_header_id"] a [data-content='+a+"]")}var n=0,a=0,r=0,l=0,s=0,i=0,c=0,d=0,u=document.querySelector("[lang]").lang,h=e.querySelectorAll('a[ajaxify*="ad_id"] > span'),f=e.querySelectorAll('a[href*="ads/about"]');if("display: none !important;"!=e.getAttribute("style")){if(0<h.length||0<f.length){console.log("--------"),p+=1;var g=e.querySelectorAll("a[href]")[2].innerText;console.log("Ad hidden from: "+g),console.log("Total ads hidden: "+p),console.log("F length: "+h.length),console.log("H length: "+f.length),console.log("--------"),e.style="display:none!important;"}if("display: none !important;"!=e.getAttribute("style")&&("af"==u?o(e,"Geborg"):"de"==u||"nl"==u?t(e,"G","e","s","n"):"am"==u?o(e,"የተከፈለበት ማስታወቂያ"):"ar"==u?o(e,"مُموَّل"):"as"==u?o(e,"পৃষ্ঠপোষকতা কৰা"):"az"==u?o(e,"Sponsor dəstəkli"):"co"==u?o(e,"Spunsurizatu"):"bs"==u||"sl"==u||"cs"==u?t(e,"S","p","z","n"):"da"==u||"en"==u||"et"==u||"fy"==u||"it"==u||"ku"==u||"nb"==u||"nn"==u||"pl"==u||"sq"==u||"sv"==u||"zz"==u?document.querySelector("body").className.includes("Locale_en_UD")?o(e,"pəɹosuodS"):t(e,"S","p","s","n"):"be"==u?o(e,"Рэклама"):"bg"==u?o(e,"Спонсорирано"):"mk"==u?o(e,"Спонзорирано"):"br"==u?o(e,"Paeroniet"):"ca"==u?o(e,"Patrocinat"):"gl"==u||"pt"==u?o(e,"Patrocinado"):"bn"==u?o(e,"সৌজন্যে"):"cb"==u?o(e,"پاڵپشتیکراو"):"cx"==u?t(e,"G","i","s","n"):"cy"==u?o(e,"Noddwyd"):"el"==u?o(e,"Χορηγούμενη"):"eo"==u?o(e,"Reklamo"):"es"==u?t(e,"P","u","c","d"):"eu"==u?o(e,"Babestua"):"fa"==u?o(e,"دارای پشتیبانی مالی"):"ff"==u?o(e,"Yoɓanaama"):"fi"==u?o(e,"Sponsoroitu"):"fo"==u?o(e,"Stuðlað"):"fr"==u?document.querySelector("body").className.includes("Locale_fr_FR")?t(e,"S","p","s","n"):t(e,"C","o","m","n"):"ga"==u?o(e,"Urraithe"):"gn"==u?o(e,"Oñepatrosinapyre"):"gu"==u?o(e,"પ્રાયોજિત"):"ha"==u?o(e,"Daukar Nauyi"):"he"==u?o(e,"ממומן"):"hr"==u?o(e,"Plaćeni oglas"):"ht"==u?o(e,"Peye"):"ne"==u||"mr"==u||"hi"==u?o(e,"प्रायोजित"):"hu"==u?t(e,"H","i","r","d"):"hy"==u?o(e,"Գովազդային"):"id"==u?t(e,"B","e","p","n"):"is"==u?o(e,"Kostað"):"ja"==u?o(e,"広告"):"ms"==u?o(e,"Ditaja"):"jv"==u?o(e,"Disponsori"):"ka"==u?o(e,"რეკლამა"):"kk"==u?o(e,"Демеушілік көрсеткен"):"km"==u?o(e,"បានឧបត្ថម្ភ"):"kn"==u?o(e,"ಪ್ರಾಯೋಜಿತ"):"ko"==u?o(e,"Sponsored"):"ky"==u?o(e,"Демөөрчүлөнгөн"):"lo"==u?o(e,"ຜູ້ສະໜັບສະໜູນ"):"lt"==u?o(e,"Remiama"):"lv"==u?o(e,"Apmaksāta reklāma"):"mg"==u?o(e,"Misy Mpiantoka"):"ml"==u?o(e,"സ്പോൺസർ ചെയ്തത്"):"mn"==u?o(e,"Ивээн тэтгэсэн"):"mt"==u?o(e,"Sponsorjat"):"my"==u?o(e,"ပံ့ပိုးထားသည်"):"or"==u?o(e,"ପ୍ରଯୋଜିତ"):"pa"==u?o(e,"ਸਰਪ੍ਰਸਤੀ ਪ੍ਰਾਪਤ"):"ps"==u?o(e,"تمويل شوي"):"ro"==u?o(e,"Sponsorizat"):"ru"==u||"uk"==u?o(e,"Реклама"):"rw"==u?o(e,"Icyamamaza ndasukirwaho"):"sc"==u?o(e,"Patronadu de"):"si"==u?o(e,"අනුග්‍රාහක"):"sk"==u?o(e,"Sponzorované"):"sn"==u?o(e,"Zvabhadharirwa"):"so"==u?o(e,"La maalgeliyey"):"sr"==u?o(e,"Спонзорисано"):"sw"==u?o(e,"Imedhaminiwa"):"sy"==u?o(e,"ܒܘܕܩܐ ܡܡܘܘܢܐ"):"sz"==u?o(e,"Szpōnzorowane"):"ta"==u?o(e,"விளம்பரம்"):"te"==u?o(e,"ప్రాయోజితం చేయబడింది"):"tg"==u?o(e,"Бо сарпарастӣ"):"th"==u?o(e,"ได้รับการสนับสนุน"):"tl"==u?o(e,"May Sponsor"):"tr"==u?o(e,"Sponsorlu"):"tt"==u?o(e,"Хәйрияче"):"tz"==u?o(e,"ⵉⴷⵍ"):"ur"==u?o(e,"سپانسرڈ"):"uz"==u?o(e,"Reklama"):"vi"==u?o(e,"Được tài trợ"):"zh-Hans"==u?o(e,"赞助内容"):"zh-Hant"==u&&o(e,"贊助"),0<s.length&&0<i.length&&0<c.length&&0<d.length)){for(cont=0;cont<s.length;cont++)0<s[cont].offsetHeight&&(n=1);for(cont1=0;cont1<i.length;cont1++)0<i[cont1].offsetHeight&&(a=1);for(cont2=0;cont2<c.length;cont2++)0<c[cont2].offsetHeight&&(r=1);for(cont3=0;cont3<d.length;cont3++)0<d[cont3].offsetHeight&&(l=1);if(1==n&&1==a&&1==r&&1==l){console.log("--------"),p+=1;g=e.querySelectorAll("a[href]")[2].innerText;console.log("Ad hidden from: "+g),console.log("Total ads hidden: "+p),console.log("--------"),e.style="display:none!important;"}}}})}),p=0;e.observe(document,{childList:!0,subtree:!0})}();
If you want to see what got hidden (when you think something good got hidden or just curious who puts ads on your news feed), please open console in browser's dev tools.
Thanks. Remove all 3 rules and then use just this 1?

Update: I did remove all 3 prior rules and added the new one and then started to see Sponsored posts. Will report back.

Update: I reinstalled rules 1 and 2 and the new one. 3rd one is not installed.
 
Last edited:

Wittier

Member
Thanks.
Removing the 3 prior rules and installing only the new one resulted in me seeing Sponsored posts again. I didn't wait too long with that.

I then reinstalled rules 1 and 2 and the new one. Currently not seeing Sponsored ads. I don't know if any of the rules were hiding desired content or not. Haven't checked.

Do you want me to go back to the new rule only, exporting the older rules?
 

Blaz

Moderator & Translator
Staff member
Moderator
Looks like some selector is different for your account. If possible, can you send me the code of the ad ( via developer tools) via PM please.
Please also check in console if you see something like f length: and total ads blocked.

This rule contains additional selectors to avoid hiding valid content which the previous ones did not.

If I remember right, you are using English interface. Is this UK, US or the third English one?
 

Wittier

Member
Looks like some selector is different for your account. If possible, can you send me the code of the ad ( via developer tools) via PM please.
Please also check in console if you see something like f length: and total ads blocked.

This rule contains additional selectors to avoid hiding valid content which the previous ones did not.

If I remember right, you are using English interface. Is this UK, US or the third English one?
Language in Facebook is English US.

The Sponsored posts started to appear just now.


This is what I have in User Filter
1567629303867.png
 

Blaz

Moderator & Translator
Staff member
Moderator
Thank you. Added rule to basic/English filter, update available in about 3 hours:
Code:
facebook.com,facebookcorewwwi.onion#%#!function(){var e=new MutationObserver(function(){document.querySelectorAll('[id^="substream"] > div:not(.hidden_elem) div[id^="hyperfeed_story_id"]').forEach(function(e){function o(e,o){for(s=e.querySelectorAll("i[class]"),socheck=0;socheck<s.length;socheck++)s[socheck].innerText.contains(o)&&(i=["1"],c=["1"],d=["1"],r=l=a=1,socheck=s.length)}function t(e,o,t,n,a){s=e.querySelectorAll('.userContentWrapper div[id*="feed"][id*="sub"] a [data-content='+o+"]"),i=e.querySelectorAll('.userContentWrapper div[id*="feed"][id*="sub"] a [data-content='+t+"]"),c=e.querySelectorAll('.userContentWrapper div[id*="feed"][id*="sub"] a [data-content='+n+"]"),d=e.querySelectorAll('.userContentWrapper div[id*="feed"][id*="sub"] a [data-content='+a+"]")}var n=0,a=0,l=0,r=0,s=0,i=0,c=0,d=0,u=document.querySelector("[lang]").lang,h=e.querySelectorAll('a[ajaxify*="ad_id"] > span'),g=e.querySelectorAll('a[href*="ads/about"]');if("display: none !important;"!=e.getAttribute("style")){if(0<h.length||0<g.length){console.log("--------"),p+=1;var f=e.querySelectorAll("a[href]")[2].innerText;console.log("Ad hidden from: "+f),console.log("Total ads hidden: "+p),console.log("F length: "+h.length),console.log("H length: "+g.length),console.log("--------"),e.style="display:none!important;"}if("display: none !important;"!=e.getAttribute("style")&&("af"==u?o(e,"Geborg"):"de"==u||"nl"==u?t(e,"G","e","s","n"):"am"==u?o(e,"የተከፈለበት ማስታወቂያ"):"ar"==u?o(e,"مُموَّل"):"as"==u?o(e,"পৃষ্ঠপোষকতা কৰা"):"az"==u?o(e,"Sponsor dəstəkli"):"co"==u?o(e,"Spunsurizatu"):"bs"==u||"sl"==u||"cs"==u?t(e,"S","p","z","n"):"da"==u||"en"==u||"et"==u||"fy"==u||"it"==u||"ku"==u||"nb"==u||"nn"==u||"pl"==u||"sq"==u||"sv"==u||"zz"==u?document.querySelector("body").className.includes("Locale_en_UD")?o(e,"pəɹosuodS"):t(e,"S","p","s","n"):"be"==u?o(e,"Рэклама"):"bg"==u?o(e,"Спонсорирано"):"mk"==u?o(e,"Спонзорирано"):"br"==u?o(e,"Paeroniet"):"ca"==u?o(e,"Patrocinat"):"gl"==u||"pt"==u?o(e,"Patrocinado"):"bn"==u?o(e,"সৌজন্যে"):"cb"==u?o(e,"پاڵپشتیکراو"):"cx"==u?t(e,"G","i","s","n"):"cy"==u?o(e,"Noddwyd"):"el"==u?o(e,"Χορηγούμενη"):"eo"==u?o(e,"Reklamo"):"es"==u?t(e,"P","u","c","d"):"eu"==u?o(e,"Babestua"):"fa"==u?o(e,"دارای پشتیبانی مالی"):"ff"==u?o(e,"Yoɓanaama"):"fi"==u?o(e,"Sponsoroitu"):"fo"==u?o(e,"Stuðlað"):"fr"==u?document.querySelector("body").className.includes("Locale_fr_FR")?t(e,"S","p","s","n"):t(e,"C","o","m","n"):"ga"==u?o(e,"Urraithe"):"gn"==u?o(e,"Oñepatrosinapyre"):"gu"==u?o(e,"પ્રાયોજિત"):"ha"==u?o(e,"Daukar Nauyi"):"he"==u?o(e,"ממומן"):"hr"==u?o(e,"Plaćeni oglas"):"ht"==u?o(e,"Peye"):"ne"==u||"mr"==u||"hi"==u?o(e,"प्रायोजित"):"hu"==u?t(e,"H","i","r","d"):"hy"==u?o(e,"Գովազդային"):"id"==u?t(e,"B","e","p","n"):"is"==u?o(e,"Kostað"):"ja"==u?o(e,"広告"):"ms"==u?o(e,"Ditaja"):"jv"==u?o(e,"Disponsori"):"ka"==u?o(e,"რეკლამა"):"kk"==u?o(e,"Демеушілік көрсеткен"):"km"==u?o(e,"បានឧបត្ថម្ភ"):"kn"==u?o(e,"ಪ್ರಾಯೋಜಿತ"):"ko"==u?o(e,"Sponsored"):"ky"==u?o(e,"Демөөрчүлөнгөн"):"lo"==u?o(e,"ຜູ້ສະໜັບສະໜູນ"):"lt"==u?o(e,"Remiama"):"lv"==u?o(e,"Apmaksāta reklāma"):"mg"==u?o(e,"Misy Mpiantoka"):"ml"==u?o(e,"സ്പോൺസർ ചെയ്തത്"):"mn"==u?o(e,"Ивээн тэтгэсэн"):"mt"==u?o(e,"Sponsorjat"):"my"==u?o(e,"ပံ့ပိုးထားသည်"):"or"==u?o(e,"ପ୍ରଯୋଜିତ"):"pa"==u?o(e,"ਸਰਪ੍ਰਸਤੀ ਪ੍ਰਾਪਤ"):"ps"==u?o(e,"تمويل شوي"):"ro"==u?o(e,"Sponsorizat"):"ru"==u||"uk"==u?o(e,"Реклама"):"rw"==u?o(e,"Icyamamaza ndasukirwaho"):"sc"==u?o(e,"Patronadu de"):"si"==u?o(e,"අනුග්‍රාහක"):"sk"==u?o(e,"Sponzorované"):"sn"==u?o(e,"Zvabhadharirwa"):"so"==u?o(e,"La maalgeliyey"):"sr"==u?o(e,"Спонзорисано"):"sw"==u?o(e,"Imedhaminiwa"):"sy"==u?o(e,"ܒܘܕܩܐ ܡܡܘܘܢܐ"):"sz"==u?o(e,"Szpōnzorowane"):"ta"==u?o(e,"விளம்பரம்"):"te"==u?o(e,"ప్రాయోజితం చేయబడింది"):"tg"==u?o(e,"Бо сарпарастӣ"):"th"==u?o(e,"ได้รับการสนับสนุน"):"tl"==u?o(e,"May Sponsor"):"tr"==u?o(e,"Sponsorlu"):"tt"==u?o(e,"Хәйрияче"):"tz"==u?o(e,"ⵉⴷⵍ"):"ur"==u?o(e,"سپانسرڈ"):"uz"==u?o(e,"Reklama"):"vi"==u?o(e,"Được tài trợ"):"zh-Hans"==u?o(e,"赞助内容"):"zh-Hant"==u&&o(e,"贊助"),0<s.length&&0<i.length&&0<c.length&&0<d.length)){for(cont=0;cont<s.length;cont++)0<s[cont].offsetHeight&&(n=1);for(cont1=0;cont1<i.length;cont1++)0<i[cont1].offsetHeight&&(a=1);for(cont2=0;cont2<c.length;cont2++)0<c[cont2].offsetHeight&&(l=1);for(cont3=0;cont3<d.length;cont3++)0<d[cont3].offsetHeight&&(r=1);if(1==n&&1==a&&1==l&&1==r){console.log("--------"),p+=1;f=e.querySelectorAll("a[href]")[2].innerText;console.log("Ad hidden from: "+f),console.log("Total ads hidden: "+p),console.log("--------"),e.style="display:none!important;"}}}})}),p=0;e.observe(document,{childList:!0,subtree:!0})}();
 

Blaz

Moderator & Translator
Staff member
Moderator
Tweaked the rule a bit, sometimes it could hide useful content:
Code:
facebook.com,facebookcorewwwi.onion#%#!function(){var e=new MutationObserver(function(){document.querySelectorAll('[id^="substream"] div[id^="hyperfeed_story_id"]').forEach(function(e){function o(e,o){for(s=e.querySelectorAll("i[class]"),socheck=0;socheck<s.length;socheck++)s[socheck].innerText.contains(o)&&(i=["1"],c=["1"],d=["1"],r=l=a=1,socheck=s.length)}function t(e,o,t,n,a){s=e.querySelectorAll('.userContentWrapper h5 + div[id*="feed"][id*="sub"] a [data-content='+o+"]"),i=e.querySelectorAll('.userContentWrapper h5 + div[id*="feed"][id*="sub"] a [data-content='+t+"]"),c=e.querySelectorAll('.userContentWrapper h5 + div[id*="feed"][id*="sub"] a [data-content='+n+"]"),d=e.querySelectorAll('.userContentWrapper h5 + div[id*="feed"][id*="sub"] a [data-content='+a+"]")}var n=0,a=0,l=0,r=0,s=0,i=0,c=0,d=0,u=document.querySelector("[lang]").lang,h=e.querySelectorAll('a[ajaxify*="ad_id"] > span'),g=e.querySelectorAll('a[href*="ads/about"]');if("display: none !important;"!=e.getAttribute("style")){if(0<h.length||0<g.length){console.log("--------"),p+=1;var f=e.querySelectorAll("a[href]")[2].innerText;console.log("Ad hidden from: "+f),console.log("Total ads hidden: "+p),console.log("F length: "+h.length),console.log("H length: "+g.length),console.log("--------"),e.style="display:none!important;"}if("display: none !important;"!=e.getAttribute("style")&&("af"==u?o(e,"Geborg"):"de"==u||"nl"==u?t(e,"G","e","s","n"):"am"==u?o(e,"የተከፈለበት ማስታወቂያ"):"ar"==u?o(e,"مُموَّل"):"as"==u?o(e,"পৃষ্ঠপোষকতা কৰা"):"az"==u?o(e,"Sponsor dəstəkli"):"co"==u?o(e,"Spunsurizatu"):"bs"==u||"sl"==u||"cs"==u?t(e,"S","p","z","n"):"da"==u||"en"==u||"et"==u||"fy"==u||"it"==u||"ku"==u||"nb"==u||"nn"==u||"pl"==u||"sq"==u||"sv"==u||"zz"==u?document.querySelector("body").className.includes("Locale_en_UD")?o(e,"pəɹosuodS"):t(e,"S","p","s","n"):"be"==u?o(e,"Рэклама"):"bg"==u?o(e,"Спонсорирано"):"mk"==u?o(e,"Спонзорирано"):"br"==u?o(e,"Paeroniet"):"ca"==u?o(e,"Patrocinat"):"gl"==u||"pt"==u?o(e,"Patrocinado"):"bn"==u?o(e,"সৌজন্যে"):"cb"==u?o(e,"پاڵپشتیکراو"):"cx"==u?t(e,"G","i","s","n"):"cy"==u?o(e,"Noddwyd"):"el"==u?o(e,"Χορηγούμενη"):"eo"==u?o(e,"Reklamo"):"es"==u?t(e,"P","u","c","d"):"eu"==u?o(e,"Babestua"):"fa"==u?o(e,"دارای پشتیبانی مالی"):"ff"==u?o(e,"Yoɓanaama"):"fi"==u?o(e,"Sponsoroitu"):"fo"==u?o(e,"Stuðlað"):"fr"==u?document.querySelector("body").className.includes("Locale_fr_FR")?t(e,"S","p","s","n"):t(e,"C","o","m","n"):"ga"==u?o(e,"Urraithe"):"gn"==u?o(e,"Oñepatrosinapyre"):"gu"==u?o(e,"પ્રાયોજિત"):"ha"==u?o(e,"Daukar Nauyi"):"he"==u?o(e,"ממומן"):"hr"==u?o(e,"Plaćeni oglas"):"ht"==u?o(e,"Peye"):"ne"==u||"mr"==u||"hi"==u?o(e,"प्रायोजित"):"hu"==u?t(e,"H","i","r","d"):"hy"==u?o(e,"Գովազդային"):"id"==u?t(e,"B","e","p","n"):"is"==u?o(e,"Kostað"):"ja"==u?o(e,"広告"):"ms"==u?o(e,"Ditaja"):"jv"==u?o(e,"Disponsori"):"ka"==u?o(e,"რეკლამა"):"kk"==u?o(e,"Демеушілік көрсеткен"):"km"==u?o(e,"បានឧបត្ថម្ភ"):"kn"==u?o(e,"ಪ್ರಾಯೋಜಿತ"):"ko"==u?o(e,"Sponsored"):"ky"==u?o(e,"Демөөрчүлөнгөн"):"lo"==u?o(e,"ຜູ້ສະໜັບສະໜູນ"):"lt"==u?o(e,"Remiama"):"lv"==u?o(e,"Apmaksāta reklāma"):"mg"==u?o(e,"Misy Mpiantoka"):"ml"==u?o(e,"സ്പോൺസർ ചെയ്തത്"):"mn"==u?o(e,"Ивээн тэтгэсэн"):"mt"==u?o(e,"Sponsorjat"):"my"==u?o(e,"ပံ့ပိုးထားသည်"):"or"==u?o(e,"ପ୍ରଯୋଜିତ"):"pa"==u?o(e,"ਸਰਪ੍ਰਸਤੀ ਪ੍ਰਾਪਤ"):"ps"==u?o(e,"تمويل شوي"):"ro"==u?o(e,"Sponsorizat"):"ru"==u||"uk"==u?o(e,"Реклама"):"rw"==u?o(e,"Icyamamaza ndasukirwaho"):"sc"==u?o(e,"Patronadu de"):"si"==u?o(e,"අනුග්‍රාහක"):"sk"==u?o(e,"Sponzorované"):"sn"==u?o(e,"Zvabhadharirwa"):"so"==u?o(e,"La maalgeliyey"):"sr"==u?o(e,"Спонзорисано"):"sw"==u?o(e,"Imedhaminiwa"):"sy"==u?o(e,"ܒܘܕܩܐ ܡܡܘܘܢܐ"):"sz"==u?o(e,"Szpōnzorowane"):"ta"==u?o(e,"விளம்பரம்"):"te"==u?o(e,"ప్రాయోజితం చేయబడింది"):"tg"==u?o(e,"Бо сарпарастӣ"):"th"==u?o(e,"ได้รับการสนับสนุน"):"tl"==u?o(e,"May Sponsor"):"tr"==u?o(e,"Sponsorlu"):"tt"==u?o(e,"Хәйрияче"):"tz"==u?o(e,"ⵉⴷⵍ"):"ur"==u?o(e,"سپانسرڈ"):"uz"==u?o(e,"Reklama"):"vi"==u?o(e,"Được tài trợ"):"zh-Hans"==u?o(e,"赞助内容"):"zh-Hant"==u&&o(e,"贊助"),0<s.length&&0<i.length&&0<c.length&&0<d.length)){for(cont=0;cont<s.length;cont++)0<s[cont].offsetHeight&&(n=1);for(cont1=0;cont1<i.length;cont1++)0<i[cont1].offsetHeight&&(a=1);for(cont2=0;cont2<c.length;cont2++)0<c[cont2].offsetHeight&&(l=1);for(cont3=0;cont3<d.length;cont3++)0<d[cont3].offsetHeight&&(r=1);if(1==n&&1==a&&1==l&&1==r){f=e.querySelectorAll("a[href]")[2].innerText;p+=1,console.log("--------"),console.log("Ad hidden from: "+f),console.log("Total ads hidden: "+p),console.log("--------"),e.style="display:none!important;"}}}})}),p=0;e.observe(document,{childList:!0,subtree:!0})}();
 

Blaz

Moderator & Translator
Staff member
Moderator
Rule updated, available in about 3 hours (covers more accounts):
Code:
facebook.com,facebookcorewwwi.onion#%#!function(){var e=new MutationObserver(function(){document.querySelectorAll('[id^="substream"] div[id^="hyperfeed_story_id"]').forEach(function(e){function t(e,t){for(s=e.querySelectorAll("i[class]"),socheck=0;socheck<s.length;socheck++)s[socheck].innerText.contains(t)&&(c=["1"],i=["1"],d=["1"],r=l=a=1,socheck=s.length)}function o(e,t,o,n,a){s=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="sub"] a [data-content='+t+"]"),c=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="sub"] a [data-content='+o+"]"),i=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="sub"] a [data-content='+n+"]"),d=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="sub"] a [data-content='+a+"]")}var n=0,a=0,l=0,r=0,s=0,c=0,i=0,d=0,u=document.querySelector("[lang]").lang,h=e.querySelectorAll('a[ajaxify*="ad_id"] > span'),g=e.querySelectorAll('a[href*="ads/about"]');if("display: none !important;"!=e.getAttribute("style")){if(0<h.length||0<g.length){console.log("--------"),y+=1;var p=e.querySelectorAll("a[href]")[2].innerText;console.log("Ad hidden from: "+p),console.log("Total ads hidden: "+y),console.log("F length: "+h.length),console.log("H length: "+g.length),console.log("--------"),e.style="display:none!important;"}if("display: none !important;"!=e.getAttribute("style")&&("af"==u?t(e,"Geborg"):"de"==u||"nl"==u?o(e,"G","e","s","n"):"am"==u?t(e,"የተከፈለበት ማስታወቂያ"):"ar"==u?t(e,"مُموَّل"):"as"==u?t(e,"পৃষ্ঠপোষকতা কৰা"):"az"==u?t(e,"Sponsor dəstəkli"):"co"==u?t(e,"Spunsurizatu"):"bs"==u||"sl"==u||"cs"==u?o(e,"S","p","z","n"):"da"==u||"en"==u||"et"==u||"fy"==u||"it"==u||"ku"==u||"nb"==u||"nn"==u||"pl"==u||"sq"==u||"sv"==u||"zz"==u?document.querySelector("body").className.includes("Locale_en_UD")?t(e,"pəɹosuodS"):o(e,"S","p","s","n"):"be"==u?t(e,"Рэклама"):"bg"==u?t(e,"Спонсорирано"):"mk"==u?t(e,"Спонзорирано"):"br"==u?t(e,"Paeroniet"):"ca"==u?t(e,"Patrocinat"):"gl"==u||"pt"==u?t(e,"Patrocinado"):"bn"==u?t(e,"সৌজন্যে"):"cb"==u?t(e,"پاڵپشتیکراو"):"cx"==u?o(e,"G","i","s","n"):"cy"==u?t(e,"Noddwyd"):"el"==u?t(e,"Χορηγούμενη"):"eo"==u?t(e,"Reklamo"):"es"==u?o(e,"P","u","c","d"):"eu"==u?t(e,"Babestua"):"fa"==u?t(e,"دارای پشتیبانی مالی"):"ff"==u?t(e,"Yoɓanaama"):"fi"==u?t(e,"Sponsoroitu"):"fo"==u?t(e,"Stuðlað"):"fr"==u?document.querySelector("body").className.includes("Locale_fr_FR")?o(e,"S","p","s","n"):o(e,"C","o","m","n"):"ga"==u?t(e,"Urraithe"):"gn"==u?t(e,"Oñepatrosinapyre"):"gu"==u?t(e,"પ્રાયોજિત"):"ha"==u?t(e,"Daukar Nauyi"):"he"==u?t(e,"ממומן"):"hr"==u?t(e,"Plaćeni oglas"):"ht"==u?t(e,"Peye"):"ne"==u||"mr"==u||"hi"==u?t(e,"प्रायोजित"):"hu"==u?o(e,"H","i","r","d"):"hy"==u?t(e,"Գովազդային"):"id"==u?o(e,"B","e","p","n"):"is"==u?t(e,"Kostað"):"ja"==u?t(e,"広告"):"ms"==u?t(e,"Ditaja"):"jv"==u?t(e,"Disponsori"):"ka"==u?t(e,"რეკლამა"):"kk"==u?t(e,"Демеушілік көрсеткен"):"km"==u?t(e,"បានឧបត្ថម្ភ"):"kn"==u?t(e,"ಪ್ರಾಯೋಜಿತ"):"ko"==u?t(e,"Sponsored"):"ky"==u?t(e,"Демөөрчүлөнгөн"):"lo"==u?t(e,"ຜູ້ສະໜັບສະໜູນ"):"lt"==u?t(e,"Remiama"):"lv"==u?t(e,"Apmaksāta reklāma"):"mg"==u?t(e,"Misy Mpiantoka"):"ml"==u?t(e,"സ്പോൺസർ ചെയ്തത്"):"mn"==u?t(e,"Ивээн тэтгэсэн"):"mt"==u?t(e,"Sponsorjat"):"my"==u?t(e,"ပံ့ပိုးထားသည်"):"or"==u?t(e,"ପ୍ରଯୋଜିତ"):"pa"==u?t(e,"ਸਰਪ੍ਰਸਤੀ ਪ੍ਰਾਪਤ"):"ps"==u?t(e,"تمويل شوي"):"ro"==u?t(e,"Sponsorizat"):"ru"==u||"uk"==u?t(e,"Реклама"):"rw"==u?t(e,"Icyamamaza ndasukirwaho"):"sc"==u?t(e,"Patronadu de"):"si"==u?t(e,"අනුග්‍රාහක"):"sk"==u?t(e,"Sponzorované"):"sn"==u?t(e,"Zvabhadharirwa"):"so"==u?t(e,"La maalgeliyey"):"sr"==u?t(e,"Спонзорисано"):"sw"==u?t(e,"Imedhaminiwa"):"sy"==u?t(e,"ܒܘܕܩܐ ܡܡܘܘܢܐ"):"sz"==u?t(e,"Szpōnzorowane"):"ta"==u?t(e,"விளம்பரம்"):"te"==u?t(e,"ప్రాయోజితం చేయబడింది"):"tg"==u?t(e,"Бо сарпарастӣ"):"th"==u?t(e,"ได้รับการสนับสนุน"):"tl"==u?t(e,"May Sponsor"):"tr"==u?t(e,"Sponsorlu"):"tt"==u?t(e,"Хәйрияче"):"tz"==u?t(e,"ⵉⴷⵍ"):"ur"==u?t(e,"سپانسرڈ"):"uz"==u?t(e,"Reklama"):"vi"==u?t(e,"Được tài trợ"):"zh-Hans"==u?t(e,"赞助内容"):"zh-Hant"==u&&t(e,"贊助"),0<s.length&&0<c.length&&0<i.length&&0<d.length)){for(cont=0;cont<s.length;cont++)0<s[cont].offsetHeight&&(cont=s.length,n=1);for(cont1=0;cont1<c.length;cont1++)0<c[cont1].offsetHeight&&(cont1=c.length,a=1);for(cont2=0;cont2<i.length;cont2++)0<i[cont2].offsetHeight&&(cont2=i.length,l=1);for(cont3=0;cont3<d.length;cont3++)0<d[cont3].offsetHeight&&(cont3=d.length,r=1);if(1==n&&1==a&&1==l&&1==r){p=e.querySelectorAll("a[href]")[2].innerText;y+=1,console.log("--------"),console.log("Ad hidden from: "+p),console.log("Total ads hidden: "+y),console.log("--------"),e.style="display:none!important;"}}}})}),y=0;e.observe(document,{childList:!0,subtree:!0})}();
 

Blaz

Moderator & Translator
Staff member
Moderator
FYI I updated the rule again due to some VR ad from facebook which was not declared as an ad (English language) (applies to non-FF and non-Opera users). Please report if something got broken or if you see the VR ocolus ad in another language, thank you.

It is possible you see the counter in console in browser dev tools are lower this time since it will only hide the ads which were normally displayed and not the one which lie in the code, but hidden by Facebook itself.
 

Wittier

Member
Heads up. I've started to see ads in the News Feed. They are labeled "Sponsored" rather than "Suggested." I haven't made any changes to my AdGuard... same as before: Ad Blocking, Privacy, Annoyances, a few languages. I have updated filters.

Note that I'm usually the first to report when this happens. Others corroborate days later. It always turns out to be a change in how FB slips these in.
 

Blaz

Moderator & Translator
Staff member
Moderator
Are they gone when you move the mouse over them? In browser's developing tools -> console; is it saying something like "Ad hidden from: " when you scroll down?
If possible, please send me saved HTML via a private message, so I can check the code.
 

Blaz

Moderator & Translator
Staff member
Moderator
In developement tools switch to Elements Tab, right click on html Tag -> Edit as HTML. Now press CTRL A and then CTRL C to copy the content. Now you save that content to a text file ( e.g. Editor/Notepad) and send me the file via private messages.

Please note that copy will contain all contents of the currently opened facebook page ( your user name etc.). I understand if you do not want to share the data though.
 

Blaz

Moderator & Translator
Staff member
Moderator
Thank you @Wittier for providing data :)

Added rule to Base filter, update available in about 3 hours (Opera/FireFox Extension users have to add the rule to user filter until next Extension update):

Code:
facebook.com,facebookcorewwi.onion#%#!function(){var e=new MutationObserver(function(){document.querySelectorAll('[id^="substream"] > div:not(.hidden_elem) div[id^="hyperfeed_story_id"]').forEach(function(e){function t(e,t){for(s=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="sub"] a [class] [class]'),socheck=0;socheck<s.length;socheck++)s[socheck].innerText.contains(t)&&(c=["1"],d=["1"],i=["1"],r=l=a=1,socheck=s.length)}function o(e,t,o,n,a){s=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="sub"] a [data-content='+t+"]"),c=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="sub"] a [data-content='+o+"]"),d=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="sub"] a [data-content='+n+"]"),i=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="sub"] a [data-content='+a+"]"),0==s.length&&(s=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="label"] a [data-content='+t+"]"),c=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="label"] a [data-content='+o+"]"),d=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="label"] a [data-content='+n+"]"),i=e.querySelectorAll('.userContentWrapper h5 + div[data-testid*="label"] a [data-content='+a+"]"))}var n=0,a=0,l=0,r=0,s=0,c=0,d=0,i=0,u=e.querySelectorAll("div[style='width: 100%'] > a[href*='oculus.com/quest'] > div"),h=document.querySelector("[lang]").lang,g=e.querySelectorAll('a[ajaxify*="ad_id"] > span'),p=e.querySelectorAll('a[href*="ads/about"]');if("display: none !important;"!=e.getAttribute("style")&&!e.classList.contains("hidden_elem")){if(0<g.length||0<p.length){f+=1;var y=e.querySelectorAll("a[href]")[2].innerText;console.log("--------"),console.log("Ad hidden from: "+y),console.log("Total ads hidden: "+f),console.log("F length: "+g.length),console.log("H length: "+p.length),console.log("--------"),e.style="display:none!important;"}else if(0<u.length){f+=1;y="Facebook";console.log("--------"),console.log("Ad hidden from: "+y),console.log("Total ads hidden: "+f),console.log("Non-declared ad"),console.log("--------"),e.style="display:none!important;"}else"af"==h?t(e,"Geborg"):"de"==h||"nl"==h?o(e,"G","e","s","n"):"am"==h?t(e,"የተከፈለበት ማስታወቂያ"):"ar"==h?t(e,"مُموَّل"):"as"==h?t(e,"পৃষ্ঠপোষকতা কৰা"):"az"==h?t(e,"Sponsor dəstəkli"):"co"==h?t(e,"Spunsurizatu"):"bs"==h||"sl"==h||"cs"==h?o(e,"S","p","z","n"):"da"==h||"en"==h||"et"==h||"fy"==h||"it"==h||"ku"==h||"nb"==h||"nn"==h||"pl"==h||"sq"==h||"sv"==h||"zz"==h?document.querySelector("body").className.includes("Locale_en_UD")?t(e,"pəɹosuodS"):o(e,"S","p","s","n"):"be"==h?t(e,"Рэклама"):"bg"==h?t(e,"Спонсорирано"):"mk"==h?t(e,"Спонзорирано"):"br"==h?t(e,"Paeroniet"):"ca"==h?t(e,"Patrocinat"):"gl"==h||"pt"==h?t(e,"Patrocinado"):"bn"==h?t(e,"সৌজন্যে"):"cb"==h?t(e,"پاڵپشتیکراو"):"cx"==h?o(e,"G","i","s","n"):"cy"==h?t(e,"Noddwyd"):"el"==h?t(e,"Χορηγούμενη"):"eo"==h?t(e,"Reklamo"):"es"==h?o(e,"P","u","c","d"):"eu"==h?t(e,"Babestua"):"fa"==h?t(e,"دارای پشتیبانی مالی"):"ff"==h?t(e,"Yoɓanaama"):"fi"==h?t(e,"Sponsoroitu"):"fo"==h?t(e,"Stuðlað"):"fr"==h?document.querySelector("body").className.includes("Locale_fr_FR")?o(e,"S","p","s","n"):o(e,"C","o","m","n"):"ga"==h?t(e,"Urraithe"):"gn"==h?t(e,"Oñepatrosinapyre"):"gu"==h?t(e,"પ્રાયોજિત"):"ha"==h?t(e,"Daukar Nauyi"):"he"==h?t(e,"ממומן"):"hr"==h?t(e,"Plaćeni oglas"):"ht"==h?t(e,"Peye"):"ne"==h||"mr"==h||"hi"==h?t(e,"प्रायोजित"):"hu"==h?o(e,"H","i","r","d"):"hy"==h?t(e,"Գովազդային"):"id"==h?o(e,"B","e","p","n"):"is"==h?t(e,"Kostað"):"ja"==h?t(e,"広告"):"ms"==h?t(e,"Ditaja"):"jv"==h?t(e,"Disponsori"):"ka"==h?t(e,"რეკლამა"):"kk"==h?t(e,"Демеушілік көрсеткен"):"km"==h?t(e,"បានឧបត្ថម្ភ"):"kn"==h?t(e,"ಪ್ರಾಯೋಜಿತ"):"ko"==h?t(e,"Sponsored"):"ky"==h?t(e,"Демөөрчүлөнгөн"):"lo"==h?t(e,"ຜູ້ສະໜັບສະໜູນ"):"lt"==h?t(e,"Remiama"):"lv"==h?t(e,"Apmaksāta reklāma"):"mg"==h?t(e,"Misy Mpiantoka"):"ml"==h?t(e,"സ്പോൺസർ ചെയ്തത്"):"mn"==h?t(e,"Ивээн тэтгэсэн"):"mt"==h?t(e,"Sponsorjat"):"my"==h?t(e,"ပံ့ပိုးထားသည်"):"or"==h?t(e,"ପ୍ରଯୋଜିତ"):"pa"==h?t(e,"ਸਰਪ੍ਰਸਤੀ ਪ੍ਰਾਪਤ"):"ps"==h?t(e,"تمويل شوي"):"ro"==h?t(e,"Sponsorizat"):"ru"==h||"uk"==h?t(e,"Реклама"):"rw"==h?t(e,"Icyamamaza ndasukirwaho"):"sc"==h?t(e,"Patronadu de"):"si"==h?t(e,"අනුග්‍රාහක"):"sk"==h?t(e,"Sponzorované"):"sn"==h?t(e,"Zvabhadharirwa"):"so"==h?t(e,"La maalgeliyey"):"sr"==h?t(e,"Спонзорисано"):"sw"==h?t(e,"Imedhaminiwa"):"sy"==h?t(e,"ܒܘܕܩܐ ܡܡܘܘܢܐ"):"sz"==h?t(e,"Szpōnzorowane"):"ta"==h?t(e,"விளம்பரம்"):"te"==h?t(e,"ప్రాయోజితం చేయబడింది"):"tg"==h?t(e,"Бо сарпарастӣ"):"th"==h?t(e,"ได้รับการสนับสนุน"):"tl"==h?t(e,"May Sponsor"):"tr"==h?t(e,"Sponsorlu"):"tt"==h?t(e,"Хәйрияче"):"tz"==h?t(e,"ⵉⴷⵍ"):"ur"==h?t(e,"سپانسرڈ"):"uz"==h?t(e,"Reklama"):"vi"==h?t(e,"Được tài trợ"):"zh-Hans"==h?t(e,"赞助内容"):"zh-Hant"==h&&t(e,"贊助");if(0<s.length&&0<c.length&&0<d.length&&0<i.length){for(cont=0;cont<s.length;cont++)0<s[cont].offsetHeight&&(cont=s.length,n=1);for(cont1=0;cont1<c.length;cont1++)0<c[cont1].offsetHeight&&(cont1=c.length,a=1);for(cont2=0;cont2<d.length;cont2++)0<d[cont2].offsetHeight&&(cont2=d.length,l=1);for(cont3=0;cont3<i.length;cont3++)0<i[cont3].offsetHeight&&(cont3=i.length,r=1);if(1==n&&1==a&&1==l&&1==r){y=e.querySelectorAll("a[href]")[2].innerText;f+=1,console.log("--------"),console.log("Ad hidden from: "+y),console.log("Total ads hidden: "+f),console.log("--------"),e.style="display:none!important;"}}}})}),f=0;e.observe(document,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}();
 
Top