Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
ExExceptions - per-site permissions manager
Posted by: Merlin
Date: December 27, 2012 06:23PM

This Extension edit permissions.sqlite for site domain only.
You can specify which web sites are allowed or denied to load various types of document elements .

It Control in:

* Cookies .
* Image .
* Popup.
* Document (Block The domain site ).
* Object (Block All object for the domain like flash swf,flv...) .
* Script .
* stylesheet.
* Install .
* ObjectSubRequest .
* Refresh .
* Ping .
* Subdocument .
* XmlHttpRequest ( Sent & receive Data ).
* Xbl (xul).
* Dtd (xul,XML).

Also it support Import/Export , so you can create text with all permissions you want then Import it again .

screenshot: IMAGE1 , IMAGE2

Download Link : File.

Notes :
This Extension set permissions for ONLY THE SITE Domain , not for ALL sites or links or iframe embedded so may some elements not block correctly.


There is also global Pref Keys that block all this element WITH out determined site .
I will create update to the privacy Bar with this keys soon.

Merry Christmas and Happy New Year for every one .



Edited 2 time(s). Last edit at 10/31/2017 10:19PM by rodocop.

Attachments: ExExceptions.7z (12.2 KB)  
Options: ReplyQuote
Re: site permissions
Posted by: rodocop
Date: December 28, 2012 06:48AM

cool stuff, Merlin!!

Options: ReplyQuote
Re: site permissions
Posted by: deadlock
Date: December 28, 2012 03:21PM

@Merlin
A very nice idea to use permissions.sqlite.

It is a simple and small solution for those who don't
want to install external filters and/or ABP.
I've disabled pictures, scripts and cookies for
kmeleon.sourceforge.net and it does no longer download
the pictures, set cookies or execute scripts.

Pictures with unknown extensions need different switches.

Adding 5000 sites may take a while, but import/export feature
allows the use of predefined settings.

What's up with the kmextensions folder?
I've seen it many times, but don't now who needs it.

Options: ReplyQuote
Re: site permissions
Posted by: rodocop
Date: December 28, 2012 07:52PM

Quote
deadlock
What's up with the kmextensions folder?
I've seen it many times, but don't now who needs it.

KM Extension Manager when uninstalling complex extensions, not?

Options: ReplyQuote
Re: site permissions
Posted by: Merlin
Date: December 28, 2012 08:05PM

The ini files in kmextensions folder , store the extensions information that Extensions Manager need it for uninstall Extensions .
So if you use the extensions manager , you should keep this folder .



Edited 1 time(s). Last edit at 12/28/2012 08:25PM by Merlin.

Options: ReplyQuote
Re: site permissions
Posted by: deadlock
Date: December 29, 2012 05:31PM

@rodocop
Thanks. I knew about KEM,
but never tried to use it.

I was always asking myself if it's the
only tool using the ini files.

@Merlin
If KEM uses the ini for uninstall,
the permissions.sqlite file in user profile
will continue blocking sites.

