K-Meleon

KMeleonWiki > Resources > MacroLibrary > Auto Image Resize

Submitted by: Johnny Sim-Bravenboer

Notes:

This macro adds the options to toggle whether or not K-Meleon should automatically resize large images to the View menu and the image right-click menu.


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

AutoResize?.kmm

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

# ---------- Auto Image Resizing -----------------------------------------------------------------------------------
#
# Dependencies : -
# Resources    : -
# Preferences  : -
#
# ------------------------------------------------------------------------------------------------------------------

# TOGGLE AUTO RESIZING OF LARGE IMAGES

TOGGLE_AUTORESIZE{
  menuchecked = (getpref(BOOL,"browser.enable_automatic_image_resizing"));
  togglepref(BOOL, "browser.enable_automatic_image_resizing");
  getpref(BOOL, "browser.enable_automatic_image_resizing")? $sts = "enabled" :$sts = "disabled";
  statusbar(sub("%s",$sts,_("Auto Image Resize has been %s, refresh the page for the setting to take effect!")));
}

# ----- PRIVATE

_TAR_BuildMenu{
  setmenu(PageDisplay, macro, "Enable Auto Image Resizing", TOGGLE_AUTORESIZE);
  setmenu(ImageView, macro, "Enable Auto Image Resizing", TOGGLE_AUTORESIZE);
}


$OnInit=$OnInit."_TAR_BuildMenu;";

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


Comments & Questions

K-Meleon

(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.