General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Problem with Images Blocking Exceptions
Posted by: cpm1a_new
Date: August 18, 2019 09:11AM

Page Display --> Images --> Load Images --> Always. paste the current URL in "Images Permissions" field --> "Block". for some websites entries in the Images Permissions list look like this:

Site https (only this, nothing else!)
State Denied

and images are not blocked. how come?
----------------
K-Meleon Pro 76.2 GoAnna

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: JohnHell
Date: August 18, 2019 01:41PM

Quote
cpm1a_new
Page Display --> Images --> Load Images --> Always. paste the current URL in "Images Permissions" field --> "Block". for some websites entries in the Images Permissions list look like this:

Site https (only this, nothing else!)
State Denied

and images are not blocked. how come?
----------------
K-Meleon Pro 76.2 GoAnna

The permissions don't work that way.

Permissions work by domain, not URL.

Said so, if you are at example.com and want to block images hosted at example.net, you don't block images displayed in example.com, but images served through example.net.

Said so, that means that you must to be carefull, as example.net, nowadays, might be a CDN, and a CDN is not used only by example.com, but a lot of pages, and if you block images coming from example.net, you may be blocking images for every page that uses the CDN example.net to load images from.

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: cpm1a_new
Date: August 20, 2019 07:04AM

@JohnHell
thanks, got it
--------------

in Opera 12 i enable/disable JavaScript for www.bbc.com (just an example) in "Manage Site Preferences". and it disables JS on http://www.bbc.com/russian/news

how can i can disable JS and (if possible) images permanently for a specific site in KM? anything will do: userContent.css, add-on, extension etc no toggle ability needed



Edited 11 time(s). Last edit at 08/20/2019 12:15PM by cpm1a_new.

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: JohnHell
Date: August 20, 2019 01:49PM

Quote
cpm1a_new
in Opera 12 i enable/disable JavaScript for www.bbc.com (just an example) in "Manage Site Preferences". and it disables JS on http://www.bbc.com/russian/news

how can i can disable JS and (if possible) images permanently for a specific site in KM? anything will do: userContent.css, add-on, extension etc no toggle ability needed


userContent.css, and its dynamic counterpart adblock.css, aren't for blocking anything, they are for websites styling. In other words, to make websites look as you wish. When you hide content through these Cascading StyleSheets (aka CSS), you only hide it to your eyes, but they are still loading in the background.

In the other hand, I see you are coming from Opera, but you have to understand something, Opera is not equal to other Mozilla based browsers (I include Palemoon here, despite is now a fork).

Why I said the above?, because you want K-meleon (a Mozilla based browser) to behave like Opera, and they are absolute different browsing paradigms.

I want you to understand this first. They are different.


So, answering to your wish about per-site permissions in Opera and how to apply to K-meleon, the answer is, you can't. At least in the same way.

Beyond the user-agent implemented settings to allow one per site, to my aware, there is no other per-site option.

You can set permissions in the way I told in the post above. Domains.

As per-domain permissions can be quite aggressive (by the told in my previous post above) you have the options to toggling permissions (javascript, images, subdocuments, styles, cookies, popups (and a couple more)). In the extension forum you should find some by siria that fine toggles it better than by default.

