Seeking to block a site's image selection "overlay"

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

context
Fanatic
Fanatic
Posts: 212
Joined: 2012-07-22, 18:56
Location: USA Texas

Seeking to block a site's image selection "overlay"

Unread post by context » 2018-07-18, 16:33

I commonly access an image site: Freepik.com It's a top-drawer site for locating useful images, icons and and vector graphics.

But their image selection arrays use an odd—and annoying—selection method that covers up an image when you cursor over it. For example: https://www.freepik.com/free-photos-vectors/watercolor

If it's a "Premium" image, they place a (www.)freepik.com##.premium-overlay on top of the image ... which I can block with ABL's Open Blockable Items feature to get exactly the screen behavior I prefer. It's a simple method that works as expected.

But try as I might, I can't determine the method they use for standard images. It seems to NOT use an overlay. But I can't spot anything else to block, js script or otherwise.

Can anyone suggest how the standard overlays might be working?

Thanks in advance for any help.

User avatar
Tomaso
Board Warrior
Board Warrior
Posts: 1622
Joined: 2015-07-23, 16:09
Location: Norway

Re: Seeking to block a site's image selection "overlay"

Unread post by Tomaso » 2018-07-18, 17:36

Here you go:

Code: Select all

freepik.com##.preview:after
freepik.com##.preview:before
..but you should be aware that this makes the image info very hard to read, because in most cases it will be white text on white background.

--

EDIT:
This will block the rest, leaving you only with clean thumbnails:

Code: Select all

freepik.com##.badge
freepik.com##.details
freepik.com##.favourite
freepik.com##.popover-wrapper
freepik.com##.premium-overlay
freepik.com##.ribbon
You might wanna do some testing with these rules though, to make sure that they don't affect anything else on that site.
Last edited by Tomaso on 2018-07-18, 18:09, edited 1 time in total.

context
Fanatic
Fanatic
Posts: 212
Joined: 2012-07-22, 18:56
Location: USA Texas

Re: Seeking to block a site's image selection "overlay"

Unread post by context » 2018-07-18, 18:23

Thanks for the detailed response. But, apparently, I'm missing something. I added the two rules you first suggested and did a page refresh. The premium overlay is still properly blocked. But the preview before/after entries have no effect. (And BTW, I was already blocking the white text, so the potential for having white on white isn't an issue for me.)

Any idea of what I've missed?
Overlay Blocking Rules.PNG

User avatar
Tomaso
Board Warrior
Board Warrior
Posts: 1622
Joined: 2015-07-23, 16:09
Location: Norway

Re: Seeking to block a site's image selection "overlay"

Unread post by Tomaso » 2018-07-18, 18:32

context wrote:the preview before/after entries have no effect.
That's strange, because they work for me.
I use uBO though, not ABL.
..but AFAIK, both these blockers use ABP syntaxes, so the rules should work regardlessly.

User avatar
Tomaso
Board Warrior
Board Warrior
Posts: 1622
Joined: 2015-07-23, 16:09
Location: Norway

Re: Seeking to block a site's image selection "overlay"

Unread post by Tomaso » 2018-07-18, 18:52

I ran some tests with ABL and ABPrime, and indeed.. I can confirm that they aren't able to interpret cosmetic rules that contains pseudo-elements.
uBO only added support for these type of rules last year:
https://github.com/gorhill/uBlock/commi ... bb1402a6c2

context
Fanatic
Fanatic
Posts: 212
Joined: 2012-07-22, 18:56
Location: USA Texas

Re: Seeking to block a site's image selection "overlay"

Unread post by context » 2018-07-18, 18:54

they work for me
Thanks for confirming. I'll continue to test and to look for differences. But it's good to know that a blocking method exists.

.

User avatar
Tomaso
Board Warrior
Board Warrior
Posts: 1622
Joined: 2015-07-23, 16:09
Location: Norway

Re: Seeking to block a site's image selection "overlay"

Unread post by Tomaso » 2018-07-18, 20:12

