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  : -
#
# ------------------------------------------------------------------------------------------------------------------

# ----- PRIVATE

# 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!")));
}

_TAR_BuildMenu{
  setmenu(PageDisplay, macro, "Auto Image Resizing", _TOGGLE_AUTORESIZE);
  setmenu(ImageView, macro, "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.