Development
: K-Meleon Forum
K-Meleon development related discussions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=misterp] Here is another strategy - just have the option to load a session by adding the top tabs to the already open tabs. Then you don't have to keep track of a second set of groups/sessions. This is just the macro I use, it is not pretty or good code, it contains two EN-US strings, but it is robust enough for my current sessions. [b]AddSessionTabs.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # ---------- Open top(last window) of Session as tabs ---------------------- # # Dependencies : main.kmm # Resources : - # Preferences : - # # ----------------------------------------------------------------------------- OpenAllGroup{ # Obtain Popups pref value: $_PUB_value = getpref(BOOL, $pref_Popups); $_PUB_value == true ? &pref_TogglePopups : 0; $grpName = prompt("Session to add as tabs:",""); $num = getpref( INT, "kmeleon.plugins.sessions2." . $grpName . ".window0.count"); $_i = 0; while ( $_i < $num ) &_OpenIt; # Restore pref value: $_PUB_value == true ? &pref_TogglePopups : 0; } # ----- PRIVATE _OpenIt{ $tmp = getpref( STRING, "kmeleon.plugins.sessions2." . $grpName . ".window0.tab" . $_i); $tmp = gsub("'","\\'",$tmp); $srch = "http:"; &_FindLast; $srch = "https:"; &_FindLast; $srch = "chrome:"; &_FindLast; $tmp = substr($tmp,0,index($tmp,"\t")); openbgtab($tmp); $_i = $_i + 1; } _FindLast{ $_index = index($tmp,$srch); $_i2 = $_index; while ($_index > -1) &_RmFront; $_i2 > -1 ? $tmp = substr($srch,0,1).$tmp : 0; } _RmFront{ $tmp = substr($tmp,$_index+1); $_index = index($tmp,$srch); } _AddSessionTabs_BuildMenu{ setmenu("&Load Session",macro,"Add as tabs","OpenAllGroup"); } $OnInit=$OnInit."_AddSessionTabs_BuildMenu;"; # ------------------------------------------------------------------------------ $macroModules=$macroModules."AddSessionTabs;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development