K-Meleon

KMeleonWiki > Resources > MacroLibrary > Auto Image Resize

Submitted by: Johnny Sim-Bravenboer


This macro is no longer needed in K-Meleon version 1.02, since the option to
automatically have images fit the brower window has already been added to:

Edit -> Advanced Preferences -> Page Display -> Resize large images to fit the browser window



Notes:

With this macro you can en- or disable automatic resizing of pictures in K-Meleon from the View\Zoom menu.


Note: Only the grayed code needs to be added


In Macros:


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(toggle_autoresize)", getpref(BOOL, "browser.enable_automatic_image_resizing") == true ? true:false);

}


# Enable Automatic Image Resize

toggle_autoresize{    
   menu = "Enable Auto Image Resizing"
   togglepref(BOOL, "browser.enable_automatic_image_resizing");
   &Sync;
   getpref(BOOL, "browser.enable_automatic_image_resizing") == true ? $warn = "enabled" :$warn = "disabled";
   alert("        Auto Image Resize has been ".$warn."! \n\n Refresh the page for the setting to take effect.");
}


In Menus:

Zoom{


%ifplugin macros
macros(toggle_autoresize)
-
%endif

!Zoom In
-
!Zoom Out
-
:Zoom Button Options
}


Comments & Questions

K-Meleon

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