Some websites set a background image to advertise, e.g.

<body style="background-image:url('images/adv.png')">

I'm wondering how I can write an AdBlock Plus filter in order to hide the <body> background.

有帮助吗?

解决方案 2

Turns out there's no way to hide a background without hiding the whole element — but you can always block the single image by adding a custom ABP filter.

You can do so by pressing CTRL + Shift + V (open blockable items), and look for the image you want to hide.

其他提示

If you are not strictly sticking with ABP, you can use Stylish to do it in CSS way. In fact, it is my preferred way to do things like that.

body { background-image: none !important; }

Of course you can just make the ABP filter containing whole URL, this will affect not only background, but I can't think of the reason why not to block the URL entirely.

AdBlock in Chrome, you can press 'F12' function key, see the tabs on the top, like 'Elements Console Sources Network ... AdBlock'. Select 'Adblock', reflesh the page. Now it will show all requests, include the background image file. Found the image line, click 'Block item', reflesh page, done.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top