K-Meleon
KMeleonWiki > Resources > MacroLibrary > MacroLibrary2 > 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 macro:
Sync{ &EngineSync; setcheck("macros(SN0)",getpref(INT,$so)==0? true:false); setcheck("macros(SN1)",getpref(INT,$so)==1? true:false); setcheck("macros(SN2)",getpref(INT,$so)==2? true:false); setcheck("macros(SearchLock)",getpref(BOOL,$sl)); ... setcheck("macros(cookiewarn)", getpref(BOOL, "network.cookie.warnAboutCookies") == true ? true:false); }
Add the following macros as a whole:
# Toggle Cookie Warnings cookiewarn{ menu = "Enable Cookie Warnings" togglepref(BOOL, "network.cookie.warnAboutCookies"); &Sync; getpref(BOOL, "network.cookie.warnAboutCookies") == true ? $warn = "enabled" :$warn = "disabled"; alert("Cookie warnings have been ".$warn."!"); }
Add to the existing function:
Permissions{ macros(Cookies) macros(cookiewarn) - macros(Images) macros(Popups) - macros(Master, Master Password) macros(Cert, Digital Certificates) }