Disable scripts but allow one

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
Kevil
Posts: 40
Joined: Fri Oct 14, 2016 12:42 pm

Disable scripts but allow one

Post by Kevil »

Ho to enable one parcticular script while disabling all others?

Disable all scripts:
||site.com^$script

How to enable this script only:
<a id="ctl04_1055_1029_ctl00_lbtnSave" class="last" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl04$1055_1029$ctl00$lbtnSave", "", true, "", "", false, true))">Send inquiry</a>
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Disable scripts but allow one

Post by mapx »

||site.com^$script
is disabling all the external scripts

You want to allow an inline script. The filter above cannot block the inline scripts.

If you want to allow an external script named scripts1.js, just add an exception filter like:

@@||site.com/*/script1.js
Kevil
Posts: 40
Joined: Fri Oct 14, 2016 12:42 pm

Re: Disable scripts but allow one

Post by Kevil »

mapx wrote: If you want to allow an external script named scripts1.js
What to do if there is no *.js in the html source, see:
<a id="ctl04_1074_1029_ctl00_lbtnSave" class="last" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl04$1074_1029$ctl00$lbtnSave", "", true, "", "", false, true))">Odeslat</a>

at page https://www.zive.cz/poradna/firefox-pro ... to=3488150
To SEND a reply I need to click on a key "Odeslat" (Send).
Kevil
Posts: 40
Joined: Fri Oct 14, 2016 12:42 pm

Re: Disable scripts but allow one

Post by Kevil »

But how to write a filter for AdBlock to allow just this script ?
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Disable scripts but allow one

Post by mapx »

ABP does not block that script. Where did you see it's blocked ?
Post Reply