General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Privacy: clear all data - create an exception?
Posted by: Mello
Date: December 05, 2017 11:44PM

Is there a way to create an exception for logins
when using the "clear all privacy related data" option?

I'm using this hot key script I found here

Add following to accel.cfg in browser/settings:

%ifplugin privacy
CTRL SHIFT VK_DELETE = macros(kPrivacy_ClearAll)
%endif

Options: ReplyQuote
Re: Privacy: clear all data - create an exception?
Posted by: siria
Date: December 06, 2017 01:01AM

It's just a macro, that means no prob.
The definition is in /macros/main.kmm
Those lines:

kPrivacy_ClearAll{
macroinfo=_("Clear all privacy related data");
if (confirm(_("Clear all privacy related data"), _("Clear All"), YESNO, QUESTION) == "YES") {
plugin(privacy,ClearCache);
plugin(privacy,ClearCookies);
plugin(privacy,ClearHistory);
plugin(privacy,ClearMRU);
plugin(privacy,ClearSignon);
}
}

and further down the menu creation:

$kPrivacy?setmenu("&Clear Data",macro,"Clear A&ll",kPrivacy_ClearAll,"privacy(Config)"):0;

========
now you have 3 possibilities to choose from:

1) the simplest, if you NEVER want to delete passwords:
just disable the line with "Signon" by typing a comment # sign at the beginning of the line. Save and restart.


2) OR: make a copy of that command inside main.kmm
Copy the whole first block, but without the Signon-line, to a new name (suggestion: kPrivacy_Clear4x ?)
Also duplicate the menuline, like this:
$kPrivacy?setmenu("&Clear Data",macro,"Clear all except PW",kPrivacy_Clear4x,"privacy(Config)"):0;

1+2 have the disadvantage, if some day you update KM by overwriting the old version, this file (main.kmm) will be overwritten and your modifications lost. So I would recommend to make a backup copy of that file somewhere.

============

Independant, but more complicated is possibility 3)
Do not touch main.kmm, instead make a new kmm file (Clear4x.kmm), write into it this "new" macro and a complete menu creation:

kPrivacy_Clear4x{
macroinfo=_("Clear all privacy related data except passwords");
if (confirm(_("Clear all privacy related data, except passwords?"), _("Clear 4x"), YESNO, QUESTION) == "YES") {
plugin(privacy,ClearCache);
plugin(privacy,ClearCookies);
plugin(privacy,ClearHistory);
plugin(privacy,ClearMRU);
}
}

_Clear4x_BuildMenu{
$kPrivacy?setmenu("&Clear Data",macro,"Clear all except PW",kPrivacy_Clear4x,"privacy(Config)"):0;
# OPTIONAL:
setaccel("CTRL SHIFT VK_DELETE","macros(kPrivacy_Clear4x)");
}
$OnInit=$OnInit."_Clear4x_BuildMenu;";
$macroModules=$macroModules."Clear4x;";

===========
PS: didn't test, just hope no typos inside...
At any rate, make a copy of your whole profile folder FIRST ;-)



Edited 1 time(s). Last edit at 12/06/2017 01:06AM by siria.

Options: ReplyQuote
Re: Privacy: clear all data - create an exception?
Posted by: Mello
Date: December 07, 2017 10:47PM

I went for option 3 siria

It was very nice to see "Clear all privacy related data, except passwords?" appear.

It works, thank you.

Options: ReplyQuote
Re: Privacy: clear all data - create an exception?
Posted by: siria
Date: December 07, 2017 11:16PM

Thank you too, Mello!

PS just in case: of course the same shortcut to the real "clear all" must be deleted in accel.cfg, or it's pure luck which of the 2 commands KM will execute.
Quote
Mello
I'm using this hot key script I found here
Add following to accel.cfg in browser/settings:
%ifplugin privacy
CTRL SHIFT VK_DELETE = macros(kPrivacy_ClearAll)
%endif


Options: ReplyQuote
Re: Privacy: clear all data - create an exception?
Posted by: Mello
Date: December 08, 2017 11:37PM

Already done, thanks.

Options: ReplyQuote
Re: Privacy: clear all data - create an exception?
Posted by: cpm1a_new
Date: September 04, 2019 01:53PM

i also created an exception for cookies. but any way to add ClearPrevSearches? that would be the final tweak to make the macro just perfect (for me)



Edited 5 time(s). Last edit at 09/04/2019 02:09PM by cpm1a_new.

Options: ReplyQuote
Re: Privacy: clear all data - create an exception?
Posted by: siria
Date: September 04, 2019 02:12PM

Quote
cpm1a_new
i also created an exception for cookies and it suites me fine. any way to ADD ClearPrevSearches?

That's a macro module name, but an underscore at the beginning is part of the name.
=> add this line:
macros(_ClearPrevSearches);

Options: ReplyQuote
Re: Privacy: clear all data - create an exception?
Posted by: cpm1a_new
Date: September 04, 2019 03:38PM

yes, i did. also disabled "Delete All Previous Searches?" and "Previous Searches Deleted" in search.kmm

thanks!



Edited 2 time(s). Last edit at 09/04/2019 04:02PM by cpm1a_new.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.