# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # ---------- Display All Images ------------------------------------------------------------------------------------ # # Dependencies : main.kmm (ExecMacros) # Resources : - # Preferences : - # # ------------------------------------------------------------------------------------------------------------------ # # Display All Images In Page v. 1.0 - Opens and displays images linked in current document. # DispAllInit{ $nsGlobalReady3 = getpref(STRING,"capability.policy.default.javascript.enabled"); $nsGlobalReady3=="noAccess" ? &NoScriptCompatApplyOn:0; &Display_All_Img; $nsGlobalReady3=="noAccess" ? &NoScriptCompatApplyOff:0; } Display_All_Img{ injectJS("var i = document.getElementsByTagName('img'); var bd = document.createElement('div'); bd.id='dispallimg'; for (var l = 0; l'; bd.innerHTML=bd.innerHTML + hrimg; }}} document.body.innerHTML = ""; document.body.insertBefore(bd,document.body.firstChild);"); injectCSS("body \* \{display\:none\!important\;\} \#dispallimg \{display\:block \!important\;\} img.dispalli \{display\:block\!important\; margin-left\:auto\!important\; margin-right\:auto\!important\;\}"); } NoScriptCompatApplyOn{ setpref(STRING,"capability.policy.default.javascript.enabled","allAccess"); setpref(BOOL,"noscript.global","true"); } NoScriptCompatApplyOff{ setpref(STRING,"capability.policy.default.javascript.enabled","noAccess"); setpref(BOOL,"noscript.global","false"); } # ----- PRIVATE _DispImg_BuildMenu{ setmenu(ImageView,macro,"Display All Images In Page",DispAllInit); } $OnInit=$OnInit."_DispImg_BuildMenu;"; # ------------------------------------------------------------------------------------------------------------------ $macroModules=$macroModules."DispImg;";