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=desga2] [quote=JamesD] Tabs ability due to great JS code from desga2. Many thanks for that. [/quote] :D:D:D "Great"? I only included a simple code line of basic JavaScript. :) I added a little modification to your code for custom title for replacements from menu: [b]PrivateTitle.kmm[/b] [code] # K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # # ---------- PrivateTitle.kmm # ---------- K-Meleon Macro Language to halt display of page titles ------------------------------- # ---------- also halts display of info in the URLBAR. # # Dependencies : main.kmm # Resources : - # Preferences : k-meleon_PrivateTitle_use # kmeleon.tabs.useLoadingTitle # k-meleon_PrivateTitle_custom # Version : 0.5 2008-12-03 # Authors : JamesD and desga2 # ------------------------------------------------------------------------------------------------- PrivateTitle_ToggleUse{ getpref(BOOL, "k-meleon_PrivateTitle_use")==true?&_PrivateTitle_Set_Off:&_PrivateTitle_Set_On; rebuildmenu($_PrivateTitle_Popm); } # - - - - PRIVATE - - - - _PrivateTitle_Set_On{ # checkmark value for the on menu: menuchecked=getpref(BOOL, "k-meleon_PrivateTitle_use")==true; # set the userpref k-meleon_PrivateTitle_use to true: setpref(BOOL, "k-meleon_PrivateTitle_use", true); # check on tabs loading title: getpref(BOOL, "kmeleon.tabs.useLoadingTitle")==true?&_PrivateTitle_Loading_Yes:0; } _PrivateTitle_Set_Off{ # checkmark value for the off menu: menuchecked=getpref(BOOL, "k-meleon_PrivateTitle_use")==false; # set the userpref k-meleon PrivateTitle_use to false: setpref(BOOL, "k-meleon_PrivateTitle_use", false); getpref(BOOL, "kmeleon.tabs.useLoadingTitle")==true?&_PrivateTitle_Loading_ReDo:0; } _PrivateTitle_Loading_Yes{ setpref(BOOL, "kmeleon.tabs.useLoadingTitle", false); } _PrivateTitle_Loading_ReDo{ setpref(BOOL, "kmeleon.tabs.useLoadingTitle", true); } _PrivateTitle_TitleBlank{ $_PrivateTitle_Use=getpref(BOOL, "k-meleon_PrivateTitle_use"); $_PrivateTitle_Use==true?&_PrivateTitle_TitleWrite:0; } _PrivateTitle_TitleWrite{ $_PrivateCustomT=getpref(STRING, "k-meleon_PrivateTitle_custom"); $_PrivateCustomT==""?$_PrivateCustomT="Private":0; $TITLE=$_PrivateCustomT; $URLBAR=$_PrivateCustomT; $_JS_private="document.title='".$_PrivateCustomT."';"; injectJS($_JS_private); } _PrivateTitle_CustomT{ $_PrivateCustomT=getpref(STRING, "k-meleon_PrivateTitle_custom"); $_PrivateCustomT==""?$_PrivateCustomT="Private":0; $_PrivTcustom=prompt("Enter the title to use for title replacements. Type a space for no title.", "Custom Private Title", $_PrivateCustomT); $_PrivTcustom==""?0 : setpref(STRING, "k-meleon_PrivateTitle_custom", $_PrivTcustom); } _PrivateTitle_SetAccels{ setaccel("CTRL SHIFT p", "macros(PrivateTitle_ToggleUse)"); } _PrivateTitle_ModMenu{ $_PrivateTitle_Popm="Private Title"; setmenu("&Tools", popup, $_PrivateTitle_Popm, Misc); &_PrivateTitle_ModMenuP; } _PrivateTitle_ModMenuP{ setmenu($_PrivateTitle_Popm, macro, "ON", _PrivateTitle_Set_On, 0); setmenu($_PrivateTitle_Popm, macro, "OFF", _PrivateTitle_Set_Off, 1); setmenu($_PrivateTitle_Popm, separator, 2); setmenu($_PrivateTitle_Popm, macro, "Custom title ...", _PrivateTitle_CustomT, 3); rebuildmenu($_PrivateTitle_Popm); } $OnLoad=$OnLoad."_PrivateTitle_TitleBlank;"; $OnInit=$OnInit."_PrivateTitle_ModMenu;"; $OnInit=$OnInit."_PrivateTitle_SetAccels;"; $macroModules=$macroModules."PrivateTitle;"; [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development
English