There are some pages that require a single JS file to:
- load ads
- display page content
it would be nice if adblockplus could make an element to be forcefully VISIBLE, the opposite of elemhide.css, and it would be easy to develop using the same binding technology.
This would make simple to block the JS and still show the page content.
New feature: element showing rules
- Gingerbread Man
- Posts: 1339
- Joined: Fri Aug 12, 2011 5:28 am
Re: New feature: element showing rules
Element hiding rules rely on CSS. They don't have anything to do with files like external scrips, which are affected by the blocking mechanism.
Adblock Plus would have to sift through a script file to check what that script is trying to do, and allow it to perform the non-related ad function. That would be either impossible or extremely complicated while providing little benefit.
Adblock Plus would have to sift through a script file to check what that script is trying to do, and allow it to perform the non-related ad function. That would be either impossible or extremely complicated while providing little benefit.
-
- Posts: 10
- Joined: Thu Dec 06, 2012 9:39 am
Re: New feature: element showing rules
I know Element hiding uses CSS.
my suggestion is: create a rule like this:
adblockplus.org###review$Show
this rule sound bind a css display:inline; visibility:visible
it may (if easy to develop) accept some specific parameter for display like this:
adblockplus.org###review$Show=block
this rule sound bind a css display:block; visibility:visible
This should be easy to develop because it's a small edit to element hiding rules.
I wrote about JS becaust i want to explain WHY i'm asking this rule:
try to figure this scenario:
the load-ads-here.js performs 3 operations:
- insert an ads inline
- document.getElementById("noadblock").style.display="none";
- document.getElementById("noadblock2").style.display="inline";
- document.getElementById("noadblock2").style.visibility="visible";
In this scenario, i cannot use adblockplus to prevent load-ads-here.js from being loaded because it would break the page.
if the element show rule is implement i can write these rules:
this would make the page visible AND the ads not loaded.
my suggestion is: create a rule like this:
adblockplus.org###review$Show
this rule sound bind a css display:inline; visibility:visible
it may (if easy to develop) accept some specific parameter for display like this:
adblockplus.org###review$Show=block
this rule sound bind a css display:block; visibility:visible
This should be easy to develop because it's a small edit to element hiding rules.
I wrote about JS becaust i want to explain WHY i'm asking this rule:
try to figure this scenario:
Code: Select all
<html>
<body>
<div id="noadblock">DO NOT USE ADBLOCK!</div>
<div id="noadblock2" style="display:hidden;visibility:collapse">
Real content of the page...
...
<script src="load-ads-here.js"></script>
...
</div>
</body>
</html>
- insert an ads inline
- document.getElementById("noadblock").style.display="none";
- document.getElementById("noadblock2").style.display="inline";
- document.getElementById("noadblock2").style.visibility="visible";
In this scenario, i cannot use adblockplus to prevent load-ads-here.js from being loaded because it would break the page.
if the element show rule is implement i can write these rules:
Code: Select all
||example.com/load-ads-here.js|$script
example.com###noadblock
example.com###noadblock2$show
- Gingerbread Man
- Posts: 1339
- Joined: Fri Aug 12, 2011 5:28 am
Re: New feature: element showing rules
For your example, add these filters to Adblock Plus:
And add the following style in Stylish:
I think that the situation you describe is a bizarre edge case. Styling web pages is the domain of add-ons like the aforementioned Stylish and outside the scope of Adblock Plus. Still, if you feel strongly about this, you can file a new issue report. Edit: Someone else did.
https://issues.adblockplus.org/ticket/756
Code: Select all
||example.com/load-ads-here.js|
example.com###noadblock
Code: Select all
@-moz-document domain("example.com") {
#noadblock2 { display: inline !important; visibility: visible !important; }
}
https://issues.adblockplus.org/ticket/756