Created
May 4, 2017 00:17
-
-
Save tpenguinltg/ea5631ea5751475ff93a6ce47739aa57 to your computer and use it in GitHub Desktop.
PrefBar config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"prefbar:menu:enabled": { | |
"items": [ | |
"prefbar:menu:navigation-menu", | |
"prefbar:button:separator13", | |
"prefbar:button:fonts", | |
"prefbar:button:colors", | |
"prefbar:button:images", | |
"prefbar:button:javascript", | |
"prefbar:button:Flash", | |
"prefbar:button:killflash", | |
"prefbar:menu:TabToggle", | |
"prefbar:button:separator10", | |
"prefbar:menu:clearmenu", | |
"prefbar:button:separator11", | |
"prefbar:menu:fontsmenu", | |
"prefbar:button:separator5", | |
"prefbar:menu:tabs", | |
"prefbar:button:separator12", | |
"prefbar:menu:privacy-menu", | |
"prefbar:button:separator0u", | |
"prefbar:menu:addon-submenu", | |
"prefbar:button:about_config-button", | |
"prefbar:button:separator6", | |
"prefbar:button:resizelist", | |
"prefbar:button:security-tls-version-min", | |
"prefbar:button:forbidMetaRefresh", | |
"prefbar:button:serverinfo", | |
"prefbar:button:spacer0" | |
] | |
}, | |
"prefbar:button:colors": { | |
"label": "Colors", | |
"type": "extcheck", | |
"setfunction": "//prefbarSetColors(value);\ngoPrefBar.SetPref(\"browser.display.use_system_colors\", !value);\ngoPrefBar.SetPref(\"browser.display.document_color_use\", !value + 1); ", | |
"getfunction": "//value = prefbarGetColors();\nvalue = !goPrefBar.GetPref(\"browser.display.use_system_colors\");" | |
}, | |
"prefbar:button:images": { | |
"label": "Images", | |
"type": "check", | |
"prefstring": "permissions.default.image", | |
"topref": "value ? 1 : 2", | |
"frompref": "value == 1" | |
}, | |
"prefbar:button:javascript": { | |
"label": "JavaScript", | |
"type": "check", | |
"prefstring": "javascript.enabled", | |
"topref": "value", | |
"frompref": "value" | |
}, | |
"prefbar:button:Flash": { | |
"label": "Flash", | |
"type": "extcheck", | |
"setfunction": "prefbarSetFlash(value);", | |
"getfunction": "value = prefbarGetFlash();" | |
}, | |
"prefbar:button:separator10": { | |
"type": "separator" | |
}, | |
"prefbar:button:clearallcache": { | |
"label": "Clear Cache", | |
"type": "button", | |
"onclick": "if (confirm(\"Clear all cache?\")) {\n prefbarClearAllCache();\n alert(\"All cache cleared.\");\n}" | |
}, | |
"prefbar:button:separator11": { | |
"type": "separator" | |
}, | |
"prefbar:button:savepage": { | |
"label": "Save Page", | |
"type": "button", | |
"onclick": "if (window.content)\n window.saveDocument(window.content.document);\nelse\n window.saveDocument(window.gBrowser.selectedBrowser.contentDocumentAsCPOW);" | |
}, | |
"prefbar:button:separator8": { | |
"type": "separator" | |
}, | |
"prefbar:button:useragent": { | |
"items": [ | |
[ | |
"Real UA", | |
"!RESET!" | |
], | |
[ | |
"None", | |
"" | |
], | |
[ | |
"Fx15", | |
"Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1" | |
], | |
[ | |
"Fx12 Lin", | |
"Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0" | |
], | |
[ | |
"Fx3.6 Lin", | |
"Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.27) Gecko/20120216 Firefox/3.6.27" | |
], | |
[ | |
"Fx9 Lin", | |
"Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20100101 Firefox/9.0" | |
], | |
[ | |
"Fx8 Mac", | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:8.0.1) Gecko/20100101 Firefox/8.0.1" | |
], | |
[ | |
"Fx11 Mac", | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:11.0) Gecko/20100101 Firefox/11.0" | |
], | |
[ | |
"Fx2 WinME", | |
"Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8.1.20) Gecko/2008121709 Firefox/2.0.0.20" | |
], | |
[ | |
"Moz 1.7.13 Lin", | |
"js:useragent=\"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417\"; appname=\"Netscape\"; appversion=\"5.0 (X11; en-US)\"; platform=\"Linux i686\";" | |
], | |
[ | |
"NS 4.7 Mac", | |
"Mozilla/4.78 (Macintosh; U; PPC)" | |
], | |
[ | |
"NS 6.2 Lin", | |
"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011022 Netscape6/6.2" | |
], | |
[ | |
"IE 6.0 WinXP", | |
"js:useragent=\"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\"; appname=\"Microsoft Internet Explorer\"; appversion=\"4.0 (compatible; MSIE 6.0; Windows NT 5.1)\"; platform=\"Win32\";" | |
], | |
[ | |
"SM 1.0.8 Lin", | |
"js:useragent=\"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070306 SeaMonkey/1.0.8\"; appname=\"Netscape\"; appversion=\"5.0 (X11; en-US)\"; platform=\"Linux i686\";" | |
], | |
[ | |
"FF 2.0.0.2 Lin", | |
"js:useragent=\"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2) Gecko/20070220 Firefox/2.0.0.2\"; appname=\"Netscape\"; appversion=\"5.0 (X11; en-US)\"; platform=\"Linux i686\";" | |
], | |
[ | |
"Safari (Mac OS X 10.5 [Leopard])", | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3" | |
], | |
[ | |
"Lynx", | |
"Lynx/2.8.3rel.1 libwww-FM/2.14FM" | |
], | |
[ | |
"Safari iPad (iOS 5.1)", | |
"Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B176 Safari/7534.48.3 " | |
], | |
[ | |
"SM 2.7.2 Lin", | |
"js:useragent=\"Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 SeaMonkey/2.7.2\"; appname=\"Netscape\"; appversion=\"5.0 (X11)\"; platform=\"Linux i686\";" | |
], | |
[ | |
"FF 10.0.2 Lin", | |
"js:useragent=\"Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20100101 Firefox/10.0.2\"; appname=\"Netscape\"; appversion=\"5.0 (X11)\"; platform=\"Linux i686\";" | |
], | |
[ | |
"IE 9.0 Win7", | |
"js:useragent=\"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1)\"; appname=\"Microsoft Internet Explorer\"; appversion=\"5.0 (compatible; MSIE 9.0; Windows NT 6.1)\"; platform=\"Win32\";" | |
], | |
[ | |
"Chrome", | |
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.21 (KHTML, like Gecko) Chrome/19.0.1042.0 Safari/535.21" | |
], | |
[ | |
"Safari (Mac OS X 10.6 [Snow Leopard])", | |
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1" | |
], | |
[ | |
"Fx19 Win", | |
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0" | |
], | |
[ | |
"Fx24 Win", | |
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0" | |
], | |
[ | |
"Fx17 Win", | |
"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0" | |
], | |
[ | |
"Safari 5.0.2 iPod", | |
"Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; ja-jp) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5" | |
], | |
[ | |
"Pale Moon no Firefox", | |
"Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20140612 PaleMoon/24.6.1" | |
], | |
[ | |
"Firefox 24 ESR Linux", | |
"Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0" | |
], | |
[ | |
"Firefox 31 ESR Linux", | |
" Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0" | |
], | |
[ | |
"Firefox 36 Win8.1", | |
"Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0" | |
], | |
[ | |
"cURL", | |
"curl/7.45.0" | |
], | |
[ | |
"Custom...", | |
"!CUSTOM!" | |
] | |
], | |
"label": "User Agent", | |
"type": "extlist", | |
"dontupdatelistitems": true, | |
"setfunction": "prefbarSetUseragent((value == \"!CUSTOM!\")? prompt(\"Enter a user agent string:\") : value);", | |
"getfunction": "value = prefbarGetUseragent(items);" | |
}, | |
"prefbar:button:spacer0": { | |
"type": "spacer" | |
}, | |
"prefbar:button:help": { | |
"label": "PrefBar Help", | |
"type": "link", | |
"url": "chrome://prefbar/content/help/index.xhtml" | |
}, | |
"prefbar:button:whatsnew": { | |
"label": "What's New", | |
"type": "link", | |
"url": "chrome://prefbar/content/help/newstuff.xhtml" | |
}, | |
"prefbar:button:separator4": { | |
"type": "separator" | |
}, | |
"prefbar:button:customize": { | |
"label": "Customize", | |
"type": "button", | |
"onclick": "prefbarOpenPrefs();" | |
}, | |
"prefbar:menu:disabled": { | |
"items": [ | |
"prefbar:button:cookies", | |
"prefbar:button:separator1", | |
"prefbar:button:systemcolors", | |
"prefbar:button:animation", | |
"prefbar:button:java", | |
"prefbar:button:popups", | |
"prefbar:button:proxycheck", | |
"prefbar:button:proxymenu", | |
"prefbar:button:cookieask", | |
"prefbar:button:pipelining", | |
"prefbar:button:diskcache", | |
"prefbar:button:memcache", | |
"prefbar:button:separator9", | |
"prefbar:button:clearall", | |
"prefbar:button:about_config-link", | |
"prefbar:button:sminfolist", | |
"prefbar:button:separator3", | |
"prefbar:button:prefbarhomepagelink", | |
"prefbar:button:mozilla", | |
"prefbar:button:mozillazine", | |
"prefbar:button:separator7", | |
"prefbar:button:hidetoolbar", | |
"prefbar:button:proxylist", | |
"prefbar:button:prefbarlanglist", | |
"prefbar:button:executedemo1", | |
"prefbar:button:executedemo2", | |
"prefbar:button:customize", | |
"prefbar:button:separator4", | |
"prefbar:button:help", | |
"prefbar:button:whatsnew", | |
"prefbar:button:cacheenabled", | |
"prefbar:button:userstylecheckbox", | |
"prefbar:button:ua-fx-compat" | |
] | |
}, | |
"prefbar:button:back": { | |
"label": "Back", | |
"type": "button", | |
"onclick": "BrowserBack();", | |
"observes": "canGoBack" | |
}, | |
"prefbar:button:forward": { | |
"label": "Forward", | |
"type": "button", | |
"onclick": "BrowserForward();", | |
"observes": "canGoForward" | |
}, | |
"prefbar:button:reload": { | |
"label": "Reload", | |
"type": "button", | |
"onclick": "if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload();" | |
}, | |
"prefbar:button:stop": { | |
"label": "Stop", | |
"type": "button", | |
"onclick": "BrowserStop();", | |
"observes": "canStop" | |
}, | |
"prefbar:button:separator0": { | |
"type": "separator" | |
}, | |
"prefbar:button:home": { | |
"label": "Home", | |
"type": "button", | |
"onclick": "BrowserHome();" | |
}, | |
"prefbar:button:separator13": { | |
"type": "separator" | |
}, | |
"prefbar:button:prefbartabjavascript": { | |
"label": "JS (Tab)", | |
"type": "extcheck", | |
"browserbtnupdatefor": "tab", | |
"setfunction": "CallFrameScript(value);", | |
"getfunction": "CallFrameScript(null, SetValue);", | |
"framescript": "if (docShell) {\n switch(caller) {\n case \"setfunction\":\n docShell.allowJavascript = argument;\n break;\n case \"getfunction\":\n reply = docShell.allowJavascript;\n break;\n }\n}" | |
}, | |
"prefbar:button:prefbartabimages": { | |
"label": "Images (Tab)", | |
"type": "extcheck", | |
"browserbtnupdatefor": "tab", | |
"setfunction": "CallFrameScript(value);", | |
"getfunction": "CallFrameScript(null, SetValue);", | |
"framescript": "if (docShell) {\n switch(caller) {\n case \"setfunction\":\n docShell.allowImages = argument;\n break;\n case \"getfunction\":\n reply = docShell.allowImages;\n break;\n }\n}" | |
}, | |
"prefbar:button:prefbartabplugins": { | |
"label": "Plugins (Tab)", | |
"type": "extcheck", | |
"browserbtnupdatefor": "tab", | |
"setfunction": "CallFrameScript(value);", | |
"getfunction": "CallFrameScript(null, SetValue);", | |
"framescript": "if (docShell) {\n switch(caller) {\n case \"setfunction\":\n docShell.allowPlugins = argument;\n break;\n case \"getfunction\":\n reply = docShell.allowPlugins;\n break;\n }\n}" | |
}, | |
"prefbar:button:separator1": { | |
"type": "separator" | |
}, | |
"prefbar:button:fonts": { | |
"label": "Fonts", | |
"type": "check", | |
"prefstring": "browser.display.use_document_fonts", | |
"topref": "Number(value)", | |
"frompref": "Boolean(value)" | |
}, | |
"prefbar:button:systemcolors": { | |
"label": "System Colors", | |
"type": "check", | |
"prefstring": "browser.display.use_system_colors", | |
"topref": "value", | |
"frompref": "value" | |
}, | |
"prefbar:button:animation": { | |
"label": "Animation", | |
"type": "check", | |
"prefstring": "image.animation_mode", | |
"topref": "value ? 'normal' : 'none'", | |
"frompref": "value=='normal'" | |
}, | |
"prefbar:button:java": { | |
"label": "Java", | |
"type": "extcheck", | |
"setfunction": "prefbarSetJava(value);", | |
"getfunction": "value = prefbarGetJava();" | |
}, | |
"prefbar:button:popups": { | |
"label": "Popups", | |
"type": "check", | |
"prefstring": "dom.disable_open_during_load", | |
"topref": "!value", | |
"frompref": "!value" | |
}, | |
"prefbar:button:proxycheck": { | |
"label": "Proxies", | |
"type": "extcheck", | |
"setfunction": "prefbarSetProxyEnabled(value);", | |
"getfunction": "value = prefbarGetProxyEnabled();" | |
}, | |
"prefbar:button:proxymenu": { | |
"items": [ | |
[ | |
"No Proxies", | |
"0" | |
], | |
[ | |
"Manual Proxy", | |
"1" | |
], | |
[ | |
"Automatic Proxy", | |
"2" | |
] | |
], | |
"label": "Proxy Menulist", | |
"type": "menulist", | |
"prefstring": "network.proxy.type" | |
}, | |
"prefbar:button:cookies": { | |
"label": "Cookies", | |
"type": "check", | |
"prefstring": "network.cookie.cookieBehavior", | |
"topref": "2*Number(!value)", | |
"frompref": "value != 2" | |
}, | |
"prefbar:button:cookieask": { | |
"label": "Cookie Warning", | |
"type": "check", | |
"prefstring": "network.cookie.lifetimePolicy", | |
"topref": "value ? 1 : 0", | |
"frompref": "value==1" | |
}, | |
"prefbar:button:pipelining": { | |
"label": "Pipelining", | |
"type": "extcheck", | |
"setfunction": "prefbarSetPipelining(value);", | |
"getfunction": "value = prefbarGetPipelining();" | |
}, | |
"prefbar:button:diskcache": { | |
"label": "Disk Cache", | |
"type": "check", | |
"prefstring": "browser.cache.disk.enable", | |
"topref": "value", | |
"frompref": "value" | |
}, | |
"prefbar:button:memcache": { | |
"label": "Mem Cache", | |
"type": "check", | |
"prefstring": "browser.cache.memory.enable", | |
"topref": "value", | |
"frompref": "value" | |
}, | |
"prefbar:button:referrer": { | |
"label": "Send Referrer", | |
"type": "check", | |
"prefstring": "network.http.sendRefererHeader", | |
"topref": "2*Number(value)", | |
"frompref": "Boolean(value)" | |
}, | |
"prefbar:button:separator2": { | |
"type": "separator" | |
}, | |
"prefbar:button:clearmemcache": { | |
"label": "Clear Mem Cache", | |
"type": "button", | |
"onclick": "if(confirm(\"Clear memory cache?\"))\n{\nprefbarClearMemCache();\nalert(\"Memory cache cleared.\");\n}" | |
}, | |
"prefbar:button:cleardiskcache": { | |
"label": "Clear Disk Cache", | |
"type": "button", | |
"onclick": "if(confirm(\"Clear disk cache?\")\n{\nprefbarClearDiskCache();\nalert(\"Disk cache cleared.\");\n}" | |
}, | |
"prefbar:button:clearhist": { | |
"label": "Clear History", | |
"type": "button", | |
"onclick": "prefbarClearHistory()" | |
}, | |
"prefbar:button:clearurlbar": { | |
"label": "Clear Location Bar", | |
"type": "button", | |
"onclick": "prefbarClearLocationBar()" | |
}, | |
"prefbar:button:clearcookies": { | |
"label": "Clear Cookies", | |
"type": "button", | |
"onclick": "prefbarClearCookies()" | |
}, | |
"prefbar:button:clearall": { | |
"label": "Clear All", | |
"type": "button", | |
"onclick": "//### DO NOT EDIT THIS BUTTON! ###\n// This button will be overwritten with each PrefBar update!\n// If you want to customize this button, create a copy first.\n// On your copy, you may (un)comment below, as desired\n\nprefbarClearLocationBar();\nprefbarClearHistory();\nprefbarClearAllCache();\n//prefbarClearCookies();\n//prefbarClearFormData();\n//prefbarClearDownloads();\n//prefbarClearPasswords();\n//prefbarClearSessions();\n//prefbarClearOfflineApps();" | |
}, | |
"prefbar:button:separator5": { | |
"type": "separator" | |
}, | |
"prefbar:button:resizelist": { | |
"items": [ | |
[ | |
"640x480", | |
"640x480" | |
], | |
[ | |
"800x600", | |
"800x600" | |
], | |
[ | |
"1024x768", | |
"1024x768" | |
] | |
], | |
"label": "Resize", | |
"type": "extlist", | |
"dontupdatelistitems": true, | |
"setfunction": "prefbarSetResolution(value);", | |
"getfunction": "value = prefbarGetResolution(items);" | |
}, | |
"prefbar:button:separator9": { | |
"type": "separator" | |
}, | |
"prefbar:button:newtab": { | |
"label": "New Tab", | |
"type": "button", | |
"onclick": "BrowserOpenTab();" | |
}, | |
"prefbar:button:prefbarrestoretab": { | |
"label": "Restore Tab", | |
"type": "button", | |
"onclick": "prefbarRestoreTab();" | |
}, | |
"prefbar:button:killflash": { | |
"label": "Kill Flash", | |
"type": "button", | |
"onclick": "CallFrameScript()", | |
"framescript": "prefbarKillFlash()" | |
}, | |
"prefbar:button:separator12": { | |
"type": "separator" | |
}, | |
"prefbar:button:fontdown": { | |
"label": "Font -", | |
"type": "button", | |
"onclick": "prefbarZoomReduce();" | |
}, | |
"prefbar:button:fontup": { | |
"label": "Font +", | |
"type": "button", | |
"onclick": "prefbarZoomEnlarge();" | |
}, | |
"prefbar:button:separator3": { | |
"type": "separator" | |
}, | |
"prefbar:button:prefbarhomepagelink": { | |
"label": "PrefBar homepage", | |
"type": "link", | |
"url": "http://prefbar.tuxfamily.org" | |
}, | |
"prefbar:button:mozilla": { | |
"label": "mozilla.org", | |
"type": "link", | |
"url": "http://www.mozilla.org" | |
}, | |
"prefbar:button:mozillazine": { | |
"label": "MozillaZine.org", | |
"type": "link", | |
"url": "http://www.mozillazine.org" | |
}, | |
"prefbar:button:separator7": { | |
"type": "separator" | |
}, | |
"prefbar:button:hidetoolbar": { | |
"label": "Hide Toolbar", | |
"type": "button", | |
"onclick": "setTimeout(prefbarToggleToolbar);" | |
}, | |
"prefbar:button:proxylist": { | |
"items": [ | |
[ | |
"None", | |
"" | |
], | |
[ | |
"Proxy1", | |
"testproxy:8080" | |
], | |
[ | |
"Proxy2", | |
"testproxy2:80" | |
] | |
], | |
"label": "Proxy Serverlist", | |
"type": "extlist", | |
"dontupdatelistitems": true, | |
"setfunction": "prefbarSetProxy(value);", | |
"getfunction": "value=prefbarGetProxy();" | |
}, | |
"prefbar:button:prefbarlanglist": { | |
"items": [ | |
[ | |
"Default", | |
"!RESET!" | |
], | |
[ | |
"English", | |
"en-us,en" | |
], | |
[ | |
"French", | |
"fr-fr,fr,en-us,en" | |
], | |
[ | |
"German", | |
"de-de,de,en-us,en" | |
], | |
[ | |
"Japanese", | |
"ja,en-us,en" | |
], | |
[ | |
"Spanish", | |
"es-es,es,en-us,en" | |
] | |
], | |
"label": "Language", | |
"type": "menulist", | |
"prefstring": "intl.accept_languages", | |
"dontupdatelistitems": true | |
}, | |
"prefbar:button:executedemo1": { | |
"label": "executedemo1", | |
"type": "button", | |
"onclick": "prefbarExecute(\"C:\\\\Windows\\\\notepad.exe\");" | |
}, | |
"prefbar:button:executedemo2": { | |
"label": "executedemo2", | |
"type": "button", | |
"onclick": "var Arguments = new Array\nArguments[0] = \"/c\"\nArguments[1] = \"dir\"\nArguments[2] = \"&pause\"\nprefbarExecute(\"C:\\\\Windows\\\\System32\\\\cmd.exe\", Arguments);\ndelete Arguments;" | |
}, | |
"prefbar:info": { | |
"formatversion": 3 | |
}, | |
"prefbar:button:clonetab": { | |
"type": "button", | |
"label": "Clone", | |
"onclick": "// PrefBar Clone Tab button\n// Copyright (C) Manuel Reimer (Manuel _dot_ Reimer _at_ gmx _dot_ de)\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// version 2 as published by the Free Software Foundation\n\nvar curTab = gBrowser.mCurrentTab;\nvar curBrowser = curTab.linkedBrowser;\nvar curX = curBrowser.contentWindow.scrollX;\nvar curY = curBrowser.contentWindow.scrollY\nvar curHistory = curBrowser.sessionHistory;\nvar newTab = gBrowser.addTab(\"about:blank\");\nvar newBrowser = newTab.linkedBrowser;\nvar newHistory = newBrowser.sessionHistory;\n\nnewHistory.QueryInterface(Components.interfaces.nsISHistoryInternal);\n\nfor (var i = 0; i < curHistory.count; i++) {\n newHistory.addEntry(curHistory.getEntryAtIndex(i, false), true);\n}\n\nif (curHistory.count) newBrowser.gotoIndex(curHistory.index);\n\nvar background = navigator.preference(\"browser.tabs.loadInBackground\");\nif (!background)\n gBrowser.selectedTab = newTab;\n\nfunction doScroll(browser, x, y, tries) {\n if (!tries) tries = 0;\n if (tries > 20) return;\n if (browser.docShell.busyFlags != browser.docShell.BUSY_FLAGS_NONE)\n setTimeout(doScroll, 10, browser, x, y, tries + 1);\n else\n browser.contentWindow.scrollTo(x, y);\n}\n\ndoScroll(newBrowser, curX, curY);" | |
}, | |
"prefbar:button:killsession": { | |
"type": "button", | |
"label": "Kill Session", | |
"onclick": "if(confirm(\"Kill session?\")) {\n// Kill all session cookies\nvar cookiemanager = Components.classes[\"@mozilla.org/cookiemanager;1\"].getService();\ncookiemanager = cookiemanager.QueryInterface(Components.interfaces.nsICookieManager);\nvar enumerator = cookiemanager.enumerator;\nwhile (enumerator.hasMoreElements()) {\n var cookie = enumerator.getNext();\n if (!cookie) break;\n cookie = cookie.QueryInterface(Components.interfaces.nsICookie);\n if (cookie.expires == 0)\n cookiemanager.remove(cookie.host, cookie.name, cookie.path, false);\n}\n\n// Kill HTTP auth\nvar authmanager = Components.classes['@mozilla.org/network/http-auth-manager;1'].getService()\nauthmanager = authmanager.QueryInterface(Components.interfaces.nsIHttpAuthManager)\nauthmanager.clearAll()\n\n}" | |
}, | |
"prefbar:menu:clearmenu": { | |
"type": "submenu", | |
"items": [ | |
"prefbar:button:clearallcache", | |
"prefbar:button:clearmemcache", | |
"prefbar:button:cleardiskcache", | |
"prefbar:button:clearhist", | |
"prefbar:button:clearurlbar", | |
"prefbar:button:clearcookies", | |
"prefbar:button:deldomaincookies", | |
"prefbar:button:clrall", | |
"prefbar:button:separator0", | |
"prefbar:button:killsession", | |
"prefbar:button:save_session-exit", | |
"prefbar:button:restartbrowser" | |
], | |
"label": "Clear" | |
}, | |
"prefbar:menu:tabs": { | |
"type": "submenu", | |
"items": [ | |
"prefbar:button:newtab", | |
"prefbar:button:prefbarrestoretab", | |
"prefbar:button:clonetab", | |
"prefbar:button:separator8", | |
"prefbar:button:savepage" | |
], | |
"label": "Tab" | |
}, | |
"prefbar:menu:fontsmenu": { | |
"type": "submenu", | |
"items": [ | |
"prefbar:button:fontdown", | |
"prefbar:button:fontup" | |
], | |
"label": "Font" | |
}, | |
"prefbar:button:restartbrowser": { | |
"type": "button", | |
"label": "Restart", | |
"onclick": "// Restart Browser button for PrefBar\n// Code has been taken from Mozilla toolkit sourcecode and is licensed\n// under the same license as Mozilla toolkit itself.\n\nfunction main() {\n var cancelQuit = Components.classes[\"@mozilla.org/supports-PRBool;1\"]\n .createInstance(Components.interfaces.nsISupportsPRBool);\n var obs = Components.classes[\"@mozilla.org/observer-service;1\"]\n .getService(Components.interfaces.nsIObserverService);\n\n obs.notifyObservers(cancelQuit, \"quit-application-requested\", \"restart\");\n if (cancelQuit.data) return; // somebody canceled our quit request\n \n var appStartup = Components.classes[\"@mozilla.org/toolkit/app-startup;1\"]\n .getService(Components.interfaces.nsIAppStartup);\n appStartup.quit(Components.interfaces.nsIAppStartup.eAttemptQuit |\n Components.interfaces.nsIAppStartup.eRestart);\n}\n\nif(confirm(\"Are you sure you want to restart?\")) main();", | |
"hkkey": "R", | |
"hkkeycode": "", | |
"hkmodifiers": "accel,alt" | |
}, | |
"prefbar:button:serverinfo": { | |
"type": "button", | |
"label": "Server Info", | |
"onclick": "// Server Info Button for PrefBar\n// Copyright (C) Manuel Reimer (Manuel _dot_ Reimer _at_ gmx _dot_ de)\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// version 2 as published by the Free Software Foundation\n\nfunction onLoad(e) {\n var svr = e.target.getResponseHeader(\"Server\");\n\n var title = \"PrefBar Server Info Button\";\n\n // No response at all? Tell user and exit\n if (!svr) {\n goPrefBar.msgAlert(window, \"Server did not return any information\", title);\n if (typeof button == \"object\") button.disabled = false;\n return;\n }\n\n // Try to preparse response\n var os; var mods;\n if (svr.match(/([^ ]+) *\\((.*?)\\) ?(.*)/)) {\n svr = RegExp.$1;\n os = RegExp.$2;\n mods = RegExp.$3;\n }\n\n // Add some more info based on given stuff\n if (svr.match(/microsoft/i) && !os) os = \"Windows\";\n if (os && os.match(/^(debian|red hat)$/i))\n os = \"Linux, \" + os;\n\n // Generate Message\n var msg = \"\";\n if (svr) msg += \"Server: \" + svr + \"\\n\";\n if (os) msg += \"OS: \" + os + \"\\n\";\n if (mods) {\n msg += \"\\nMods:\\n\";\n msg += mods.split(\" \").join(\"\\n\");\n }\n\n goPrefBar.msgAlert(window, msg, title);\n\n if (typeof button == \"object\") button.disabled = false;\n}\n\nfunction onError(e) {\n alert(\"Error \" + e.target.status + \" occurred while requesting info.\");\n if (typeof button == \"object\") button.disabled = false;\n}\n\nfunction onTimeout(request) {\n if (request.readyState == 4) return;\n request.abort();\n alert(\"Request timed out\");\n if (typeof button == \"object\") button.disabled = false;\n}\n\nvar url = window._content.document.location.toString();\n\n// Send request\nvar request = new XMLHttpRequest;\nrequest.onerror = onError;\nrequest.onload = onLoad;\nrequest.open(\"HEAD\", url, true);\nrequest.send(null);\n\n// Set a timeout of 10 seconds.\nsetTimeout(onTimeout, 10000, request);\n\n// Disable button\nif (typeof button == \"object\") button.disabled = true;" | |
}, | |
"prefbar:button:clrall": { | |
"label": "Clear All", | |
"type": "button", | |
"onclick": "//### DO NOT EDIT THIS BUTTON! ###\n// This button will be overwritten with each PrefBar update!\n// If you want to customize this button, create a copy first.\n// On your copy, you may (un)comment below, as desired\n\nif(confirm(\"Clear all?\"))\n{\nprefbarClearLocationBar();\nprefbarClearHistory();\nprefbarClearAllCache();\n//prefbarClearCookies();\n//prefbarClearFormData();\n//prefbarClearDownloads();\n//prefbarClearPasswords();\n//prefbarClearSessions();\n//prefbarClearOfflineApps();\n\nalert(\"All cleared.\");\n}" | |
}, | |
"prefbar:button:save_session-exit": { | |
"type": "button", | |
"label": "Save Session & Exit", | |
"onclick": "if(confirm(\"Save session and exit?\")) {\nSaveSession.save_session_exit(this);\n}" | |
}, | |
"prefbar:button:deldomaincookies": { | |
"type": "button", | |
"label": "Clear Domain Cookies", | |
"onclick": "// Clear all domain cookies\nvar curHost = window._content.document.location.host;\nvar idx = curHost.lastIndexOf(\".\");\nif (idx > 0) {\n idx = curHost.lastIndexOf(\".\", idx-1);\n}\nif (idx > 0) {\n curHost = curHost.substring(idx+1);\n}\n// cut away port\nidx = curHost.lastIndexOf(\":\");\nif (idx > 0) {\n curHost = curHost.substring(0, idx);\n}\nif (confirm (\"Clear cookies for \"+curHost+\"?\")) {\n var cookiemanager = Components.classes[\"@mozilla.org/cookiemanager;1\"].getService();\n cookiemanager = cookiemanager.QueryInterface(Components.interfaces.nsICookieManager);\n var enumerator = cookiemanager.enumerator;\n while (enumerator.hasMoreElements()) {\n var cookie = enumerator.getNext();\n if (!cookie) break;\n cookie = cookie.QueryInterface(Components.interfaces.nsICookie);\n //alert(\"cookie for: \"+cookie.host);\n if (cookie.host.indexOf(curHost) >= 0) {\n cookiemanager.remove(cookie.host, cookie.name, cookie.path, false);\n }\n }\n\n alert(\"Cookies for \"+curHost+\" cleared.\");\n}\n" | |
}, | |
"prefbar:menu:privacy-menu": { | |
"type": "submenu", | |
"items": [ | |
"prefbar:button:referrer", | |
"prefbar:button:useragent", | |
"prefbar:button:mre_refererspoof" | |
], | |
"label": "Privacy" | |
}, | |
"prefbar:button:separator0u": { | |
"type": "separator" | |
}, | |
"prefbar:menu:navigation-menu": { | |
"type": "submenu", | |
"items": [ | |
"prefbar:button:back", | |
"prefbar:button:forward", | |
"prefbar:button:reload", | |
"prefbar:button:stop", | |
"prefbar:button:separator2", | |
"prefbar:button:home" | |
], | |
"label": "Nav" | |
}, | |
"prefbar:button:separator6": { | |
"type": "separator" | |
}, | |
"prefbar:button:cacheenabled": { | |
"label": "Cache", | |
"type": "extcheck", | |
"setfunction": "prefbarSetCacheEnabled(value);", | |
"getfunction": "value = prefbarGetCacheEnabled();" | |
}, | |
"prefbar:button:userstylecheckbox": { | |
"type": "extcheck", | |
"label": "UserStyle", | |
"browserbtnupdatefor": "false", | |
"setfunction": "if (!event.shiftKey) {\n goPrefBar.SetPref(\"extensions.prefbar.buttons.userstylecheckbox.value\", value);\n window.PrefBarUserStyleCheckboxUpdate(true);\n}\nelse\n window.PrefBarUserStyleCheckboxUpdate(true, \"edit\");", | |
"getfunction": "value = goPrefBar.GetPref(\"extensions.prefbar.buttons.userstylecheckbox.value\", false);", | |
"initfunction": "// PrefBar UserStyle checkbox\n// Copyright (C) Manuel Reimer (Manuel _dot_ Reimer _at_ gmx _dot_ de)\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// version 3 as published by the Free Software Foundation\n\n// This function syncs pref value with load status of our stylesheet\n// We place this to the global \"window\" object as we also call it from set-function\nwindow.PrefBarUserStyleCheckboxUpdate = function(aInteractive, aAction) {\n // Get path of CSS file\n var dirService = Components.classes[\"@mozilla.org/file/directory_service;1\"]\n .getService(Components.interfaces.nsIProperties);\n var cssfile = dirService.get(\"ProfD\", Components.interfaces.nsIFile);\n cssfile.append(\"chrome\");\n cssfile.append(\"userstyle.css\");\n if (!cssfile.exists()) {\n if (aInteractive) goPrefBar.msgAlert(window, \"Stylesheet '\" + cssfile.path + \"' not found!\");\n return false;\n }\n\n // Open editor, if requested\n if (aAction == \"edit\") {\n var pref = \"extensions.prefbar.buttons.userstylecheckbox.editor\";\n var editor = goPrefBar.GetPref(pref);\n if (!editor)\n goPrefBar.msgAlert(window, \"You have to save the path to your editor to the following pref first: \" + pref);\n else\n setTimeout(function() {\n goPrefBar.RunApplication(editor, [cssfile.path]);\n }, 1000);\n return false;\n }\n\n // Convert path to file URI\n var fileHandler = Components.classes[\"@mozilla.org/network/protocol;1?name=file\"]\n .getService(Components.interfaces.nsIFileProtocolHandler);\n var cssuri = fileHandler.newFileURI(cssfile);\n\n // Load or unload stylesheet based on pref value\n var sss = Components.classes[\"@mozilla.org/content/style-sheet-service;1\"]\n .getService(Components.interfaces.nsIStyleSheetService);\n var status = goPrefBar.GetPref(\"extensions.prefbar.buttons.userstylecheckbox.value\");\n if (status && !sss.sheetRegistered(cssuri, sss.USER_SHEET))\n sss.loadAndRegisterSheet(cssuri, sss.USER_SHEET);\n else if (!status && sss.sheetRegistered(cssuri, sss.USER_SHEET))\n sss.unregisterSheet(cssuri, sss.USER_SHEET);\n\n return true;\n}\nwindow.PrefBarUserStyleCheckboxUpdate();" | |
}, | |
"prefbar:button:openaddonmanager": { | |
"type": "button", | |
"label": "Add-ons manager", | |
"onclick": "if (\"toEM\" in window)\n toEM();\nelse if (\"BrowserOpenAddonsMgr\" in window)\n BrowserOpenAddonsMgr();\nelse\n goPrefBar.msgAlert(window, \"Your browser is not supported.\");" | |
}, | |
"prefbar:button:sminfolist": { | |
"type": "button", | |
"label": "InfoList", | |
"onclick": "// PrefBar InfoList button\n// Copyright (C) Manuel Reimer <[email protected]>\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// version 3 as published by the Free Software Foundation\n\nfunction main() {\n if (getExtMgrExts()) return;\n if (getExtMgr2Exts()) return;\n alert(\"Failed to get extensions.\");\n}\n\n// Firefox up to 3.6, SeaMonkey 2.0\nfunction getExtMgrExts() {\n if (!(\"@mozilla.org/extensions/manager;1\" in Components.classes)) return false;\n var RDF = goPrefBar.RDF.RDFService;\n\n var RDisabledPref = RDF.GetResource(\"http://www.mozilla.org/2004/em-rdf#isDisabled\");\n var RURLPref = RDF.GetResource(\"http://www.mozilla.org/2004/em-rdf#homepageURL\");\n\n var extMgr = Components.classes[\"@mozilla.org/extensions/manager;1\"]\n .getService(Components.interfaces.nsIExtensionManager);\n var appInfo = Components.classes[\"@mozilla.org/xre/app-info;1\"]\n .getService(Components.interfaces.nsIXULAppInfo);\n\n var ds = extMgr.datasource;\n\n var ditems;\n try {\n ditems = extMgr.getIncompatibleItemList(appInfo.ID, appInfo.version, appInfo.platformVersion, 2, true, {});\n } catch(e) {\n ditems = extMgr.getIncompatibleItemList(appInfo.version, appInfo.platformVersion, 2, true, {});\n }\n var extdisabled = {};\n for (var i = 0; i < ditems.length; i++)\n extdisabled[ditems[i].id] = true;\n\n var arrout = new Array();\n\n var items = extMgr.getItemList(2, {});\n for (var j = 0; j < items.length; j++) {\n var item = items[j];\n\n var Ritem = RDF.GetResource(\"urn:mozilla:item:\" + item.id);\n\n var obj = {'name':item.name,\n 'version':item.version,\n 'isActive':!extdisabled[item.id],\n 'homepageURL':''};\n\n if (obj.isActive) {\n var Ldisabled = ds.GetTarget(Ritem, RDisabledPref, true);\n if (Ldisabled) {\n var dvalue = Ldisabled.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;\n obj.isActive = (dvalue != \"true\");\n }\n }\n\n var Lurl = ds.GetTarget(Ritem, RURLPref, true);\n if (Lurl) obj.homepageURL = Lurl.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;\n\n arrout.push(obj);\n }\n\n printInfo(arrout);\n\n return true;\n}\n\n// Firefox 3.7, SeaMonkey 2.1?\nfunction getExtMgr2Exts() {\n var extMgr = {};\n try {\n Components.utils.import(\"resource://gre/modules/AddonManager.jsm\", extMgr);\n } catch(e) { return false; }\n extMgr.AddonManager.getAddonsByTypes([\"extension\"], printInfo);\n return true;\n}\n\nfunction printInfo(aData) {\n var output = \"\";\n\n var date = new Date();\n output += \"Last updated: \" + date.toString() + \"\\n\";\n output += \"User Agent: \" + navigator.userAgent + \"\\n\";\n output += \"\\n\";\n\n var enabledcount = 0;\n var arrout = new Array();\n for (var index in aData) {\n var addon = aData[index];\n var line = \"* \" + addon.name + \" \" + addon.version;\n if (addon.homepageURL) line += \" (\" + addon.homepageURL + \")\";\n if (addon.isActive)\n enabledcount++;\n else\n line += \" (disabled)\";\n arrout.push(line);\n }\n\n arrout.sort();\n\n output += \"Extensions (enabled: \" + enabledcount + \")\\n\";\n output += arrout.join(\"\\n\");\n\n var tb = document.getElementById(\"content\");\n var tres = tb.addTab(\"data:text/plain,\" + escape(output));\n tb.selectedTab = tres;\n}\n\nmain();" | |
}, | |
"prefbar:button:infolist_mod": { | |
"type": "button", | |
"label": "Add-on list", | |
"onclick": "// PrefBar InfoList button\n// Copyright (C) Manuel Reimer <[email protected]>\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// version 3 as published by the Free Software Foundation\n\nfunction main() {\n if (getExtMgrExts()) return;\n if (getExtMgr2Exts()) return;\n alert(\"Failed to get extensions.\");\n}\n\n// Firefox up to 3.6, SeaMonkey 2.0\nfunction getExtMgrExts() {\n if (!(\"@mozilla.org/extensions/manager;1\" in Components.classes)) return false;\n var RDF = goPrefBar.RDF.RDFService;\n\n var RDisabledPref = RDF.GetResource(\"http://www.mozilla.org/2004/em-rdf#isDisabled\");\n var RURLPref = RDF.GetResource(\"http://www.mozilla.org/2004/em-rdf#homepageURL\");\n\n var extMgr = Components.classes[\"@mozilla.org/extensions/manager;1\"]\n .getService(Components.interfaces.nsIExtensionManager);\n var appInfo = Components.classes[\"@mozilla.org/xre/app-info;1\"]\n .getService(Components.interfaces.nsIXULAppInfo);\n\n var ds = extMgr.datasource;\n\n var ditems;\n try {\n ditems = extMgr.getIncompatibleItemList(appInfo.ID, appInfo.version, appInfo.platformVersion, 2, true, {});\n } catch(e) {\n ditems = extMgr.getIncompatibleItemList(appInfo.version, appInfo.platformVersion, 2, true, {});\n }\n var extdisabled = {};\n for (var i = 0; i < ditems.length; i++)\n extdisabled[ditems[i].id] = true;\n\n var arrout = new Array();\n\n var items = extMgr.getItemList(2, {});\n for (var j = 0; j < items.length; j++) {\n var item = items[j];\n\n var Ritem = RDF.GetResource(\"urn:mozilla:item:\" + item.id);\n\n var obj = {'name':item.name,\n 'version':item.version,\n 'isActive':!extdisabled[item.id],\n 'homepageURL':''};\n\n if (obj.isActive) {\n var Ldisabled = ds.GetTarget(Ritem, RDisabledPref, true);\n if (Ldisabled) {\n var dvalue = Ldisabled.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;\n obj.isActive = (dvalue != \"true\");\n }\n }\n\n var Lurl = ds.GetTarget(Ritem, RURLPref, true);\n if (Lurl) obj.homepageURL = Lurl.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;\n\n arrout.push(obj);\n }\n\n printInfo(arrout);\n\n return true;\n}\n\n// Firefox 3.7, SeaMonkey 2.1?\nfunction getExtMgr2Exts() {\n var extMgr = {};\n try {\n Components.utils.import(\"resource://gre/modules/AddonManager.jsm\", extMgr);\n } catch(e) { return false; }\n extMgr.AddonManager.getAddonsByTypes([\"extension\"], printInfo);\n return true;\n}\n\nfunction printInfo(aData) {\n var output = \"\";\n\n var date = new Date();\n output += \"Last updated: \" + date.toString() + \"\\n\";\n output += \"User Agent: \" + navigator.userAgent + \"\\n\";\n output += \"\\n\";\n\n var enabledcount = 0;\n var arrout = new Array();\n var disabledcount=0;\n var arrout_disabled=new Array();\n for (var index in aData) {\n var addon = aData[index];\n var line = \"* \" + addon.name + \" \" + addon.version;\n if (addon.homepageURL) line += \" (\" + addon.homepageURL + \")\";\n if (addon.isActive){\n enabledcount++;\n arrout.push(line);\n }\n else {\n disabledcount++;\n arrout_disabled.push(line);\n }\n \n }\n\n arrout.sort();\n arrout_disabled.sort();\n \n output += \"Total Extensions: \" + (enabledcount+disabledcount) + \"\\n\\n\";\n output += \"Enabled extensions: \" + enabledcount + \"\\n\";\n output += arrout.join(\"\\n\");\n output += \"\\n\\n\";\n output += \"Disabled extensions: \" + disabledcount + \"\\n\";\n output += arrout_disabled.join(\"\\n\");\n\n var tb = document.getElementById(\"content\");\n var tres = tb.addTab(\"data:text/plain,\" + escape(output));\n tb.selectedTab = tres;\n}\n\nmain();" | |
}, | |
"prefbar:menu:addon-submenu": { | |
"type": "submenu", | |
"items": [ | |
"prefbar:button:infolist_mod", | |
"prefbar:button:infolist-themes", | |
"prefbar:button:infolist-plugins", | |
"prefbar:button:separator135468", | |
"prefbar:button:openaddonmanager" | |
], | |
"label": "Add-ons" | |
}, | |
"prefbar:button:separator135468": { | |
"type": "separator" | |
}, | |
"prefbar:button:infolist-themes": { | |
"type": "button", | |
"label": "Theme list", | |
"onclick": "// PrefBar InfoList button\n// Copyright (C) Manuel Reimer <[email protected]>\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// version 3 as published by the Free Software Foundation\n\nfunction main() {\n if (getExtMgrExts()) return;\n if (getExtMgr2Exts()) return;\n alert(\"Failed to get extensions.\");\n}\n\n// Firefox up to 3.6, SeaMonkey 2.0\nfunction getExtMgrExts() {\n if (!(\"@mozilla.org/extensions/manager;1\" in Components.classes)) return false;\n var RDF = goPrefBar.RDF.RDFService;\n\n var RDisabledPref = RDF.GetResource(\"http://www.mozilla.org/2004/em-rdf#isDisabled\");\n var RURLPref = RDF.GetResource(\"http://www.mozilla.org/2004/em-rdf#homepageURL\");\n\n var extMgr = Components.classes[\"@mozilla.org/extensions/manager;1\"]\n .getService(Components.interfaces.nsIExtensionManager);\n var appInfo = Components.classes[\"@mozilla.org/xre/app-info;1\"]\n .getService(Components.interfaces.nsIXULAppInfo);\n\n var ds = extMgr.datasource;\n\n var ditems;\n try {\n ditems = extMgr.getIncompatibleItemList(appInfo.ID, appInfo.version, appInfo.platformVersion, 2, true, {});\n } catch(e) {\n ditems = extMgr.getIncompatibleItemList(appInfo.version, appInfo.platformVersion, 2, true, {});\n }\n var extdisabled = {};\n for (var i = 0; i < ditems.length; i++)\n extdisabled[ditems[i].id] = true;\n\n var arrout = new Array();\n\n var items = extMgr.getItemList(2, {});\n for (var j = 0; j < items.length; j++) {\n var item = items[j];\n\n var Ritem = RDF.GetResource(\"urn:mozilla:item:\" + item.id);\n\n var obj = {'name':item.name,\n 'version':item.version,\n 'isActive':!extdisabled[item.id],\n 'homepageURL':''};\n\n if (obj.isActive) {\n var Ldisabled = ds.GetTarget(Ritem, RDisabledPref, true);\n if (Ldisabled) {\n var dvalue = Ldisabled.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;\n obj.isActive = (dvalue != \"true\");\n }\n }\n\n var Lurl = ds.GetTarget(Ritem, RURLPref, true);\n if (Lurl) obj.homepageURL = Lurl.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;\n\n arrout.push(obj);\n }\n\n printInfo(arrout);\n\n return true;\n}\n\n// Firefox 3.7, SeaMonkey 2.1?\nfunction getExtMgr2Exts() {\n var extMgr = {};\n try {\n Components.utils.import(\"resource://gre/modules/AddonManager.jsm\", extMgr);\n } catch(e) { return false; }\n extMgr.AddonManager.getAddonsByTypes([\"theme\"], printInfo);\n return true;\n}\n\nfunction printInfo(aData) {\n var output = \"\";\n\n var date = new Date();\n output += \"Last updated: \" + date.toString() + \"\\n\";\n output += \"User Agent: \" + navigator.userAgent + \"\\n\";\n output += \"\\n\";\n\n var enabledcount = 0;\n var arrout = new Array();\n var disabledcount=0;\n var arrout_disabled=new Array();\n for (var index in aData) {\n var addon = aData[index];\n var line = \"* \" + addon.name + \" \" + addon.version;\n if (addon.homepageURL) line += \" (\" + addon.homepageURL + \")\";\n if (addon.isActive){\n enabledcount++;\n arrout.push(line);\n }\n else {\n disabledcount++;\n arrout_disabled.push(line);\n }\n \n }\n\n arrout.sort();\n arrout_disabled.sort();\n \n output += \"Total Themes: \" + (enabledcount+disabledcount) + \"\\n\\n\";\n output += \"Enabled theme:\\n\";\n output += arrout.join(\"\\n\");\n output += \"\\n\\n\";\n output += \"Disabled themes: \" + disabledcount + \"\\n\";\n output += arrout_disabled.join(\"\\n\");\n\n var tb = document.getElementById(\"content\");\n var tres = tb.addTab(\"data:text/plain,\" + escape(output));\n tb.selectedTab = tres;\n}\n\nmain();" | |
}, | |
"prefbar:button:infolist-plugins": { | |
"type": "button", | |
"label": "Plugin list", | |
"onclick": "// PrefBar InfoList button\n// Copyright (C) Manuel Reimer <[email protected]>\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// version 3 as published by the Free Software Foundation\n\nfunction main() {\n if (getExtMgrExts()) return;\n if (getExtMgr2Exts()) return;\n alert(\"Failed to get extensions.\");\n}\n\n// Firefox up to 3.6, SeaMonkey 2.0\nfunction getExtMgrExts() {\n if (!(\"@mozilla.org/extensions/manager;1\" in Components.classes)) return false;\n var RDF = goPrefBar.RDF.RDFService;\n\n var RDisabledPref = RDF.GetResource(\"http://www.mozilla.org/2004/em-rdf#isDisabled\");\n var RURLPref = RDF.GetResource(\"http://www.mozilla.org/2004/em-rdf#homepageURL\");\n\n var extMgr = Components.classes[\"@mozilla.org/extensions/manager;1\"]\n .getService(Components.interfaces.nsIExtensionManager);\n var appInfo = Components.classes[\"@mozilla.org/xre/app-info;1\"]\n .getService(Components.interfaces.nsIXULAppInfo);\n\n var ds = extMgr.datasource;\n\n var ditems;\n try {\n ditems = extMgr.getIncompatibleItemList(appInfo.ID, appInfo.version, appInfo.platformVersion, 2, true, {});\n } catch(e) {\n ditems = extMgr.getIncompatibleItemList(appInfo.version, appInfo.platformVersion, 2, true, {});\n }\n var extdisabled = {};\n for (var i = 0; i < ditems.length; i++)\n extdisabled[ditems[i].id] = true;\n\n var arrout = new Array();\n\n var items = extMgr.getItemList(2, {});\n for (var j = 0; j < items.length; j++) {\n var item = items[j];\n\n var Ritem = RDF.GetResource(\"urn:mozilla:item:\" + item.id);\n\n var obj = {'name':item.name,\n 'version':item.version,\n 'isActive':!extdisabled[item.id],\n 'homepageURL':''};\n\n if (obj.isActive) {\n var Ldisabled = ds.GetTarget(Ritem, RDisabledPref, true);\n if (Ldisabled) {\n var dvalue = Ldisabled.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;\n obj.isActive = (dvalue != \"true\");\n }\n }\n\n var Lurl = ds.GetTarget(Ritem, RURLPref, true);\n if (Lurl) obj.homepageURL = Lurl.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;\n\n arrout.push(obj);\n }\n\n printInfo(arrout);\n\n return true;\n}\n\n// Firefox 3.7, SeaMonkey 2.1?\nfunction getExtMgr2Exts() {\n var extMgr = {};\n try {\n Components.utils.import(\"resource://gre/modules/AddonManager.jsm\", extMgr);\n } catch(e) { return false; }\n extMgr.AddonManager.getAddonsByTypes([\"plugin\"], printInfo);\n return true;\n}\n\nfunction printInfo(aData) {\n var output = \"\";\n\n var date = new Date();\n output += \"Last updated: \" + date.toString() + \"\\n\";\n output += \"User Agent: \" + navigator.userAgent + \"\\n\";\n output += \"\\n\";\n\n var enabledcount = 0;\n var arrout = new Array();\n var disabledcount=0;\n var arrout_disabled=new Array();\n for (var index in aData) {\n var addon = aData[index];\n var line = \"* \" + addon.name + \" \" + addon.version;\n if (addon.homepageURL) line += \" (\" + addon.homepageURL + \")\";\n if (addon.isActive){\n enabledcount++;\n arrout.push(line);\n }\n else {\n disabledcount++;\n arrout_disabled.push(line);\n }\n \n }\n\n arrout.sort();\n arrout_disabled.sort();\n \n output += \"Total Plugins: \" + (enabledcount+disabledcount) + \"\\n\\n\";\n output += \"Enabled plugins: \" + enabledcount + \"\\n\";\n output += arrout.join(\"\\n\");\n output += \"\\n\\n\";\n output += \"Disabled plugins: \" + disabledcount + \"\\n\";\n output += arrout_disabled.join(\"\\n\");\n\n var tb = document.getElementById(\"content\");\n var tres = tb.addTab(\"data:text/plain,\" + escape(output));\n tb.selectedTab = tres;\n}\n\nmain();" | |
}, | |
"prefbar:button:about_config-button": { | |
"type": "button", | |
"label": "about:config", | |
"onclick": "var tb = document.getElementById(\"content\");\nvar tres = tb.addTab(\"about:config\");\ntb.selectedTab = tres;" | |
}, | |
"prefbar:button:about_config-link": { | |
"type": "link", | |
"label": "about:config", | |
"url": "about:config" | |
}, | |
"prefbar:button:mre_refererspoof": { | |
"items": [ | |
[ | |
"don't spoof", | |
"DEFAULT" | |
], | |
[ | |
"send nothing", | |
"" | |
], | |
[ | |
"target host", | |
"HOST" | |
], | |
[ | |
"linux", | |
"http://www.linux.org/" | |
], | |
[ | |
"example", | |
"http://www.example.com/" | |
], | |
[ | |
"randomc.net", | |
"http://randomc.net/" | |
] | |
], | |
"type": "extlist", | |
"dontupdatelistitems": "true", | |
"label": "refererspoof", | |
"setfunction": "// Just set preference with selected value\ngoPrefBar.SetPref(\"extensions.prefbar.buttons.refererspoof\", value);", | |
"getfunction": "// Just display value of our preference\nvalue = goPrefBar.GetPref(\"extensions.prefbar.buttons.refererspoof\");", | |
"initfunction": "// Referer Spoof Menulist for PrefBar\n// Copyright (C) Manuel Reimer (Manuel _dot_ Reimer _at_ gmx _dot_ de)\n// This program is free software; you can redistribute it and/or\n// modify it under the terms of the GNU General Public License\n// version 3 as published by the Free Software Foundation\n\n// If our observer isn't already initialized, then do so, now\nif (!(\"refererspoofobserver\" in goPrefBar.buttons)) {\n var observer = {\n observe: function(subject, topic, data) \n {\n if (topic == \"http-on-modify-request\") {\n // The References to \"goPrefBar\" and \"Components\", we inherit from the first\n // browser window, are lost with the close of this window, so we override\n // them with globals ones, based on our goPrefBar reference in this object.\n var goPrefBar = this.goPrefBar;\n var Components = goPrefBar.Components ? goPrefBar.Components : goPrefBar.__parent__.Components;\n\n var httpChannel = subject.QueryInterface(Components.interfaces.nsIHttpChannel);\n var val = goPrefBar.GetPref(\"extensions.prefbar.buttons.refererspoof\", \"DEFAULT\");\n if (val == \"DEFAULT\") return;\n if (val == \"HOST\") val = \"http://\" + httpChannel.getRequestHeader(\"Host\") + \"/\";\n httpChannel.setRequestHeader(\"Referer\", val, false);\n }\n }\n };\n\n // Keep a reference to \"goPrefBar\" in the observer object\n observer.goPrefBar = goPrefBar;\n\n var observerService = Components.classes[\"@mozilla.org/observer-service;1\"]\n .getService(Components.interfaces.nsIObserverService);\n observerService.addObserver(observer, \"http-on-modify-request\", false);\n\n // Place reference to observer to goPrefBar.buttons\n goPrefBar.buttons.refererspoofobserver = observer;\n}" | |
}, | |
"prefbar:button:security-tls-version-min": { | |
"type": "menulist", | |
"label": "SSL min ver.", | |
"prefstring": "security.tls.version.min", | |
"items": [ | |
[ | |
"SSL v3.0", | |
"0" | |
], | |
[ | |
"TLS 1.0", | |
"1" | |
], | |
[ | |
"TLS 1.1", | |
"2" | |
], | |
[ | |
"TLS 1.2", | |
"3" | |
] | |
] | |
}, | |
"prefbar:button:ua-fx-compat": { | |
"type": "check", | |
"label": "UA Fx Compat", | |
"prefstring": "general.useragent.compatMode.firefox", | |
"topref": "!value", | |
"frompref": "value" | |
}, | |
"prefbar:button:forbidMetaRefresh": { | |
"type": "check", | |
"label": "Meta Refresh", | |
"prefstring": "noscript.forbidMetaRefresh", | |
"topref": "!Boolean(value)", | |
"frompref": "!Boolean(value)" | |
}, | |
"prefbar:menu:TabToggle": { | |
"type": "submenu", | |
"items": [ | |
"prefbar:button:prefbartabjavascript", | |
"prefbar:button:prefbartabimages", | |
"prefbar:button:prefbartabplugins" | |
], | |
"label": "Tab" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment