Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
ScrollOnLoad (ultratiny macro! grinning smiley)
Posted by: siria
Date: November 12, 2015 12:38AM

Well possible that something like this peanut already exists, even multiple times, no idea.
But after struggling for months endlessly and hard with other macros and mostly just wasting time in vain, kinda frustrating, here comes now a 10-minute-macro!!

Have an often visited page that is too big for your small screen and you constantly have to scroll a bit after loading, and over time this gets on your nerves?
Add the site in this macro, and it will autoscroll itself every time!

"Installation" :cool: Save the attached file into your KM macros folder.

Customize:
Open it from there with an editor like notepad and add your own URLs.
The scrolling values are in pixels, in the example "100,50" means to scroll 100px right, 50px down.
If you don't know how many pixels you need, make a screenshot and your image editor can tell you the sizes.

Recommand to use the attachment, because it's already in UTF-8 encoding, otherwise you may get trouble with special non-english characters. The complete macro is just this:

#-----------------------------------------------

# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
# HOWTO: https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY
# FORUM: http://kmeleonbrowser.org/forum/read.php?9,136278

ScrollOnLoad{
$_scroll="0,0";
index($URL,"http://wetterstationen.meteomedia.de/?station=")==0 ? $_scroll="100,50" : 0;
index($URL,"http://wetterstationen.meteomedia.de/station=")==0 ? $_scroll="100,50" : 0;
#
$_scroll>"0,0" ? injectJS("(function(){window.scroll(".$_scroll.");})() ") : 0;
$_scroll="";
}

$OnLoad=$OnLoad."ScrollOnLoad;";
$macroModules=$macroModules."ScrollOnLoad;";




Edited 4 time(s). Last edit at 11/12/2015 07:42AM by siria.

Attachments: ScrollOnLoad.kmm (624 bytes)  
Options: ReplyQuote
Re: ScrollOnLoad (ultratiny macro! grinning smiley)
Posted by: JamesD
Date: November 12, 2015 01:40PM

Wonderful idea. I have a few sites where I can really make use of this.

Options: ReplyQuote
Re: ScrollOnLoad (ultratiny macro! grinning smiley)
Posted by: siria
Date: November 13, 2015 10:05PM

Cool, thank you smiling smiley
Such spontaneous little ideas are often the best!



(sig) New unofficial K-Meleon 76.4 (KMG76.4) available, in own subforum.
Based on Goanna engine, called 'test' builds forever but more stable as 75.1 acc. forum members. It's 1-2 generations ahead of predecessor KM76RC-2016
K-Meleon FAQ (link missing in forum sidebar)
Tips&Tricks - Learning new stuff every day
New to K-Meleon? What do you like? What not?

Options: ReplyQuote


K-Meleon forum is powered by Phorum.