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.
Note: To have the cookie warning working you need to allow K-meleon to accept cookies first:
In Edit\Preferences\Privacy, check either the option to accept all cookies, or session cookies.
To have the options properly checked on startup, add to the following macros:
Sync{
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); &Sync; } # Disable Cookie Warnings cookiewarn-disable{ menu = "Disable cookie warnings" setpref(BOOL, "network.cookie.warnAboutCookies", false); &Sync; }
Add to the existing function:
Permissions{
macros(cookiewarn-enable) macros(cookiewarn-disable)