K-Meleon
KMeleonWiki > Resources > MacroLibrary > Cookie Warning --
Submitted by: Johnny Sim-Bravenboer
Notes:
This simple macro allows you to enable and disable cookie warnings from the menu.
Cookie warnings allow you to (permanently) accept or reject cookies from the websites you visit.
To have the options properly checked on startup, add to the following macro:
OnStartup?{
setcheck("macros(cookiewarn-enable)", getpref(BOOL, "network.cookie.warnAboutCookies") == "true" ? true:false); setcheck("macros(cookiewarn-disable)", getpref(BOOL, "network.cookie.warnAboutCookies") == "false" ? true:false);
}
Add the following macros as a whole:
# Enable Cookie Warnings cookiewarn-enable{ menu = "Enable cookie warnings" setpref(BOOL, "network.cookie.warnAboutCookies", true); setcheck("macros(cookiewarn-enable)", getpref(BOOL, "network.cookie.warnAboutCookies") == "true" ? true:false); setcheck("macros(cookiewarn-disable)", getpref(BOOL, "network.cookie.warnAboutCookies") == "false" ? true:false); } # Disable Cookie Warnings cookiewarn-disable{ menu = "Disable cookie warnings" setpref(BOOL, "network.cookie.warnAboutCookies", false); setcheck("macros(cookiewarn-disable)", getpref(BOOL, "network.cookie.warnAboutCookies") == "false" ? true:false); setcheck("macros(cookiewarn-enable)", getpref(BOOL, "network.cookie.warnAboutCookies") == "true" ? true:false); }
Add to the existing function:
Permissions{
macros(cookiewarn-enable) macros(cookiewarn-disable)