Improvement requests :  K-Meleon Web Browser Forum
Use this forum to talk about a feature you're missing. 
Right-click context menu : add "top of page" and "bottom of page"
Posted by: mhf
Date: September 02, 2009 11:52AM

I'd really like to try and code this myself if someone can point me to where I can find these commands : top of page and bottom of page.

I know you can do this with mouse gestures but I'm a context menu freak. smiling smiley

What I want to do is to add these commands to the right-click context menu when in a page so as to go instantly to either the top or the bottom of the page (as with ctrl-home and ctrl-end keys).

Any ideas ? Thanks in advance !



Edited 1 time(s). Last edit at 09/02/2009 11:52AM by mhf.

Options: ReplyQuote
Re: Right-click context menu : add "top of page" and "bottom of page"
Posted by: JujuLand
Date: September 02, 2009 01:46PM

Quote
mhf
I know you can do this with mouse gestures but I'm a context menu freak.

For me, there is no such gesture which does it, just some gestures which use js function to scroll up, down, left or right.

You can use it, but it's not exactly what youre asking for.

A+



Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0


Web: http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr



Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc



Options: ReplyQuote
Re: Right-click context menu : add "top of page" and "bottom of page"
Posted by: mhf
Date: September 02, 2009 04:47PM

Merci Jujuland, but effectively that's not what I'm looking for...

Options: ReplyQuote
Re: Right-click context menu : add "top of page" and "bottom of page"
Posted by: mhf
Date: September 05, 2009 05:13PM

No help for me ?

I have seen that there is no corresponding command in Commands.text but surely this shouldn't be that difficult to code ?

Options: ReplyQuote
Re: Right-click context menu : add "top of page" and "bottom of page"
Posted by: disrupted
Date: September 05, 2009 07:35PM

no, no commands.. i made something with js

pagetopend_go
http://kmext.sourceforge.net/macros/gopagetopend.7z

access from tab button context menu>page top|page end


# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage)
#go to page top or page end

topgo{
$_jscurrent=getpref(BOOL,$pref_JavaScript);
setpref(BOOL,$pref_JavaScript, true);
injectJS("scroll(0,0)");
setpref(BOOL,$pref_JavaScript, $_jscurrent);
}

endgo{
$_jscurrent=getpref(BOOL,$pref_JavaScript);
setpref(BOOL,$pref_JavaScript, true);
injectJS("scroll(0,100000000000)");
setpref(BOOL,$pref_JavaScript, $_jscurrent);
}

topend_BuildMenu{
setmenu("TabButtonPopup",inline,endtop_go,2);
setmenu(endtop_go,macro,"Page Top",topgo);
setmenu(endtop_go,macro,"Page End",endgo);
}

$OnInit=$OnInit."topend_BuildMenu;";
# ------------------------------------------------------------------
$macroModules=$macroModules."topend_go;";


Options: ReplyQuote
Re: Right-click context menu : add "top of page" and "bottom of page"
Posted by: mhf
Date: September 05, 2009 10:16PM

THANKS disrupted ! Although I would have preferred it in the right-click context menu in a page.



Edited 1 time(s). Last edit at 09/05/2009 10:19PM by mhf.

Options: ReplyQuote
Re: Right-click context menu : add "top of page" and "bottom of page"
Posted by: kko
Date: September 06, 2009 07:25AM

Quote
mhf
I have seen that there is no corresponding command in Commands.text...

You just need to look at the tab "Manage Actions" in the mouse gestures configuration...

Quote
mhf
...but surely this shouldn't be that difficult to code ?

Indeed. Open Edit > Configuration > Menu and paste the following lines (you have to restart km to make this change take effect):

DocumentScrolling{
Scroll Up=macros(JS_scrollTop)
Scroll Down=macros(JS_scrollBottom)
}
!Document{
%ifplugin macros
!DocumentScrolling|DocumentOpenExternal
%endif
}


Options: ReplyQuote
Re: Right-click context menu : add "top of page" and "bottom of page"
Posted by: mhf
Date: September 06, 2009 08:59AM

THANKS kko, that's perfect.

Quote
kko
You just need to look at the tab "Manage Actions" in the mouse gestures configuration...

...I never thought to look there ...!

Options: ReplyQuote


K-Meleon forum is powered by Phorum.