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=JamesD] @ mhf This is not as automatic as I had hoped. There does not seem to be a variable to inform the MacroLanguage of the index number of the current tab. For now, at least, you must eyeball the tab bar or tab list and enter a number for how many tabs to delete. [b]EndTabLR.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- EndTabLR.kmm # ---------- K-Meleon Macro Language Close all previous or next tabs from current -- # # Dependencies : main.kmm, tabs plugin active # Resources : - # Preferences : - # Version : 0.4 2009-07-23 # -------------------------------------------------------------------------------- _EndTabLR_CloseLeft { $_EndTabLR_TabCount = prompt ("How many previous tabs to close?","Enter an integer"); $_EndTabLR_Count=0; while ($_EndTabLR_Count < $_EndTabLR_TabCount) { id(ID_TAB_PREV) ; id(ID_CLOSE_TAB) ; $_EndTabLR_Count=$_EndTabLR_Count+1; } } _EndTabLR_CloseRight { $_EndTabLR_TabCount = prompt ("How many next tabs to close?","Enter an integer"); $_EndTabLR_Count=0; while ($_EndTabLR_Count < $_EndTabLR_TabCount) { id(ID_TAB_NEXT) ; id(ID_CLOSE_TAB) ; $_EndTabLR_Count=$_EndTabLR_Count+1; } } _EndTabLR_ModMenu { ## add another option to menu setmenu ("TabButtonPopup",separator, -1 ); setmenu ("TabButtonPopup",macro, _("Close # Previous Tabs"), "_EndTabLR_CloseLeft" ); setmenu ("TabButtonPopup",macro, _("Close # Next Tabs"), "_EndTabLR_CloseRight" ); } $OnStartup=$OnStartup."_EndTabLR_ModMenu;"; #$OnInit=$OnInit."_EndTabLR_ModMenu;"; $macroModules=$macroModules."EndTabLR;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development