ABL and ABPrime are probably able to use these type of syntaxes, to block the pseudo-elements in question:
https://adblockplus.org/filter-cheatshe ... eemulation
..but to be honest, they're too complex for me to make any sense of.

User avatar
therube
Board Warrior
Board Warrior
Posts: 1651
Joined: 2018-06-08, 17:02

Re: Seeking to block a site's image selection "overlay"

Unread post by therube » 2018-07-19, 10:49

@Tomaso

How did you come up with :after :before .badge .details ... ?
Did you do this through uBlock (element picker) or in Inspector? Combination of both?
And just where to look, how to find those actual parts?
Last edited by therube on 2018-07-19, 10:50, edited 1 time in total.

User avatar
Tomaso
Board Warrior
Board Warrior
Posts: 1622
Joined: 2015-07-23, 16:09
Location: Norway

Re: Seeking to block a site's image selection "overlay"

Unread post by Tomaso » 2018-07-19, 12:26

A combination of both:

Image

Image

Also, I were recently made aware of those type of pseudo-elements, after filing a bug report here:
https://github.com/DandelionSprout/adfilt/issues/7/
Last edited by Tomaso on 2018-07-19, 12:30, edited 1 time in total.

context
Fanatic
Fanatic
Posts: 212
Joined: 2012-07-22, 18:56
Location: USA Texas

Re: Seeking to block a site's image selection "overlay"

Unread post by context » 2018-08-20, 18:09

For anyone following this thread, I finally had to abandon AdBlock Latitude and go to uBlock Origin. ABL lost the ability to work with Element Hiding Helper (already deprecated) in PM 28.0.0. I had nursed things along as far as I could.

uBlock Origin does what I need by entering the following in My Filters:

Code: Select all

freepik.com##.preview:after
freepik.com##.preview:before
! freepik.com##.badge         << kept in as a clear indication of std vs premium
freepik.com##.details
freepik.com##.favourite
freepik.com##.popover-wrapper
freepik.com##.premium-overlay
freepik.com##.ribbon
I'll continue to believe there's a need for a more user-friendly blocker ... for which Element Hiding Helper forged the way. Its "show elements + select element" was top notch.

In the mean time, uBlock Origin does the job ... albeit with a lot of nuts and bolts technology for the user to contend with.
Last edited by context on 2018-08-20, 18:27, edited 1 time in total.

Goodydino
Keeps coming back
Keeps coming back
Posts: 827
Joined: 2017-10-10, 21:20

Re: Seeking to block a site's image selection "overlay"

Unread post by Goodydino » 2018-08-20, 19:32

The overlay appears on the thumbnails if you mouse over them, but if you click a thumbnail, you still get the full-sized image, and I was able to download them by dragging them off the page onlo my desktop. This also worked for images marked "Premium Users Only".

context
Fanatic
Fanatic
Posts: 212
Joined: 2012-07-22, 18:56
Location: USA Texas

Re: Seeking to block a site's image selection "overlay"

Unread post by context » 2018-08-20, 19:55

Hmmm. Things a clean and clear on the pages I browse. I can even right click and copy or save and thumbnail from the group.

I'll have to see if I have another filter defined ... or if one of my other plugins is lending a hand. But, for me, I have an ideal result.

Thanks for your comments.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Seeking to block a site's image selection "overlay"

Unread post by coffeebreak » 2018-08-20, 20:12

Off-topic:
context wrote:ABL lost the ability to work with Element Hiding Helper (already deprecated) in PM 28.0.0.
It no longer works with v1.3.2.1, but works absolutely fine with the latest version 1.4.
context wrote:... Element Hiding Helper forged the way. Its "show elements + select element" was top notch.

In the mean time, uBlock Origin does the job ... albeit with a lot of nuts and bolts technology for the user to contend with.

uBlock Origin has the exact same "element hiding" function built-in - it's called "cosmetic filtering". To activate it either click the eye-dropper icon in the toolbar button's popup, or right-click the element you want to hide and select Block Element from the context menu. Once activated, you'll see selections offered in the lower right corner of your screen, hover the mouse there to see it properly.
Last edited by coffeebreak on 2018-08-20, 20:38, edited 2 times in total.