And in fact, is what I do. 99% of the time, I browse the net with JavaScript disabled (right now, here in K-meleon, I'm doing it). If I need it, I enable it and reload the page.

In your case, you say you need to toggle JS and images. Ok. You already have built-in macros to easy toggling. If you feel that use two togglers is too much, take them, add to a new macro, add an accelerator if you wish (by macro or by editing accel.cfg) and that's it. Do you need it? Toggle it. Do you not need to load it? Toggle it and reload the page, if needed. Or use a handy macro as the one for loading images I've read in other thread, but that means effort, and not everyone would be here to help out if it is complex or by time limits in their lifes.

And you already fiddle with macros, so it wouldn't be a problem winking smiley If you have troubles, there you have the Documentation. If still you find problems, ask what you are doing wrong so we can help you.

K-meleon is a very configurable browser and, with the macros, it can really be super tweaky browser, but that means also that requests a little of effort from you side. That means, not to become a developer, but a developer of your own tweaks. And that means read documentations, read the net, search for answers and learn, learn a lot, and then customize it.

Sorry if you feel I went off-topic here or if I sounded rough. I just want you to understand the different environments that each browser (without the same engine roots) has compared to others and what are the limitations and why.

Sometimes, there were built-in extensions, sometimes, you will find some at Extensions subforum, others, you maybe could use Firefox native old xpi extenions and, sometimes, you'll need to build your extensions yourself.



Edited 1 time(s). Last edit at 08/20/2019 01:51PM by JohnHell.

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: siria
Date: August 20, 2019 05:32PM

It's really one of the biggest lacks of KM (or of the gecko/goanna engine) that it's not possible out-of-box to do such a baby simple task as:
"ON bbc.com block all scripts and images."
The mozilla devs have it IMO all upside down, they only let us block stuff like this:
"Block all scripts and images coming FROM bbc.com. On ALL websites which load anything from bbc.com" (blacklist/whitelist for special domains)

And even that twisted method requires addons! (ExExceptions is great for black-whitelisting domains, strongly recommend)
Personally I'm lucky that none of my regular sites requires JS and other unwelcome stuff, so like JohnHell I can keep all blocks up by default most of the time. Only occasionally need to allow JS etc. For those few cases I prefer to just toggle the global setting on/off using
  • the Privacy Toolbar (main javascript switch, cookies adblock.css, referer etc)
  • and macro priv3buttons (for different javascript levels, stylesheets, iframes, etc.)
For example I usually allow iframes from the same-domain only.
Luckily, unlike black-white exceptions, those global settings work the normal way, top-down:
ON the current page! The URL in the URLBAR defines what gets loaded or not.

But I *think* for KM76+ there are also very few (and very complicated) Firefox adblocker addons available, which can work the normal non-twisted way:
blocking stuff ON a specific site!
Then again, not quite sure... have no clue of those myself. Only remember that probably the best of those domain-blocking addons, uMatrix, does NOT work in KM.
And the configuration of all those adblocker addons seems also rather scaring, with a steep learning curve. And maintaining thousands of rules etc. Other browsers have a handy GUI which helps enormously to inspect blockable page elements. In KM this doesn't work, that's the killer prob which makes it extra complicated. So some basic knowledge of CSS and javascript and regex coding is definitely very helpful to figure out what to block from the pure source code... OR: copying over the finished settings from another browser.
Anyway, only very few people here (mainly Hermes) have experience with those.



Edited 4 time(s). Last edit at 08/20/2019 05:51PM by siria.

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: hermes
Date: August 21, 2019 07:50AM

@siria and other

This issue was resolved back in 2015. I think from my macros you will find a couple of useful ideas for yourself.
Many developer tools is integrated in KM (in year 2015). My KM is now more like a developer edition of FF.
Fully supported the work of tools on https pages as / or offline.

(direct link) http://getfile.dokpub.com/yandex/get/https://yadi.sk/d/vyF2dC0wmriFjw (49.8 Kcool smiley

Maybe someone else will come in handy, a link to my cloud. Everything that I laid out and gave links to there.

https://yadi.sk/d/7rwT0U-PtazDJ



Edited 2 time(s). Last edit at 08/21/2019 08:08AM by hermes.

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: cpm1a_new
Date: August 24, 2019 08:57AM

@siria

http://kmeleonbrowser.org/forum/file.php?9,file=1700,filename=nukeimage2adblockBAB.kmm

awesome, exactly what i need and asked for here

so for
https://www.bbc.com/russian/topics/39267b85-1784-4f4b-80ed-f8cb4a35f337

my adblock.txt:
https://ichef.bbci.co.uk/*.jpg
https://ichef.bbci.co.uk/*.png

1) did i get it right?
2) can it be just one line with both file types?

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: siria
Date: August 24, 2019 10:27AM

Quote
hermes
Fully supported the work of tools on https pages as / or offline.

(direct link) http://getfile.dokpub.com/yandex/get/https://yadi.sk/d/vyF2dC0wmriFjw (49.8 Kcool smiley

Maybe someone else will come in handy, a link to my cloud. Everything that I laid out and gave links to there.
https://yadi.sk/d/7rwT0U-PtazDJ

Thanks, sounds interesting, will have to check out when I have more time.
(The prob is modern adblock stuff is so complicated and complex, and personally I just can't use most modern stuff on my old KM-version anyway, so forget it again too quickly)
The direct yandex downloads always work fine (with my usual settings), but have now trouble downloading the complete package, from a completely different yandex layout. Have no time right now, may try later with (my very old) JS again.

Quote
cpm1a_new
http://kmeleonbrowser.org/forum/file.php?9,file=1700,filename=nukeimage2adblockBAB.kmm
awesome, exactly what i need and asked for here

Glad you like, am just amazed you found that one, buried in the middle of an old thread! Would have trouble finding it myself now ;-)
There was no interest in it before, and it's also just a little crutch, so I never even made an own topic for it.

Quote
cpm1a_new
https://www.bbc.com/russian/topics/39267b85-1784-4f4b-80ed-f8cb4a35f337
my adblock.txt:
https://ichef.bbci.co.uk/*.jpg
https://ichef.bbci.co.uk/*.png

1) did i get it right?
2) can it be just one line with both file types?

No idea, can't use modern adblockers myself, so YOU can tell much better as I:
just try it and look if it works as intended :cool:

