K-Meleon

KMeleonWiki > Resources > MacroLibrary > KmmClearLastSession

Submitted by: desga2



Notes:

This is a privacy option to clear last browsing session at start K-M browser. With this code the new option can be checked in menu: Tools -> Privacy -> Clear last session at start.




Open your User Macro Folder (Edit > Configuration > User-Defined Macros) or your Macro Folder (Edit > Configuration > Macros) and create the following text file(s):

ClearLastSession.kmm

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)

# ---------- Clear Last Session -----------------------------------------------
#
# Dependencies        : $kSessions
# Resources        : -
# Preferences        : -
#
# -----------------------------------------------------------------------------

$CLSession_Pref="kmeleon.plugins.macros.sessions.last";

Clear_LastSession{
menuchecked=(getpref(BOOL,$CLSession_Pref)==true);
togglepref(BOOL,$CLSession_Pref);
}

# ----- PRIVATE

_Clear_Session{
$_prefv=getpref(BOOL,$CLSession_Pref);
$_prefv==true?delpref("kmeleon.plugins.macros.groups.last"):0;
$_prefv==true?delpref("kmeleon.plugins.macros.groups.temp"):0;
}

_Sessions_BuildMenu{
$kSessions==true?setmenu("kPrivacy",macro,"Clear last session at start","Clear_LastSession"):0;
}

$OnInit=$OnInit."_Sessions_BuildMenu;_Clear_Session;";

# -----------------------------------------------------------------------------
$macroModules=$macroModules."Clear_Last_Session;";


Comments & Questions

K-Meleon

(c) 2000-2007 kmeleon.org. All rights reserved.
design by splif.