context
Fanatic
Fanatic
Posts: 212
Joined: 2012-07-22, 18:56
Location: USA Texas

Re: Seeking to block a site's image selection "overlay"

Unread post by context » 2018-08-20, 20:56

ABL lost the ability to work with Element Hiding Helper
I'll admit that I'm more than a little confused by the "lineage" of AdBlock Plus, AdBlock Prime and AdBlock Latitude (any others?). More and more, I've been trying to stay on a main track ... although one of my favorite add-ons, ImageBlock 3.1, continues to work with PM 28.0.0 ... but I don't know why.

Here's a typical message:
Element Hiding.PNG
I appreciate you pointing out what you have, but can you shed some light on this "not compatible" aspect?
.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Seeking to block a site's image selection "overlay"

Unread post by coffeebreak » 2018-08-20, 22:21

Off-topic:
context wrote:...can you shed some light on this "not compatible" aspect?

EHH isn't compatible with Firefox below 38. Pale Moon isn't Firefox.
PM advertises itself to AMO as "Firefox 27" by means of a custom user agent override, hence the "incompatibility" message.

I've had EHH 1.4 installed to one of my profiles for several months.
It's compatible and it works.
EHH1.4-addonsmanager.png

Why not simply install it, then base your judgment on how it behaves.

Since you appear to have Moon Tester Tool installed, you should be able to install by clicking directly on the green "Download File" button.
Last edited by coffeebreak on 2018-08-20, 22:22, edited 1 time in total.

context
Fanatic
Fanatic
Posts: 212
Joined: 2012-07-22, 18:56
Location: USA Texas

Re: Seeking to block a site's image selection "overlay"

Unread post by context » 2018-08-21, 00:49

Why not simply install it, then base your judgment on how it behaves.
My reluctance stems from the kind of stark warning that appears if you attempt to install NoScript. In a nutshell, it warns of possible/probable corruptions that can affect features not directly related to scripts. That's a wide net. Since I have no basis for judging internal impact, I generally avoid making myself a guinea pig.

However, if others recommend an add-on, I have been known to give it a try. As for Moon Tester Tool, yes, I remember using it when I installed ImageBlock. But, again, my lay view of add-ons leaves me wondering if I'm opening myself up for problems.

All that said, thanks for pointing me back to EHH 1.4. I'll reinstate it next time I'm shuffling my add-on roster.
.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: Seeking to block a site's image selection "overlay"

Unread post by coffeebreak » 2018-08-21, 03:14

Off-topic:
context wrote:the kind of stark warning that appears if you attempt to install NoScript.

These two extensions and their circumstances have zero to do with each other.

NoScript is on Pale Moon's blocklist (soft blocked), Element Hiding Helper is not.
NoScript's warning comes from the browser. Element Hiding Helper's warning merely comes from AMO (who doesn't even have Pale Moon on its radar).
context wrote:As for Moon Tester Tool, yes, I remember using it when I installed ImageBlock.

"Using it"? Sounds like you misunderstand.
There is no need to use MTT's "Options" to force Element Hiding Helper to install, if that's what you thought.
EHH doesn't need to be forced.

Moon Tester Tool has the effect of overcoming AMO's "incompatibility" warning so you can install items from AMO normally by just clicking the install button. It does this automatically on every relevant AMO page (read MTT's APMO page, under Extra features).
But If MTT were not in the picture, EHH could still be installed without trouble using a locally saved xpi.
context wrote:I'll admit that I'm more than a little confused by the "lineage" of AdBlock Plus, AdBlock Prime and AdBlock Latitude (any others?).
To my knowledge ABL 5.0.1 is forked off ABP 2.8.2 (the last xul/non-hybrid release of ABP). EHH 1.4 and its predecessor 1.3.10 were specifically meant by ABP developers to be compatible with ABP 2.8.* - Read the EHH release notes for those two.


But with all the above said, when or whether you (re)install it is your decision, no one else's.
Last edited by coffeebreak on 2018-08-21, 06:08, edited 1 time in total.

Locked