For adblocker rules syntax Hermes is the top expert.
Check out his examples in the topic where my macro was posted too last year:
http://kmeleonbrowser.org/forum/read.php?9,145345,145387#msg-145387

But you're using KM-PRO, that package includes already the FF addon adblockPLUS out-of-box.
This is a completely independant, different, and much more powerful adblocker as the "Basic" one in adblock.dll/adblock.txt
And am not sure if using 2 adblockers at same time will not produce conflicts?
(But that was discussed often before, and Hermes explained us in detail, the prob is just I keep forgetting complicated stuff that I can't use myself, sigh.)

But back again to your original question:
Quote
cpm1a_new
Page Display --> Images --> Load Images --> Always. paste the current URL in "Images Permissions" field --> "Block". for some websites entries in the Images Permissions list look like this:

Site https (only this, nothing else!)
State Denied

and images are not blocked. how come?

This native function should work too of course (bottom-up rule not top-down, but should work as intended), and now your "https only" restriction makes me wonder.
Can you explain more?
Have also read that some time ago Mozilla changed the rules for those black/whitelist domains, stored in file permissions.sqlite. A few years ago only the domains without any "http(s)" were stored, then they switched to storing http+https separately. But KM was probably never updated to reflect this?
Am especially curious how that affects the crucial ExExceptions addon (own KM-version)?
Hope it still works with modern KM??



Edited 1 time(s). Last edit at 08/24/2019 10:32AM by siria.

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: cpm1a_new
Date: August 24, 2019 02:12PM

>For adblocker rules syntax Hermes is the top expert

he is. so [F2] \ KM-Plugins \ adblock --> enabled + adblock.txt in profile folder:

https://ichef.bbci.co.uk/$image

> But you're using KM-PRO, that package includes already the FF addon adblockPLUS out-of-box.
This is a completely independant, different, and much more powerful adblocker as the "Basic" one in adblock.dll/adblock.txt. And am not sure if using 2 adblockers at same time will not produce conflicts?

didnt' see any conflicts so far. and this solution is just what i asked for.
even no need for nukeimage2adblockBAB.kmm, as adding sites to the blacklist happens quite rare, so i can do it manually just by editing the addblock.txt.

and the images are already blocked before download, am i right?

@hermes
@siria

thanks!



Edited 12 time(s). Last edit at 08/25/2019 06:37AM by cpm1a_new.

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: siria
Date: August 25, 2019 08:14AM

@hermes
Quote
hermes
Fully supported the work of tools on https pages as / or offline.
(direct link) http://getfile.dokpub.com/yandex/get/https://yadi.sk/d/vyF2dC0wmriFjw (49.8 Kcool smiley

Maybe someone else will come in handy, a link to my cloud. Everything that I laid out and gave links to there.
https://yadi.sk/d/7rwT0U-PtazDJ

After another quick look I finally realized how to download it - oops, couldn't be easier:
http://getfile.dokpub.com/yandex/get/https://yadi.sk/d/7rwT0U-PtazDJ

But now running into another prob: it downloads without telling the file size, and loads... and loads... and loads.... But my disk and bandwith are very limited. Finally paused it now at 140MB, but when closing the session that will be lost (must remember next time to use FDM not KM)
How big is that complete file?

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: hermes
Date: August 25, 2019 09:59AM

@siria

This is NOT file, this is way in my cloud. I can make contents of cloud as an archive if you want.

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: siria
Date: August 25, 2019 10:27AM

Quote
hermes
This is NOT file, this is way in my cloud.

Your original link, yes. But what are those 140MB already downloaded, if not a file...?

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: anonymous
Date: August 25, 2019 11:27AM

@siria
It is the complete archive.

KMM_EXT.zip No errors found. Size: 282.809.514 bytes.

Use a modern UA to get a list of the tree. Append /9x to view the content of 9x folder. It contains only one zipped video file named 9x_KM_info.zip. Download works with wget command line tool from 2001 via getfile.dokpub.com.

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: siria
Date: August 26, 2019 01:24PM

Quote
anonymous
@siria
It is the complete archive.

KMM_EXT.zip No errors found. Size: 282.809.514 bytes.

Use a modern UA to get a list of the tree. Append /9x to view the content of 9x folder. It contains only one zipped video file named 9x_KM_info.zip. Download works with wget command line tool from 2001 via getfile.dokpub.com.

Thanks for the info, just what I needed to know. That download was just too big for the moment, and don't have enough time for a closer look anyway, so have cancelled again. Perhaps can try again some time later.
And hope to sometime manage to finally install WGET and learn to use it! Just about everyone everywhere recommands it highly, must be a true must have tool.

Options: ReplyQuote
Re: Problem with Images Blocking Exceptions
Posted by: hermes
Date: August 26, 2019 05:21PM

@siria

The most useful is specially posted in a smaller archive.
There are many automatic macros for various ideas.
Sure, something could be useful. There are also unique things.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.