But now I understand, why all extensions
should contain kmextensions/*.ini.

ExExceptions.7z -> Extended-Exceptions_KEM.7z

I think this package is good enough to be added
to (F2) kmprefs.jar "Content Filter Options".
It only needs some translation.

Options: ReplyQuote
Re: site permissions
Posted by: Wasi
Date: July 01, 2013 09:25AM

This is one of the best extension.
I am using it extensively.
Just to ask, will you write little guide? third-party etc
Great work, Thanks a lot

Options: ReplyQuote
Re: site permissions
Posted by: siria
Date: September 08, 2015 09:18PM

Can't believe it... again! What a great little extension,exactly what I was missing for years, while it was here all the time!! *dropdead*
A full flegded sqlite-editor and the whole thingie just tiny 12kB, incredible. And working even on win98, and in KM1.6!! Had it even downloaded a year ago, that's where I stumbled upon it again now, but never got around to test and then forgot it again - as so much great stuff

screenshot borrowed from here:
http://kmeleonbrowser.org/forum/read.php?1,130161


On win98 the 3 special signs (checkmark, cross, etc) don't show right, but they do show in different colors and in clear text in the boxes above, and editing works perfectly fine too.

Yeah not all types may work, but the most missed ones work great:
stylesheet, object, subdocuments! (but could test only in KM1.6)

The matching GLOBAL prefs are called
permissions.default.image
permissions.default.script
permissions.default.stylesheet
permissions.default.object
permissions.default.subdocument
and some more

Some mozilla infos here (hostperm is obsolete, but the descriptions should still be valid for successor permissions.sqlite too)
http://kb.mozillazine.org/Hostperm.1

The macro "permdefs" creates a menu for those default settings.

Options: ReplyQuote
Re: site permissions / addon ExExceptions / macro ExExPermission
Posted by: siria
Date: September 09, 2015 12:02AM

Couldn't resist and made Version-3 of the kmm-file, to create a button (not pretty, but a button) :cool:
And moved the menu line from Tools into the PrivMenu.

If you want a toolbar button, install version-1 from first post, then
- copy the attached bmp-image from THIS post into the skins/default folder
- and the attached kmm-file into the macros folder (overwrites version-1)

Edit:
Aaargh... Forgot, in KM7X the folder structure and other stuff is different now, so the 7z in 1st post only works for KM1.x! sad smiley
KM7X will need an update first. Anyone have a newer version already...?

Edit-2:
Looks like it (2012 version) isn't meant to handle entries starting with a dot, like it's often used for cookies. Not sure what this means?

Edit-4:
new kmm-version v4 attached. Fixed a wrong path in KM7X, oops.
Renamed everything to original Addon name "ExExceptions", since it does all the work alone:
https://addons.mozilla.org/en-us/firefox/addon/exexceptions/



Edited 4 time(s). Last edit at 10/15/2015 09:58PM by siria.

Attachments: macro_ExExceptionsKM.bmp (774 bytes)   ExExceptions.kmm (3.3 KB)  
Options: ReplyQuote
Re: site permissions / addon ExExceptions / macro ExExPermission
Posted by: rodocop
Date: September 09, 2015 08:56AM

Naruman has one ready (as xpi) in his '+1' addon pack.

Read his thread, siria!

Options: ReplyQuote
Re: site permissions / addon ExExceptions / macro ExExPermission
Posted by: siria
Date: October 15, 2015 10:10PM

Have updated the kmm+button above to version4, it mainly fixes a wrong path for KM7X. Note that the filenames are also changed (to ori ExExceptions), so the old ones must be deleted manually.
Must admit v4 today was done a bit in a hurry and not quite thoroughly tested yet, please post if something doesn't work :cool:

For KM75 (74?) an xpi-addon instead of the jar is necessary.
Rodocop has included it in his attachment here:
http://kmeleonbrowser.org/forum/read.php?9,135677,135718#msg-135718
Works great, but I'd exchange the kmm with mine above, and include the button :cool:

Currently that xpi has a minor bug, the URL-field is not filled automatically. But looks like we only have to copy over narumans fixed content-js-file from KM74.1... and perhaps also adjust the meta-inf?
Rodo...? ;-)

One big pity: The important "media" pref is missing yet in the manager sad smiley
And the xul-window could use a bit vertical compacting...

In KM75(.1? 7X?) there's some bug with maximizing xul-windows, and they do not fire $OnLoad, so have no workaround yet either. The window opens rather small.

If anyone prefers to open it in a TAB instead, just look inside the KMM-file and shorten "&OpenURL_InNewWindow" to "&OpenURL_InNew"



(sig) New unofficial K-Meleon 76.4 (KMG76.4) available, in own subforum.
Based on Goanna engine, called 'test' builds forever but more stable as 75.1 acc. forum members. It's 1-2 generations ahead of predecessor KM76RC-2016
K-Meleon FAQ (link missing in forum sidebar)
Tips&Tricks - Learning new stuff every day
New to K-Meleon? What do you like? What not?

Options: ReplyQuote
ExExceptions 2017 - final release!
Posted by: rodocop
Date: October 31, 2017 10:28PM

Finally got it created!

All the needed parts made by naruman (aka Merlin) and siria combined with new button icon and slightly updated macro!

While making this I've learned some useful things about macrolanguage (finally got the difference between single comma and .",". in dividing multiple arguments and their parameters. So don't fire up your LOLs - yes, I was dumb in such syntax things!) and now my macros will be way better!

But more important - I finally understand how to handle multiple-sized ico files in KM to force our browser automatically select needed size from ICO when toolbar is resized by KM settings!

Wait for my tutorial some time later!

And right now just download ExExceptions and enjoy!



Edited 1 time(s). Last edit at 10/31/2017 10:37PM by rodocop.

Attachments: exexceptions2017.7z (21.6 KB)  
Options: ReplyQuote
Re: ExExceptions 2017 - final release!
Posted by: siria
Date: November 01, 2017 12:49AM

Great, thanks for all your work! smiling smiley
Still one of my fave extensions, and think it fits perfectly to KM-philosophy. If it were me I'd add it in the native package too.

Those different icon sizes sound very useful too. Can remember last time I tried KM7X this auto-zooming created rather fuzzy pics. Sharp ico's are way better.

A bit curious about translation brackets _(), have no experience myself ecept that in setmenu lines they aren't needed. Do the button tooltips auto-translate too? Does the menu-name as variable need brackets? No clue.

Just a peanut: check the header in the kmm-file, little update lines 15/16 and 18 can be deleted now.

Options: ReplyQuote
Re: ExExceptions 2017 - final release!
Posted by: rodocop
Date: November 01, 2017 01:28AM

JamesD is the expert in translation brackets, not me. grinning smiley

But tooltips are really localizable that way, yes.

Will look at those lines for edit, sure! Thank you!



Edited 1 time(s). Last edit at 11/01/2017 01:37AM by rodocop.

Options: ReplyQuote
Re: ExExceptions 2017 - final release!
Posted by: rodocop
Date: November 01, 2017 01:34AM

Final and correct now

Attachments: exexceptions2017.7z (21.6 KB)  
Options: ReplyQuote
Re: ExExceptions 2017 - final release!
Posted by: siria
Date: November 01, 2017 06:25AM

Still think you are the expert, because you're the only one who's actually creating and using translations, regularly. Even if perhaps not yourself, but surely you'd get feedback by others if it doesn't work smiling smiley

Speaking of macrolanguage in general, after taking a long look at the button lines...
If I get it right, the difference between setcmdicon and setbuttonimage is that the first defines a general icon for use "everywhere", in toolbar+menus (diff. size automatic now?) While setBUTTONimage is only meant for the exception case of LATER changing the toolbar pic again, during session, for example as we did in the proxy macros as alternative to a "pressed" look, or whatever...
The $_size var isn't used anymore at all now, at least not here, right?



Edited 1 time(s). Last edit at 11/01/2017 07:09AM by siria.

Options: ReplyQuote
Re: ExExceptions 2017 - final release!
Posted by: rodocop
Date: November 01, 2017 11:22AM

Yes,
setbuttonimg is to be used in case of FORСED image change.
Normally we should use setcmdicon - it's more convenient, compact and... simply right way of coding macros :cool:

And yes $_sizes var isn't used anymore but is left as an example because I was thinking about to show the right way of transition from old skinning system and commands like pluginmsg to new one with addtoolbar and addbutton.

So I should decide whether to add old code commented out or wipe all inactive variables...



Edited 2 time(s). Last edit at 11/14/2017 09:21PM by rodocop.

Options: ReplyQuote
Re: ExExceptions 2017 - final release!
Posted by: rodocop
Date: November 01, 2017 11:25AM

K-Meleon strongly misses a pool of such examples of correctly written code for difficult cases - for novices like me (was a little time ago :O)

I spend a lot of hours debugging my macros not working right because of lack of good and EXPLAINED examples for a number of macrocommands.

Options: ReplyQuote
Re: ExExceptions 2017 - final release!
Posted by: siria
Date: November 01, 2017 11:48AM

Yes absolutely. We all struggle(d) very hard with that prob.
That's also why I always cringe every time when someone posts a "new" macro which uses "bad example" code from some older macro. Happens with about 80%, especially the (actually easy) menu-stuff. And the unnecessary "complicatedness" gets perpetuated again, and again, forever, because most copy-coders don't fully know what they are doing and exactly because of this aren't ready to adjust anything later, insisting to "never touch a running macro" :cool:

But today the situation is already a lot better as in my own beginnings, because the wiki contains now a bunch of example code lines. Still room for improvement of course, simplification of the examples etc.

And I think JamesD has actually made a tutorial-macro for building macros, long ago, but have learned about this way too late for own use.

My own beginnings with macros were really complete HORROR if there happened some strange (syntax) bug, because I didn't have the slightest clue yet about those invaluable helper tools:
1) editors with syntax highlighting!! Didn't even know such a thing is possible. Shows already 90% of syntax typos (the Scite version by kko)
2) the Error Console!! Somewhere (button?menu?...?) it was called "javascript console", so from the very beginning I thought "that's something for JS-coding, I'm not doing that at all, FORGET it" And so I forgot it for a very long time sad smiley
Wasted hundreds of struggling hours and nerves just missing those two tools sad smiley



Edited 1 time(s). Last edit at 11/01/2017 12:46PM by siria.

Options: ReplyQuote
Re: ExExceptions... / macrolanguage
Posted by: siria
Date: November 03, 2017 03:41PM

Hmm, speaking of "good old macros" as template...
Just a few more basic macro explanations :cool:

$OnLoad:
This text variable is a little list for the names of several macros that shall run automatically. That means they will all be executed after each and every page load of whatever domain. No exceptions. All listed macros, on all URLs.

That also means, if the action of a macro is, for example, to download a 3MB script from an external server, then it downloads those 3MB from that server after EVERY page load too, on whatever domain. Not sure if from the second page it loads only from cache perhaps, but probably depending on user settings.

menugrayed:
Only used to gray out an entry in a menu, so that a user cannot call it manually by MENU (all other means still work, by shortcut or button, automatic by $OnLoad, or called by another macro).
If the macro is not called by a setmenu-line however, graying that line out is useless.

If a macro shall only run on specific domains, an "if" condition is necessary instead of "menugrayed."

And would check the "injectJS" command, very handy...
The main advantage over "open(JS)" is that scripts fired by injectJS run even if the user has blocked JS. For most little macros that's enough, only if afterwards the user needs JS yet again it must be switched on.



Edited 1 time(s). Last edit at 11/03/2017 06:51PM by siria.

Options: ReplyQuote
Re: ExExceptions... / macrolanguage
Posted by: rodocop
Date: December 02, 2018 11:37PM

Just some portion of Knowledge to be saved here:

ExExceptions can import permission-lists in hostperm1 format.

This format was already discussed here years ago (KM and FF that days stored permissions info directly in such type of files) and there was the link to the site of Peter Lowe (maintainer of one of the adservers list).

Author allows to view and use his list in different formats (from hosts file to ABP-subscription, from Opera urlfilter.ini to hostperm1)

So you can easily add this filtering using your ExExceptions by saving list in hostperm format and importing it with addon.





Edited 1 time(s). Last edit at 12/02/2018 11:37PM by rodocop.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.