Extensions
: K-Meleon Forum
All about K-Meleon extensions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=disrupted] slight update: now displays proper switcher status in statusbar instead of just (toggles auto agent switcher) download from same link [color=green][sub]# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # ----------auto agent switcher---------------------------- $_badlist=getfolder(RootFolder)."\\macros\\badlist.txt"; tog_autoswitch{ menuchecked=getpref(BOOL,"kmeleon.agentswitcher.active"); togglepref(BOOL,"kmeleon.agentswitcher.active"); $switchactive=getpref(BOOL,"kmeleon.agentswitcher.active"); $noactive=("false"); $switchactive==$noactive?&statusfalse:&statustrue; } statusfalse{ statusbar("auto-agentswitcher inactive"); } statustrue{ statusbar("auto-agentswitcher active"); } editbad{ setclipboard(""); $HOST=hostname( $URL ); $badstring=(";".$HOST); setclipboard($badstring); exec("notepad.exe " .$_badlist); statusbar("edit badlists, for convenience current page host has been copied to clipboard with semicolon prefix"); } addbadsite{ menugrayed=(hostname($URL)==""); $HOST=hostname( $URL ); $badstring=(";".$HOST); pluginmsg(utils, "append", $_badlist, $badstring); $pendmess=("Fireslut useragent will now be used for this address: ".$HOST); alert($pendmess,"Website added to badlist" ,INFO); } _autoswitchagent_BuildMenu{ setmenu("&User Agent",inline,auto_agentswitch,-1); setmenu(auto_agentswitch,macro,"Auto Switcher",tog_autoswitch); setmenu(auto_agentswitch,macro,"Add Website",addbadsite); setmenu(auto_agentswitch,macro,"Edit Switchlist",editbad); } defaultagent{ getpref(BOOL,$_UserAgent_Reset)?delpref($_UserAgent_Active):0; } switcher{ $fireslut=getpref(STRING, "kmeleon.privacy.useragent1.string"); $switcher=setpref(STRING, "general.useragent.override", $fireslut); } checkswitchactive{ $switchactive=getpref(BOOL,"kmeleon.agentswitcher.active"); $isactive=("true"); $switchactive==$isactive?&badchecker:0; } badchecker{ $badcheck=readfile($_badlist); $checkh=hostname( $URL ); $find1=gsub($checkh, "crappysite", $badcheck); $find2=gsub("crappysite", "crapcrap", $find1); $find1==$find2?&defaultagent:&switcher; #prompt($find1, "tester" , $find2 ); } $OnLoad=$OnLoad."checkswitchactive;"; $OnInit=$OnInit."_autoswitchagent_BuildMenu;"; # -------------------------------------------------------------------- $macroModules=$macroModules."agentswitch;"; [/sub][/color][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development