Extensions :  K-Meleon Web Browser Forum
All about K-Meleon extensions. 
New macros here and there, just collecting
Posted by: siria
Date: October 04, 2014 07:31PM

So many get lost in other parts of the forum, buried between long discussions. Perhaps this can become a little list for those random and often sponaneous ones, also too tiny ones for an own thread.
Feel free to add more yourself!
By no means complete:

---------
KMEXT-archive for KM74
Some macros/extensions need to be modified for KM74.
(Not complete / Check the readme files and info text on http://kmext.sourceforge.net)
http://kmext.sourceforge.net/km74

---------
AdBlock Plus in KM74 (how to by guenter+GeorgeHall)
http://kmeleonbrowser.org/forum/read.php?8,129657,page=3
http://kmeleonbrowser.org/forum/read.php?1,130572

---------
Speed Dial (links to older macros)
http://kmeleonbrowser.org/forum/read.php?8,129657,page=4

---------
livehttpheaders for KM74 (guenter)
http://kmeleonbrowser.org/forum/read.php?3,129797,129854#msg-129854
One of several HTTP monitor addons for Firefox that work for K-Meleon.

---------
3 macros for a Proxy-Button
http://kmeleonbrowser.org/forum/read.php?9,129715
(ProxTog, ProxTog2, Proxy2)

---------
displaytoolbarline (JamesD)
http://kmeleonbrowser.org/forum/read.php?8,129657,129785#msg-129785
Toggle hide the lines between toolbars, with menu entry in "View".
It's a native pref with a checkbox in F2>GUI>Toolbars, but the pref is missing in KM74.

---------
CarrySession (JamesD)
http://kmeleonbrowser.org/forum/read.php?8,129178,129534#msg-129534
// For KM 1.5-1.7. Deprecated in KM 7x. //

---------
SS_restart.kmm / SkinSwitcher (JamesD)
http://kmeleonbrowser.org/forum/read.php?8,129178,129524#msg-129524
Helps to restore former toolbar positions after trying out new skins

---------
Tabs Multi-Line
Not an extension, but great new and nearly unknown function yet in KM74, so still mentioning it here.
If you often have LOTS of tabs open, you can arrange them in two or more lines! Open about:config and set this pref:
kmeleon.tabs.multiline BOOL true
Currently this needs a fix tab width, or the last tab isn't shown, although you can still access it with the "next/previous tab" buttons. Set a fix width in F2>Toolbars>Tab Bar: min width same as max width

---------
Some Zoom macros for automatic text zoom (beta)
by JamesD, by dorian, by siria (sitezoom-macro tries full pagezoom, but no chance yet)
http://kmeleonbrowser.org/forum/read.php?1,130180

---------
WinSizeMenu
Adds menu to hide TitleBar and for changing window size.
Plus extra function, but doesn't work on all systems and versions:
A bug-workaround if title bar is hidden and the taskbar -if set to background- doesn't pop up when touching the screen bottom with mouse
http://kmeleonbrowser.org/forum/read.php?9,103175,131902#msg-131902

---------

EDITORIAL: All 'http://kmeleon.sourceforge.net/...' links changed to actual 'http://kmeleonbrowser.org/...' to avoid sudden logoff :cool: (c) rodocop



Edited 12 time(s). Last edit at 11/18/2017 01:59PM by rodocop.

Options: ReplyQuote
Re: New macros here and there, just collecting
Posted by: rodocop
Date: October 26, 2014 05:53PM

displaytitlebar.kmm by JamesD

#  K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- displaytitlebar.kmm
# ---------- Toggle between titlebar show and hide ( requires restart )
#
# Dependencies        : main.kmm
# Resources           :   
# Preferences         : "kmeleon.display.hideTitleBar"
# Version             : 1.0  2014-08-15  		
# --------------------------------------------------------------------------------

_displaytitlebar_toggle {
menuchecked=getpref( BOOL , "kmeleon.display.hideTitleBar" )==true;
togglepref(BOOL, "kmeleon.display.hideTitleBar");
alert(_("Restart of browser required for \ndisplay title bar change to take effect."));
}

_displaytitlebar_Build_Menu {
setmenu("Toolbars", macro, _("Hide Title bar"), "_displaytitlebar_toggle", -1);	
}

## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
$OnInit=$OnInit."_displaytitlebar_Build_Menu;";
$macroModules=$macroModules."displaytitlebar;";


fullscnmenu.kmm by JamesD

#  K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- fullscnmenu.kmm
# ---------- Toggle between menu show and menu noshow in fullscreen
#
# Dependencies        : main.kmm
# Resources           : fullscreen plugin  
# Preferences         : "kmeleon.plugins.fullscreen.hide_rebar"
# Version             : 1.0  2014-07-16  		
# --------------------------------------------------------------------------------

fullscnmenu_toggle {
togglepref(BOOL, "kmeleon.plugins.fullscreen.hide_rebar");
plugin(fullscreen); plugin(fullscreen);
}

_fullscnmenu_SetAccels {
	setaccel( "CTRL SHIFT M", "macros(fullscnmenu_toggle)" );
}

## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
$OnInit=$OnInit."_fullscnmenu_SetAccels;";
$macroModules=$macroModules."fullscnmenu;";


Attachments: xpinstallext.kmm (1.1 KB)  
Options: ReplyQuote
Re: New macros here and there, just collecting
Posted by: guenter
Date: December 12, 2014 02:26PM

Fix to Google translate pronunciation button. (disrupted)

http://kmeleonbrowser.org/forum/read.php?9,131305

Options: ReplyQuote
Re: New macros here and there, just collecting
Posted by: JamesD
Date: October 08, 2015 05:41PM

Fast and full featured native restart for K-Meleon.

http://kmeleonbrowser.org/forum/read.php?2,132731,132844#msg-132844

Options: ReplyQuote
Re: New macros here and there, just collecting
Posted by: rodocop
Date: October 10, 2015 04:48PM

xpinstallext.kmm by JamesD :cool:
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- xpinstallext.kmm
# ---------- Switch for addon xpi intstall to KM  ----------------
#
# Dependencies	: main.kmm 
# Resources	    : 
# Preferences	: "kmeleon.install_firefox_extension"
# Author        : JamesD  
# Version       : 0.3   2014-09-03
# -------------------------------------------------------------------------

_xpinstallext_perfcheck {
$_xpinstallext_PStatus = getpref(BOOL, "kmeleon.install_firefox_extension");
$_xpinstallext_PStatus ? 0 : setpref(BOOL, "kmeleon.install_firefox_extension", false) ; 
}

_xpinstallext_toggle {
menuchecked=getpref( BOOL , "kmeleon.install_firefox_extension" )==true;
togglepref(BOOL, "kmeleon.install_firefox_extension")  ; 
}

_xpinstallext_BuildMenu {
setmenu("&Edit", macro, _("Set FireFox extension install"), _xpinstallext_toggle, -1);
}

$OnStartup=$OnStartup."_xpinstallext_perfcheck;";
$OnInit=$OnInit."_xpinstallext_BuildMenu;";
# -------------------------------------------------------------------------
$macroModules=$macroModules."xpinstallext;";


Attachments: xpinstallext.7z (617 bytes)  
Options: ReplyQuote
Re: New macros here and there, just collecting
Posted by: JamesD
Date: April 29, 2016 09:01PM

Managing favorites in the 'Edge' browser in Windows 10.

NOTE::

The Edge browser does not store favorites in the conventional way in which all the versions of Internet Explorer did. Edge uses a database.

Based on the information siria provided in this forum posting:
http://kmeleonbrowser.org/forum/read.php?2,136001,138365#msg-138365

Requires the program 'EdgeManage' from this web site:
http://www.emmet-gray.com/Articles/EdgeManage.html


Many thanks to siria for finding this information.

Attachments: EdgeFavMgr.7z (956 bytes)  
Options: ReplyQuote
Re: New macros here and there, just collecting
Posted by: JamesD
Date: May 07, 2016 05:51PM

This is just a small macro to check the time it takes for K-Meleon to restart itself. Valid for versions 75.0 and later.

Note that you will get an empty report if you have not set the beginning of the test.

Two items are added to the Tools menu. They are:
"Set Timing to 'start' parameters" and
"START the timing test" .

Click on each one in the order shown, and the system will restart K-Meleon and note the unix time of every action until the OnLoadOnce event in the restarted browser. The information will appear in an alert message.

To keep the macro but not load it, just remove the check mark by "timingrs" in the Macro Extension section of Preferences.

Attachments: TimingRS.7z (1.1 KB)  
Options: ReplyQuote
Re: New macros here and there... >> Colors for Find-in-Page
Posted by: siria
Date: June 13, 2016 10:55AM

(Not really a macro, just a bit styling, don't know where to put)

Panzer posted a link to a german article about improvements in Firefox50. Big news for Firefox50 it sounds:
https://www.soeren-hentzschel.at/firefox/firefox-50-bekommt-suche-im-opera-12-stil/ (for Germans)

FF gets now Find-Highlighting like Opera12, they say. Huge step forward it sounds...
Now it's finally possible to highlight ALL Find-hits inside a page at once (Huh, really?? Whow... :coolsmiling smiley And to store that setting as default, supposedly not possible before either...

Can hardly believe that wasn't possible before in FF, considering it's a rather easy task, and KM could do that forever already :O And of course also store a user default setting if "highlight all" is on or off, by simply clicking the button in the Find bar :cool: (pref kmeleon.find.highlight)

If anyone is interested, KM users can also STYLE those highlight colors for Find-in-page, since forever too. Just one of the hundred hidden settings. Actually not a pref, but discovered a few years ago that it can be done by simple CSS. Have added this css-snippet in KM1.6 in my private adblock.css. Am storing there all my little user css snippets, because this one can be toggled during a session too, unlike userContent.css where such stuff is normally supposed to go. Guess newer KM-versions can toogle both files now during sessions. Anyway, in whatever css-file you want, add this if you like to get your own Find-Colors:

/* -------- Highlight-Search: For K-Meleon's Find in page - Highlight Button: ---------
Is needed if you force a background color, otherwise highlight shows the same
(and FIND-color is in about:config ui.textSelectBackground) */

.km_hightlight_class, * .km_hightlight_class , .km_highlight_class, * .km_highlight_class
{background-color: yellow !important; color: red !important; font-weight: bold ; font-size: 16px !important; }


Options: ReplyQuote
Re: New macros here and there... >> Colors for Find-in-Page >> auto "highlight all"
Posted by: cpm1a_new
Date: September 04, 2019 09:20AM

for both Ctrl+F and Find As You Type modes: any way to autostart "highlight all" without clicking the button in the Find bar (Opera 12-like)?



Edited 1 time(s). Last edit at 09/04/2019 09:34AM by cpm1a_new.

Options: ReplyQuote
Re: New macros here and there... >> Colors for Find-in-Page >> auto "highlight all"
Posted by: JohnHell
Date: September 04, 2019 11:37AM

Quote
cpm1a_new
for both Ctrl+F and Find As You Type modes: any way to autostart "highlight all" without clicking the button in the Find bar (Opera 12-like)?

No, always have been a bug. The button even pressed doesn't have effect and you have to toggle twice

Just assign the search next and previous (read the Documentation) to a shortcut and go through all matches. It is quicker than the highlight feature.



Edited 2 time(s). Last edit at 09/04/2019 11:38AM by JohnHell.

Options: ReplyQuote
Re: New macros here and there... >> Colors for Find-in-Page >> auto "highlight all"
Posted by: cpm1a_new
Date: September 04, 2019 02:18PM

>Just assign the search next and previous (read the Documentation) to a shortcut and go through all matches. It is quicker than the highlight feature.
yep, the only way... thanx
by the way VK_RETURN works for editFindNext by default



Edited 1 time(s). Last edit at 09/06/2019 09:15AM by cpm1a_new.

Options: ReplyQuote
Switch Profile
Posted by: RJJIII
Date: August 16, 2022 05:05AM

I've somehow overlooked this thread despite it being stickied. I have a few macros that are (at least to me) useful but too small to warrant a thread.

switch_profile.kmm will add a "Switch Profile" menu option beneath "New Window" to open another window with a different profile which:
  • Makes it easier to juggle several profiles like an "incognito" profile and metered data profile.
  • And it makes it possible to use multiple profiles without the startup message.

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

_switchProfile_command{
$_switchProfile_command=getfolder( RootFolder );
$_switchProfile_command=$_switchProfile_command."\\k-meleon.exe -new"; 
}

_switchProfile_BuildMenu {
setmenu(New,macro,"Switch profile",_switchProfile_Switch,-1);
}

_switchProfile_Switch{
macroinfo= _("Open a new window and choose a different profile.");
exec($_switchProfile_command);
}


# -----------------------------------------------------------
$OnStartup=$OnStartup."_switchProfile_command;";
$OnInit=$OnInit."_switchProfile_BuildMenu;";


Attachments: switch_profile.kmm (1 KB)  
Options: ReplyQuote
2 using the exec command for passing urls:
Posted by: Kalle Melos
Date: October 07, 2023 02:40AM

One for use with other browsers:
browserswitch_lnk{
$bs_cmdl=$ARG." ".$LinkURL;
exec($bs_cmdl);
}

browserswitch_go{
$bs_cmdl=$ARG." ".$URL;
exec($bs_cmdl);
}

browserswitch_menu{
setmenu("LinkOpen",popup,"Open &Elsewhere");
setmenu("_Go",popup,"Open Elsewhere");
setmenu("Open &Elsewhere",macro,"Basilisk","browserswitch_lnk(C:\\Program Files\\Basilisk\\basilisk.exe)");
setmenu("Open &Elsewhere",macro,"Avant","browserswitch_lnk(C:\\BigFishCache\\avant\\avant.exe)");
setmenu("Open &Elsewhere",macro,"Firefox","browserswitch_lnk(C:\\Program Files\\Mozilla Firefox\\private_browsing.exe)");
setmenu("Open Elsewhere",macro,"Basilisk","browserswitch_go(C:\\Program Files\\Basilisk\\basilisk.exe)");
setmenu("Open Elsewhere",macro,"Avant","browserswitch_go(C:\\BigFishCache\\avant\\avant.exe)");
setmenu("Open Elsewhere",macro,"Firefox","browserswitch_go(C:\\Program Files\\Mozilla Firefox\\private_browsing.exe)");
}

$OnInit=$OnInit."browserswitch_menu;";
Another for passing a url for use in a .bat file pertaining to yt-dlp for downloading videos with varying presets (hence the quotation mark appending):
vid_dwn{
$murl=gsub("=", "\"=\"", $URL)
$vd_cmdl="C:\\yt-dl\\".$ARG." ".$murl;
exec($vd_cmdl);
}

vdlm_B{
setmenu("vdlm",macro,"audio only","vid_dwn(ytd-ao.bat)");
setmenu("vdlm",macro,"with subtitles","vid_dwn(ytd-v.bat --write-subs)");
setmenu("vdlm",macro,"mid-resolution","vid_dwn(ytd-mr.bat)");
}

$OnInit=$OnInit."vdlm_B;";

Both of these add menus to custom menus specified in my toolbar.cfg though, so if one would want to use this they'd have to ammend their config or the kmm.


There's another thing I'd like to do related to this but useful in other cases which is writing a list of urls opened in a window to a text file. I imagine extensions doing this were used for sake of sessions, so if anyone knows a few lines that provide this functionality, please post it.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.