2

With uBlock Origin on Firefox, I am trying to block all third-party scripts called from a specific first-party page.

For example: visiting a page of example.com, I want that every external script gets blocked.

I am following this great ublock origin syntax guide, and this and this other guide.

I tried

||example.com*$script,third-party

and even (that should block all third parties, even images)

||example.com*$third-party

and I tried for specific third-party domain

||example.com^$script,third-party,domain=disqus.com

I saved the custom rules, but refreshing the page, and inspecting the network panel, none of the custom rules seems to work.

nulll
  • 143
  • 6
  • These should work if they are added to _My filters_ (these are filters, not rules). Reasons why they may not work: Is My filters list enabled? Reload the page with forcing a browser cache bypass (press Ctrl while clicking reload), it's often the reason of such behavior, as the browser bypasses content blockers for resources held in its short-term memory-based cache. – rhill May 03 '23 at 13:05

1 Answers1

2

I found a solution. Don't know why, but apparently the rule won't work from My Filters uBlock Origin panel, but it works on My Rules panel, where I set

example.com * 3p-script block

enter image description here

Btw I discovered that uBlock Origin has an advanced mode: from addon
settings > options > I am an advanced user

if you enabled it, you can use GUI dynamic filtering, now if you open the uBlock addon popup on a webpage, there is a sidebar with a very handy 3rd-party scripts toggle, you then could disable then on every website (1) or only on the current website (2) enter image description here

nulll
  • 143
  • 6