User:Dickvl: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(→‎Restart Firefox: maxVersion bump 999)
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Bookmarklets==
Bookmarklets can be found here: [[User:Dickvl/Bookmarklets]]<br />
See also [http://en.wikipedia.org/wiki/Bookmarklet Wikipedia: Bookmarklet]
===Navigator Object===
===Navigator Object===
Here is a bookmarklet to display the content of the Navigator object (plugins, mimeTypes).
Here is a bookmarklet to display the content of the '''Navigator''' object (plugins, mimeTypes)
<pre>
<pre>
javascript:/* dickvl@kb.mozillazine.org */
javascript:/* dickvl@kb.mozillazine.org */
Line 19: Line 23:
</pre>
</pre>


===Add-ons===
==Code==
Sometime ago I noticed the [http://forums.mozillazine.org/viewtopic.php?f=23&t=1172765 Mozilla's Places Stats Project] thread with the possibility to display a list of installed extensions in JSON notation by using the Error Console. That gave me an idea to do the same for the printing passwords code in the [[Password Manager]] article.<br>
Code for [[userChrome.css]] and [[userContent.css]] can be found here [[User:Dickvl/Code]]


I have also taken the opportunity to create a similar file for displaying the installed extensions. So here are two versions.<br>
===Double Underlined pop-ups ===
The first version shows the name and version number and the second version has the possibility to select which additional columns you wish to see.<br>
You can add this code to ''userContent.css'' to hide some ads and some [http://en.wikipedia.org/wiki/IntelliTXT IntelliTXT] type pop-ups (double underlined links) [http://forums.mozillazine.org/viewtopic.php?f=38&t=564572&p=8538685].
<pre>/*
<pre>/* google_ads_frame, yahoo iframe*/
* Paste this file into Firefox's JavaScript Console and evaluate it to display the installed extensions and themes - dickvl@kb.mozillazine.org
IFRAME[src*='googlesyndication'],
*/
IFRAME[name='google_ads_frame'] {display:none!important}
(function () {
IFRAME[title='Ads by Yahoo!'] {display:none!important}
var Cc = Components.classes;
var Ci = Components.interfaces;
var EMP = "http://www.mozilla.org/2004/em-rdf#";
var rv = {}; rv.ext = []; rv.the = [];


var ds =
/* intelliTXT and others */
    Cc["@mozilla.org/extensions/manager;1"].
#iTt,#adbrite_inline_div,#AdvertBanner,#amzn-popup-div,
    getService(Ci.nsIExtensionManager).
#konaLayers,#lwPreview,#menuModule,#tf_AdDiv,#tooltipBox,
    datasource;
#IL_BUBBLE,#IL_FORM_CONT,#snap_com_shot_main
var rdf =
{display:none!important}
    Cc["@mozilla.org/rdf/rdf-service;1"].
    getService(Ci.nsIRDFService);
var elts =
    Cc["@mozilla.org/rdf/container-utils;1"].
    getService(Ci.nsIRDFContainerUtils).
    MakeSeq(ds, rdf.GetResource("urn:mozilla:item:root")).
    GetElements();


function rdfGS(elt,res){
/* get.lingospot.com */
try{
.lingo_info_box *,.lingo_spot *,.lingo_reset *{display:none!important}
    return(ds.GetTarget(elt,rdf.GetResource(EMP+res),true).QueryInterface(Ci.nsIRDFLiteral).Value);
</pre>
} catch(e){return("")}
}


function makeRV(elt,rv){
==Error Console==
var nam = rdfGS(elt,"name");
The Code examples to run in the ''"Tools -> Error Console"'' have been moved to the [[User:Dickvl/JavaScript_Error_Console]] page.
var ver = rdfGS(elt,"version");
var dis = rdfGS(elt,"isDisabled");
var hom = rdfGS(elt,"homepageURL");
rv.push({name:nam,id:elt.Value.replace(/^urn:mozilla:item:/,""),vers:ver,dis:dis,home:hom});
return(rv);
}


function makeLIST(rv){
==Extensions==
var list="",i,RV;
===Private Browsing===
for (i=0;RV=rv[i];i++) {
''Private Browsing disable'' (pbdisable) is a simple extension to disable the "Tools ->  Start Private Browsing" menu entry and the "Tools > Clear Recent History" menu entry in Firefox 3.5/6.<br>
  var name = RV.name;
The extension hides these menu entries and also disables their shortcut keys and should prevent Firefox from entering Private Browsing mode. The code doesn't hide "[[Menu_differences|Tools -> Options]] -> Privacy" to start PB mode automatically and you need to add code to userChrome.css to do that. The code in userChrome.css also hides the menu entries if the extension is disabled or not installed. Current Firefox versions still process code in userChrome.css if started in [[Safe_mode]]. It is possible to clear the cache via "[[Menu_differences|Tools -> Options]] -> Advanced -> Network" and to clear history in the Library and History sidebar. See also [https://wiki.mozilla.org/Firefox3.1/PrivateBrowsing/SecurityReview]
  var vers = RV.vers;
  var disab = (RV.dis=="true")?"(disabled)":"";
  var home = RV.home;
  list+="<a href=" + home + "><span>" + name + " </span><span> " + vers + " </span></a><span> " + disab + " </span></br>";
}
return(list);
}


while (elts.hasMoreElements()) {
For more information about the Private Browsing disable extension please visit: [[User:Dickvl/Private_Browsing_disable]]
var elt = elts.getNext().QueryInterface(Ci.nsIRDFResource);
if (ds.HasAssertion(elt,rdf.GetResource(EMP+"type"),rdf.GetIntLiteral(2),true)){
  makeRV(elt,rv.ext);
}
if (ds.HasAssertion(elt,rdf.GetResource(EMP+"type"),rdf.GetIntLiteral(4),true)){
  makeRV(elt,rv.the);
}
}


var extList="<p><b>Extensions:</b><br>"+makeLIST(rv.ext)+"</p>";
===Keysdisable===
var theList="<p><b>Themes:</b><br>"+makeLIST(rv.the)+"</p>";
I use this code on Linux to disable some shortcuts that I want to use in Prefbar or that are otherwise dangerous (Ctr+Q to Quit Firefox is too close to Ctrl+W).
<pre>
if(E=window.document.getElementById('key_closeWindow')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
if(E=window.document.getElementById('key_quitApplication')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
if(E=window.document.getElementById('key_privatebrowsing')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
if(E=window.document.getElementById('key_openDownloads')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
if(E=window.document.getElementById('key_undoCloseWindow')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
if(E=window.document.getElementById('manBookmarkKb')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
</pre>
You can use the DOM Inspector to find the ID of a menu entry if you want to disable other menu entries.<br />
You can modify the file ''keysdisable.xul'' in the ''keysdisable.jar''  (zip) archive in the ''keysdisable.xpi'' (zip) archive to make the changes.


window.open('data:text/html,
Copy and paste the full DATA code in the location bar and press the Enter key. Save the file as '''keysdisable.xpi'''. Updated maxVersion to 6.* (Apr 13, 2011)<br />
<html><head>
<pre>data:application/octet-stream;base64,
<meta http-equiv=content-type" content="text/html; charset=ISO-8859-1">
UEsDBBQAAAAIAIWYPzw1ZoQaSwAAAIIAAAAPABUAY2hyb21lLm1hbmlmZXN0VVQJAAMaxmVLGsZl
<title>Mozilla Extensions</title>
S1V4BADoA2QAS87PK0nNK+HMTq0sTsksTkzKSeVMzijKz03VT4ZI6fNy8XLll6UW5SRWQqWs9PWT
</head><body style="margin: 1em 3em; background-color: rgb(255, 221, 221);">
ivLLi1OL4IqgfL2K0hyEIiRD4QqRxECKebkAUEsDBBQAAAAIAECsjT5wIdJUfQEAAAUDAAALABwA
' + extList + theList + '
aW5zdGFsbC5yZGZVVAkAA6j6pU2L+qVNdXgLAAEE6QMAAARkAAAAbZJfT4MwFMXfTfwOlb2ZlDJY
</body></html>',
NiEMNVn2ok8m+t7BZWukLWnL/hm/u6xQx3Rv9Nzfub33lPRxzyu0BaWZFHNv7AfeY3Z7c3uTvi2W
"", "menubar=yes,toolbar=no,scrollbars=yes,resizable=yes,width=1000,height=600");
qK0JPfc2xtQJIbvdzt9FvlRrMo7jmAQhCUOsihLrgzB0j4UeeZ0nAX5h4/LIqopabxgEEwL8ZBx5
})();
7V0oXYDOFatNOwKiK9mYudcokfSmhAltaFVhTgUrQRtrQinwhBXZJxx0wTRdVfDUG45MwOmmlHSI
owXlkL20/KLjbd2KjuhzyNoYbNGdXb04DzpshDDqR9BISw6Ig2iQ3khl8sZo22pode1yBdRIlRUs
/9xWFnOSQzZtu5qu4f3tNevzLKVquPavLTukXQdzqCELbdl+ngK/wxgtmYJS7hHGZ5SqNZjnuq5Y
Tn8nvXifTnHhf0H+EERBOcN5GFA8mU5KHK8CwOOIRjSGeBY9TL6H79BZORMffbRRH/VAGnB078Sp
f99xZ6nnyL/xumWvLfMXTkn7m2c/UEsDBAoAAAAAAA2ldjsAAAAAAAAAAAAAAAAHABUAY2hyb21l
L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AACC
AAAADwANAAAAAAABAAAA7YEAAAAAY2hyb21lLm1hbmlmZXN0VVQFAAMaxmVLVXgAAFBLAQIeAxQA
AAAIAECsjT5wIdJUfQEAAAUDAAALABgAAAAAAAEAAADtgY0AAABpbnN0YWxsLnJkZlVUBQADqPql
TXV4CwABBOkDAAAEZAAAAFBLAQIXAwoAAAAAAA2ldjsAAAAAAAAAAAAAAAAHAA0AAAAAAAAAEADt
QU8CAABjaHJvbWUvVVQFAAOpkwlLVXgAAFBLAQIXAwoAAAAAAFiYPzwAAAAAAAAAAAAAAAAPAA0A
AAAAAAAAEADtQYkCAABjaHJvbWUvY29udGVudC9VVAUAA8fFZUtVeAAAUEsBAhcDFAAAAAgAwqIk
PahmAbmIAQAA4QUAAB4ADQAAAAAAAQAAAO2BywIAAGNocm9tZS9jb250ZW50L2tleXNkaXNhYmxl
Lnh1bFVUBQADTI6CTFV4AABQSwECFwMUAAAACAC3mD88XNW0nYMAAACjAAAAHgANAAAAAAABAAAA
7YGkBAAAY2hyb21lL2NvbnRlbnQva2V5c2Rpc2FibGUuY3NzVVQFAAN5xmVLVXgAAFBLBQYAAAAA
BgAGANkBAAB4BQAAAAA=
</pre>
</pre>
<pre>/*
*To display the installed extensions and themes paste this file into Firefox's JavaScript Console and evaluate it - dickvl@kb.mozillazine.org
*/
(function () {
var Cc = Components.classes;
var Ci = Components.interfaces;
var EMP = "http://www.mozilla.org/2004/em-rdf#";
var EMT = 2; /* Extensions: EMT = 2;  Themes: EMT = 4; */
var rv = {}; rv.ext = []; rv.the = [];


/* columns - 0:space  1:name  2:version  3,4:disabled  5:id  6:description  7:homepage  8:compatible  9:install location */
===Restart Firefox===
var THEAD = ["","Name","Version","Disabled","(-)","ID","Description","Home Page","Comp.","Inst.Loc"];
This extension adds a ''Restart Firefox'' item to the File menu and the App menu. It displays that menu entry in the language of the installed locale (&addon.restartNow.label), so should work with all locales. All open tabs and windows should be restored if session restore is working properly.<br />
var TCONT = (prompt("Columns:\n\n1:Name\n2:Version\n3:Disabled  4:(U|A)\n5:ID\n6:Description\n7:Home Page\n","1 2 3"));
Copy and paste the full DATA code in the location bar and press the Enter key. Save the file as '''restarter-1.2-fx.xpi''' (updated Jul 2, 2013) - works with Firefox 3.0 and later)
TCONT=((TCONT==null || TCONT=="")?"1 2 3":TCONT).split(" ");
<pre>data:application/octet-stream;base64,
 
UEsDBAoAAAAAAMl4OzUAAAAAAAAAAAAAAAAHABUAY2hyb21lL1VUCQADWoUaRVqFGkVVeAQAPjP/
var ds =
/1BLAwQKAAAAAADJeDs1AAAAAAAAAAAAAAAADwAVAGNocm9tZS9jb250ZW50L1VUCQADWoUaRVqF
    Cc["@mozilla.org/extensions/manager;1"].
GkVVeAQAPjP//1BLAwQUAAAACAD8COw8ZbXNK8ECAADJBQAAHAAVAGNocm9tZS9jb250ZW50L3Jl
    getService(Ci.nsIExtensionManager).
c3RhcnRlci54dWxVVAkAA8xOOkzMTjpMVXgEAOgDZACNVN9P2zAQfkfifzgsMVFpdQbbw6AtjAGT
    datasource;
+jBgtC8IVZObXKnBsT3boXQ//vedk7RNGWzLS5K783fffXe+7tFjruABnZdG99guf8OODjc3ulun
var rdf =
FyfD68szMORTYg43mxsA3a2z82F/eA3bMHZCZ6fDUxhcD4Znn4GlU2dyPEiS0iP1baJMKhRW/zwL
    Cc["@mozilla.org/rdf/rdf-service;1"].
GYPDJyD4GFDHzP5ZpNx8F9b6BdAquvHZAN5ecOqUf2vgZBpREFW2KEhmPebQB+ECOhZP1A8Jov3B
    getService(Ci.nsIRDFService);
NOSqx6YhWCIym8347C037jbZ3d/fTx6j948za+HEXSolyjP3OM+FpzTJrQh4j2jpM0zRIZeeG63m
var elts =
/LFQLOruUydtgDC32GOBSkjuxIOorGXA1s3J6fHwmNqRJJAaKzGDCekFwRh1LwO/Ey5Jjabaw1LA
    Cc["@mozilla.org/rdf/container-utils;1"].
55W787Cz9+79XmtzY1LoNJARakWOrd1pwY9YIWH5ANr3yTaIvsL2TkxujaYMnkvK5CYiRc/XYjpR
    getService(Ci.nsIRDFContainerUtils).
bAAieW6CnMxBKAUzqTMz8xCmIoDQQOSUTEWZ+VshA0yFhzFi5PGtICqY8YjyIBwYDz1oJE6V8B79
    MakeSeq(ds, rdf.GetResource("urn:mozilla:item:root")).
DfvQlNqMPTrqcDu+ZIqdXTZq9Kn58FsMgypq58WCLmq8OrDVWdBJhU5RfYmk/4OWL6w1Lvj25dVH
    GetElements();
6tNfWC3ZpQ5pWPokfsz0MsNBDV0hVwQNeUrVF/T9zorva2BR63ZD/PZSbkbeegZYa9XDAV3IMKVL
 
DWJMyWjmaHyrlllniIkv+yQn0EjEMxFEq6rTYSicrgH/KVc9ywlRbPt6nkiyZsfWhq21LiaPxNYj
function rdfGS(elt,res){
OF5VVcFPeOI4DgFzGyLjWPEvwhqNDrtJdeniZunmqAtrbGHLrRH/vn6SCi+jiVVLLRolAYESY6TN
try{
8SrNM766TXu8tHcYSE0tCWOcGIcNrJi+T+cZGJ2aPKdNttxP5W3ssKTkkizJxHWQ1Ovs8DdQSwME
  return(ds.GetTarget(elt,rdf.GetResource(EMP+res),true).QueryInterface(Ci.nsIRDFLiteral).Value);
FAAAAAgA1oPiQqlafH18AQAA7wIAAAsAHABpbnN0YWxsLnJkZlVUCQADE+TSUQbk0lF1eAsAAQTp
}catch(e){return("")}
AwAABGQAAABtkl9vgjAUxZ/1U3T4sGRJaQWzDYJ1JsanPZls7xUu2oy2pNS/y777EIoyszd67u/c
}
nntpMjvKAu3BVEKrqTf2qTdjw2GyWixRXVHV1NtaW8aEHA4H/xD62mzIOIoiQgMSBNhkOa5OyvIj
 
VtXIaz0xyD82qc+iKHjjDSidEJAX48hjw0GygCo1orT1/Yiv9c5OvZ1RsfPEQlWWFwWWXIkcKnvx
function makeTD(rv){
DBKQsciYqc/cWDBvjj4LBZdbEtICDlVcAlt1cFNsJFd207OxHzS17uzK2S0gm2cZenSdHpHVaCkK
var i,j,DV,RV,TC,td="";
QFxlaF6WSILaNR36FtclNcCtNiwT6de+aKhOcsRWSyj5Bj5W78wtL9dmJyv/v+n6tGtgTyWwdoTm
for (i=0;RV=rv[i];i++) {
8yI/YFxnNJDrI8L4SnKzAVtHLkTKu5SDP/+iVa6r/ob0lYY0f8FpQDmePE9yHK0p4HHIQx5B9BK+
  td+="<tr>";
Tn56e++8UqhPt8/Qpw3Qk/ogP3Zq/bz8pxa9iW1Cchexnfafce7IhNQvmg1/AVBLAwQUAAAACABk
for(j=0;TC=TCONT[j];j++){
t+08rY2KmVsAAADuAAAADwAVAGNocm9tZS5tYW5pZmVzdFVUCQADm9M8TJvTPExVeAQA6ANkAEvO
  switch(parseInt(TC)){
zytJzStRKEotLkksKkktUkjOKMrPTdVPhkjoc+WXpRblJFZCxa309ZOK8suLU4vgKqB8vYrSHIQi
  case 1: DV=RV.name;break;
uHlwZXARsMLEggKgucWZ+Xk2xnrm1LfECM0WO1uQNQBQSwMEFAAAAAgA6bCOPgweK/LpAgAAkwYA
  case 2: DV=RV.vers;break;
AB0AHABjaHJvbWUvY29udGVudC9yZXN0YXJ0ZXIyLnh1bFVUCQAD9lOnTVhTp011eAsAAQTpAwAA
  case 3: DV=(RV.dis=="true")?"(disabled)":"";break;
BGQAAAClVN9P2zAQfkfifzgsMVFpdQbbw6AtjAGTeBh0tC8IoclNrtTg2J7tULof//vOSdqmDPZD
  case 4: DV=((RV.adis=="true")?"(A)":"")+((RV.udis=="true")?"(U)":"");break;
y0uSu/N33313vu7BQ67gHp2XRvfYNn/FDvbX17obx+dHw8v+CRjyKTGDq/U1gO7GydnwdHgJmzBy
  case 5: DV=RV.id;break;
QmfHw2MYXA6GJx+BpRNnctxLktIj9U2iTCoUVv88CxmD/Ucg+BBQx8z+SaTcfBXW+jnQMrrx2QDe
  case 6: DV=RV.descr;break;
nHPqlH8r4GS6piCqbF6QzHrMoQ/CBXQsnqgfEkT7vUnIVY9NQrBEZDqd8ulrbtxNsr27u5s8RO8v
  case 7: DV=RV.home;break;
Z1bCibtUSpRn7nCWC09pkhsR8A7R0meYoEMuPTdazfhDoVjU3adO2gBhZrHHApWQ3Ip7UVnLgI2r
  case 8: DV=(RV.comp=="true")?"Yes":((RV.comp=="false")?"No":"");break;
o+PD4SG1I0kgNVZiBmPSC4Ix6k4GfitckhpNtYeFgE8rd+tha+fN253W+tq40GkgI9SKHFq71YJv
  case 9: DV=RV.inst;break;
sULC8gG0PyXbIPoK2zsyuTWaMnguKZMbixQ9X4npRLEBiOSZCXI8A6EUTKXOzNRDmIgAQgORUzIV
  default: DV="";break;
ZeYvhQwwER5GiJHHl4KoYMYjyr1wYDz0oJE4VcJ79FfsXVNqM/LoqMPt+JIpdrbZdaNPzYffYBhU
  } td+="<td>"+DV+"</td>";
UVvPFnRe49WBrc6cTip0iupTJP0XtHxhrXHBt/sX76lPv2G1YJc6pGE5JfFjpucZDmroCrkiaMhT
}
qj6n77eWfF8Ci1q3G+K3F3Iz8tYzwFrLHg7oQoYJXWoQI0pGM0fjW7XMOkNMfNknOYZGIp6JIFpV
td+="</tr>";
nQ5D4XQN+Ee56llOiGLb1/NEkjU7tjJsrVUxeSS2GsHxoqoKvsMjx2EImNsQGceKfxDW9fV+N6ku
}
Xdws3Rx1YY0tbLk14t/nD1JhP5pYtdSiURIQKDFC2hwvRJYZzWstz8yUl44Oay6e9phQ4kmyaupU
return(td);
GOHYOGykiKxOCZaB0anJc1pwi9PlJe2wpKSYLDgu+Swpk5DR0HcyF27WFxr/i3YN95h1bW5H+f+N
}
MC22pF7M+z8BUEsBAhcDCgAAAAAAyXg7NQAAAAAAAAAAAAAAAAcADQAAAAAAAAAQAMBBAAAAAGNo
 
cm9tZS9VVAUAA1qFGkVVeAAAUEsBAhcDCgAAAAAAyXg7NQAAAAAAAAAAAAAAAA8ADQAAAAAAAAAQ
function makeRV(elt,rv){
AMBBOgAAAGNocm9tZS9jb250ZW50L1VUBQADWoUaRVV4AABQSwECFwMUAAAACAD8COw8ZbXNK8EC
var nam = rdfGS(elt,"name");
AADJBQAAHAANAAAAAAABAAAA7YF8AAAAY2hyb21lL2NvbnRlbnQvcmVzdGFydGVyLnh1bFVUBQAD
var ver = rdfGS(elt,"version");
zE46TFV4AABQSwECHgMUAAAACADWg+JCqVp8fXwBAADvAgAACwAYAAAAAAABAAAA7YGMAwAAaW5z
var des = rdfGS(elt,"description");
dGFsbC5yZGZVVAUAAxPk0lF1eAsAAQTpAwAABGQAAABQSwECFwMUAAAACABkt+08rY2KmVsAAADu
var dis = rdfGS(elt,"isDisabled");
AAAADwANAAAAAAABAAAA7YFNBQAAY2hyb21lLm1hbmlmZXN0VVQFAAOb0zxMVXgAAFBLAQIeAxQA
var ads = rdfGS(elt,"appDisabled");
AAAIAOmwjj4MHivy6QIAAJMGAAAdABgAAAAAAAEAAADtgeoFAABjaHJvbWUvY29udGVudC9yZXN0
var uds = rdfGS(elt,"userDisabled");
YXJ0ZXIyLnh1bFVUBQAD9lOnTXV4CwABBOkDAAAEZAAAAFBLBQYAAAAABgAGAOEBAAAqCQAAAAA=
var hom = rdfGS(elt,"homepageURL");
var com = rdfGS(elt,"compatible");
var ins = rdfGS(elt,"installLocation");
rv.push({name:nam,id:elt.Value.replace(/^urn:mozilla:item:/,""),vers:ver,descr:des,adis:ads,udis:uds,home:hom,dis:dis,inst:ins,comp:com});
return(rv);
}
 
while (elts.hasMoreElements()){
var elt = elts.getNext().QueryInterface(Ci.nsIRDFResource);
if(isExt=ds.HasAssertion(elt,rdf.GetResource(EMP+"type"),rdf.GetIntLiteral(2),true)){
  makeRV(elt,rv.ext);
}
if(isExt=ds.HasAssertion(elt,rdf.GetResource(EMP+"type"),rdf.GetIntLiteral(4),true)){
  makeRV(elt,rv.the);
}
}
 
var thead="";
for(j=0;TC=TCONT[j];j++){thead+="<td><b>"+(THEAD[(TC<THEAD.length)?TC:0])+"</b></td>";}
 
var tdivE = makeTD(rv.ext);
var tdivT = makeTD(rv.the);
 
function TD(string) {return (string.length < 2) ? "0" + string : string ;}
function FD(number){return (number < 1000) ? number + 2000 : number;}
 
var now = new Date();
var hrs = TD(now.getHours() + "");
var min = TD(now.getMinutes() + "");
var sec = TD(now.getSeconds() + "");
 
var timeValue = " | At  " + hrs + ":" + min + ":" + sec;
var days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var months = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
 
var today =  "On " + days[now.getDay()] + ", " + date + " " + months[now.getMonth()] + " " +   (FD(now.getYear())) + timeValue;
 
function makeTABLE(label,thead,tcont){
return('<p><b>'+label+':</b><br>
<table style="empty-cells: show; background-color: rgb(221, 255, 221);" border="1" cellspacing="0">
<tbody><tr style="background-color: rgb(204, 204, 255);">'+thead+'</tr>'+
tcont+'</tbody></table></p>');
}
 
window.open('data:text/html,
<html><head>
<meta http-equiv=content-type" content="text/html; charset=ISO-8859-1">
<title>Mozilla Extensions & Themes</title>
<style type="text/css">
td {
  font-family: "Trebuchet MS", Arial, Verdana, Sans-Serif;
  font-size: 85%;
  padding: 1px 2px 1px 2px;
}
</style>
</head><body style="margin: 1em 3em; background-color: rgb(255, 221, 221);">
<b>MOZILLA ADD-ONS INFORMATION (by dickvl@kb.mozillazine.org)</b><p>'+today+'</p>'+
makeTABLE("Extensions",thead,tdivE) + makeTABLE("Themes",thead,tdivT)+'
</body></html>',"", "menubar=yes,toolbar=no,resizable=yes,scrollbars=yes,width=1000,height=700");
})();
</pre>
</pre>


===Printing Passwords===
===TabVisited===
Here is an enhanced version of the Password printing code from [[Password Manager]] to show all the fields, may be helpful for troubleshooting issues.
In Firefox 3.6 and above it is no longer possible to use the ''selected'' attribute to style unvisited and visited tabs with code in [[userChrome.css]]. In Firefox 3.6 and above only the selected tab gets a ''selected="true"'' attribute. In previous Firefox 3 and 3.5 versions the visited tabs get a ''selected="false"'' attribute, but that attribute was removed to fix  buggy behavior [https://bugzilla.mozilla.org/show_bug.cgi?id=480813], [https://bugzilla.mozilla.org/show_bug.cgi?id=487242].<br>
<pre>/*
* Paste this file into Firefox's JavaScript Console and evaluate it to display the saved names and passwords - dickvl@kb.mozillazine.org
*/
 
(function(){
function tdigs(str) {return (str.length < 2) ? "0" + str : str;}
function fdigs(num){return (num < 1000) ? num + 2000 : num;}
 
var now = new Date();
var hrs = tdigs(now.getHours() + "") ;
var mins = tdigs(now.getMinutes() + "") ;
var secs = tdigs(now.getSeconds() + "") ;


var tValue = " | At  " + hrs + ":" + mins + ":" + secs;
For more information about the TabVisited extension please visit: [[User:Dickvl/TabVisited]]
var days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var mons = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();


var today = "On " + days[now.getDay()] + ", " + date + " " + mons[now.getMonth()] + " " +    (fdigs(now.getYear())) + tValue ;
In Firefox 9+ versions you will have an ''unread'' attribute that you can use to style tabs that haven't been visited during the current session.<br />
See: [https://developer.mozilla.org/en/XUL/tab#a-unread tab - MDN]


var Cc = Components.classes;
Quote:
var Ci = Components.interfaces;
''This attribute is set to true if the tab is unread; that is, either it has not yet been selected during the current session, or has changed since the last time it was selected.''<br />
''This attribute is not present if the tab is not unread.''


netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
<pre>.tabbrowser-tab[unread="true"] .tab-text {}
.tabbrowser-tab:not([unread="true"]) .tab-text {}
.tabbrowser-tab[selected="true"] .tab-text {}


var tokendb = Cc["@mozilla.org/security/pk11tokendb;1"]
/* not busy: background image */
                .createInstance(Ci.nsIPK11TokenDB);
.tabbrowser-tab:not([busy])[unread="true"] {background-image:-moz-linear-gradient(rgba(153,221,6,0.8) 1px,rgba(153,221,6,0.7) 3px,rgba(153,221,6,0.5) 32%),-moz-linear-gradient(-moz-dialog,-moz-dialog)!important}
var token = tokendb.getInternalKeyToken();


try {token.login(true);} catch (e) {}
.tabbrowser-tab:not([busy]):not([unread]) {background-image:-moz-linear-gradient(rgba(255,204,204,0.8) 1px,rgba(255,204,204,0.7) 3px,rgba(255,204,204,0.5) 32%), -moz-linear-gradient(-moz-dialog,-moz-dialog)!important}


if (token.isLoggedIn()) {
.tabbrowser-tab:not([busy])[selected="true"] {background-image:-moz-linear-gradient(rgba(255,255,9,0.8) 1px,rgba(255,255,9,0.6) 3px,rgba(255,255,9,0.4) 32%),-moz-linear-gradient(-moz-dialog,-moz-dialog)!important}
var passwordmanager = Cc["@mozilla.org/login-manager;1"]
                      .getService(Ci.nsILoginManager);
var names="",signons = passwordmanager.getAllLogins({});


for (i=0;i<signons.length;i++) {
/* busy */
  try {
.tabbrowser-tab[busy] {background-image:-moz-linear-gradient(rgba(0,6,204,0.8) 1px, rgba(0,6,204,0.7) 3px, rgba(0,6,204,0.7) 32%),-moz-linear-gradient(-moz-dialog,-moz-dialog)!important}
  var host = signons[i].hostname;
.tabbrowser-tab[busy] .tab-text {color:rgb(255,255,0)!important}
  var realm = signons[i].httpRealm;
  var user = signons[i].username;
  var usrf = signons[i].usernameField;
  var psw = signons[i].password;
  var pswf = signons[i].passwordField;
  var surl = signons[i].formSubmitURL;
  if (user == ""){ user = "<br>"; }
  names+="<tr>\n<td>"+host+"</td>\n<td>"+realm+" </td>\n<td>"+usrf+"</td>\n<td>"+user+"</td>\n<td>"+pswf+"</td>\n<td>"+psw+"</td>\n<td>"+surl+"</td>\n</tr>\n";
  } catch(e) {}
}


void(window.open('data:text/html,
.tabbrowser-tab[busy][selected="true"] {background-image:-moz-linear-gradient(rgba(0,204,255,0.8) 1px,rgba(0,204,255,0.7) 3px,rgba(0,204,255,0.6) 32%),-moz-linear-gradient(-moz-dialog,-moz-dialog)!important}
<html><head>
.tabbrowser-tab[busy][selected="true"] .tab-text {color:rgb(0,0,255)!important}</pre>
<meta http-equiv=content-type" content="text/html; charset=ISO-8859-1">


<title>Exported Mozilla Passwords</title>
See also:
<style type="text/css">
* [https://developer.mozilla.org/en/Firefox/Updating_add-ons_for_Firefox_9#Theme_changes Updating add-ons for Firefox 9 - MDN: Theme_changes]
td {
* [https://bugzilla.mozilla.org/show_bug.cgi?id=487242 bug 487242#c34] - Regression: in userChrome.css no longer possible to distinguish between unvisited tabs, visited tabs, and the selected tab
  font-family: "Trebuchet MS", Arial, Helvetica, Geneva, Verdana, Sans-Serif;
  font-size: 85%;
  padding: 1px 2px 1px 2px;
}
</style>
</head><body style="margin: 1em 3em; background-color: rgb(255, 221, 221);">
<b>MOZILLA PASSWORD INFORMATION</b>
<p>Produced by <i>Pasting Code in the "Tools > Error Console: Code field"</i> (by "ernie" - Andrew Poth - Ed Mullen - adapted by dickvl@kb.mozillazine.org to run in the Error Console)<br>'+today+
'</p><p>
<table style="empty-cells: show; background-color: rgb(221, 255, 221);" border="1" cellspacing="0">
<tbody><tr style="background-color: rgb(204, 204, 255);">
<td>
<b>Host</b>
</td>
<td>
<b>Realm</b>
</td>
<td>
<b>User Field</b>
</td>
<td>
<b>User Name</b>
</td>
<td>
<b>Psw Field</b>
</td>
<td>
<b>Password</b>
</td>
<td>
<b>Submit URL</b>
</td>
</tr>'+names+'</tbody></table>
</p></body></html>',"","menubar=yes,resizable=yes,scrollbars=yes,width=1000,height:600"));
}
})();
</pre>
 
===Private Browsing===
Here is a simple extension that hides and disables the "Tools ->  Start Private Browsing" entry and the "Tools > Clear Recent History" entry in Friefox3.5/6.<br />
The extension will hide the menu entries, but not the line in Tools > Options to start PB mode automatically, so you need to add code to userChrome.css as well (the code also hides the menu entries if the extension is disabled). Of course you can still set the related pref on the about:config page and you can still clear the cache and history via normal means. See also [https://wiki.mozilla.org/Firefox3.1/PrivateBrowsing/SecurityReview]
 
You also need to add code to [[userChrome.css]] below the @namespace line.<br />
See http://kb.mozillazine.org/Editing_configuration#How_to_edit_configuration_files
<pre>#sanitizeSeparator, #privateBrowsingItem, #sanitizeItem {display:none!important;}
#privateBrowsingAutoStart {display:none!important;}
</pre>
 
I use this code to remove menu entries and disable shortcut keys:
<pre> void((E=window.document.getElementById('key_privatebrowsing')).removeAttribute('key'));
void(E.removeAttribute('modifiers'));void(E.removeAttribute('command')); </pre>
You can use the DOM Inspector to find the ID of a menu entry.
 
I use this code on Linux to disable some shortcuts that I want to use in Prefbar or that are otherwise dangerous (Ctr Q to Quit Firefox is too close to Ctrl W).
<pre>void((E=window.document.getElementById('key_closeWindow')).removeAttribute('key'));
void(E.removeAttribute('modifiers'));void(E.removeAttribute('command'));
void((E=window.document.getElementById('key_quitApplication')).removeAttribute('key'));
void(E.removeAttribute('modifiers'));void(E.removeAttribute('command'));
void((E=window.document.getElementById('key_privatebrowsing')).removeAttribute('key'));
void(E.removeAttribute('modifiers'));void(E.removeAttribute('command'));
void((E=window.document.getElementById('key_openDownloads')).removeAttribute('key'));
void(E.removeAttribute('modifiers'));void(E.removeAttribute('command'));
void((E=window.document.getElementById('key_undoCloseWindow')).removeAttribute('key'));
void(E.removeAttribute('modifiers'));void(E.removeAttribute('command'));
void((E=window.document.getElementById('manBookmarkKb')).removeAttribute('key'));
void(E.removeAttribute('modifiers'));void(E.removeAttribute('command'));
</pre>
 
Copy and paste the full DATA code in the location bar and save the file as pbdisable.xpi<br />
You can install the extension via File > Open File or by dragging the file in a Firefox window.
 
<pre>data:application/octet-stream;base64,
UEsDBBQAAAAIAIIoOTz7YFT+VQAAAI8AAAAPABUAY2hyb21lLm1hbmlmZXN0VVQJAAMzGF1LMxhd
S1V4BADoA2QAS87PK0nNK+EsSErJLE5MyknlzEosskrOKMrPTdWHC+oBBRX1kyFq9Xm5eLnyy1KL
chIrOSEqrfT1k4ryy4tTi+CKoHy9itIchCK4gXBlCCuACnm5AFBLAwQUAAAACAB3MTk8a5K3anwB
AAAFAwAACwAVAGluc3RhbGwucmRmVVQJAAMSKF1LEihdS1V4BADoA2QAbZLLboMwEEXXqZR/cOmu
kjEB+gAR+lCVVRdVpHbvwJBYxTayTZO26r+XODghUXbm3nPHM2Oyhw2v0RcozaSYehM/8B7y8cX4
Ipu/zFDnCT31VsY0KSHr9dpfR75USzJJkoQEIQlDrMoK629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8aepzxQnZ0yOnVW+589jvSPBVTrudM/a3
nfY/sGlZ24V2yd9sV3PWFv3KfXm829FSaNaH+PtyCM/76lrafAoSdTsK5Hkx4orZitIcsO+NFGO9
GRURvu/tP5jHZMjj8t7jj/MTa847WgofdNV2qEzwXXQj1fzvL7a30+KqP585UTfvcaXUoqqgpxMm
t869d+jnlri14cfDNyRmTrwh3Plpqp2uRfxnh+rkU0+lJPQn9pz21Dg5f7GssUZmqw6Hb1Jc1c5Z
1lpJwQ+zHu7dEBkTMHfmjSZxzbmGfYvlPpV3CJauM/+8wEyBO7TYeSF74MvFFauWML+ek3T5cnjL
zCPr2pROS0d48fAtnW5SXvNIRq6u+v0Xdo117+b/fceT1jbj6ed1dcCUwMgkzowrofMygAAwZBje
NoJYOJI9KyTZh1YwoJiHmbaQzbuL1bwsiHFLsBiHGVvIxt1ixGYcOO5YIXEHMY+VDaSHGQjfA+nn
TCAeAFBLAQIXAxQAAAAIAIIoOTz7YFT+VQAAAI8AAAAPAA0AAAAAAAEAAADtgQAAAABjaHJvbWUu
bWFuaWZlc3RVVAUAAzMYXUtVeAAAUEsBAhcDFAAAAAgAdzE5PGuSt2p8AQAABQMAAAsADQAAAAAA
AQAAAO2BlwAAAGluc3RhbGwucmRmVVQFAAMSKF1LVXgAAFBLAQIXAwoAAAAAAA2ldjsAAAAAAAAA
AAAAAAAHAA0AAAAAAAAAEADtQVECAABjaHJvbWUvVVQFAAOpkwlLVXgAAFBLAQIXAxQAAAAIAHot
OTyQFhPm/AIAAOwDAAAUAA0AAAAAAAAAAACkgYsCAABjaHJvbWUvcGJkaXNhYmxlLmphclVUBQAD
hyFdS1V4AABQSwUGAAAAAAQABAAhAQAAzgUAAAAA
</pre>
You can move the extensions folder (pbdisable@mozillazine.org) from the [[Profile_folder_-_Firefox|Profile Folder]] to the ''%AppData%\Mozilla\extensions\{ec8030f7-c20a-464f-9b0e-13a3a9e97384}'' folder to make the extension work in all Firefox profiles.

Latest revision as of 14:38, 2 July 2013

Bookmarklets

Bookmarklets can be found here: User:Dickvl/Bookmarklets
See also Wikipedia: Bookmarklet

Navigator Object

Here is a bookmarklet to display the content of the Navigator object (plugins, mimeTypes)

javascript:/* dickvl@kb.mozillazine.org */
(function(){
var b='<br>',i,L,O,p,pN,pT=('Navigator properties:').bold()+b+b,oT=('Navigator objects:').bold()+b+b,fT=('Navigator functions:').bold()+b+b;
for(pN in navigator){
if(typeof navigator[pN]=='object'){
O=navigator[pN];L=(O.length)?O.length:0;oT+=(pN+': ').bold()+L.toString().bold()+b;
for(i=0;i<L;i++){M=O[i];oT+=('['+(i+1)+'] ').bold();
for(p in M){if(typeof M[p]!='function'&&typeof M[p]!='object'&&p!='length'){oT+=(p+': ').bold()+M[p]+(' | ').bold()}}
if(M.enabledPlugin){oT+=('Plugin: ').bold()+M.enabledPlugin.name}
oT+=b}
oT+=b}
else if(typeof navigator[pN]!='function'){pT+=(pN+': ').bold()+navigator[pN]+b}
else if(typeof navigator[pN]=='function'){if(/Enabled/.test(pN)){fT+=(pN+': ').bold()+navigator[pN]()+b}}}
with(document.open()){write(pT+b+oT+b+fT);close();}
})();

Code

Code for userChrome.css and userContent.css can be found here User:Dickvl/Code

Double Underlined pop-ups

You can add this code to userContent.css to hide some ads and some IntelliTXT type pop-ups (double underlined links) [1].

/* google_ads_frame, yahoo iframe*/
IFRAME[src*='googlesyndication'],
IFRAME[name='google_ads_frame'] {display:none!important}
IFRAME[title='Ads by Yahoo!'] {display:none!important}

/* intelliTXT and others */
#iTt,#adbrite_inline_div,#AdvertBanner,#amzn-popup-div,
#konaLayers,#lwPreview,#menuModule,#tf_AdDiv,#tooltipBox,
#IL_BUBBLE,#IL_FORM_CONT,#snap_com_shot_main
 {display:none!important} 

/* get.lingospot.com */
.lingo_info_box *,.lingo_spot *,.lingo_reset *{display:none!important}

Error Console

The Code examples to run in the "Tools -> Error Console" have been moved to the User:Dickvl/JavaScript_Error_Console page.

Extensions

Private Browsing

Private Browsing disable (pbdisable) is a simple extension to disable the "Tools -> Start Private Browsing" menu entry and the "Tools > Clear Recent History" menu entry in Firefox 3.5/6.
The extension hides these menu entries and also disables their shortcut keys and should prevent Firefox from entering Private Browsing mode. The code doesn't hide "Tools -> Options -> Privacy" to start PB mode automatically and you need to add code to userChrome.css to do that. The code in userChrome.css also hides the menu entries if the extension is disabled or not installed. Current Firefox versions still process code in userChrome.css if started in Safe_mode. It is possible to clear the cache via "Tools -> Options -> Advanced -> Network" and to clear history in the Library and History sidebar. See also [2]

For more information about the Private Browsing disable extension please visit: User:Dickvl/Private_Browsing_disable

Keysdisable

I use this code on Linux to disable some shortcuts that I want to use in Prefbar or that are otherwise dangerous (Ctr+Q to Quit Firefox is too close to Ctrl+W).

if(E=window.document.getElementById('key_closeWindow')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
if(E=window.document.getElementById('key_quitApplication')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
if(E=window.document.getElementById('key_privatebrowsing')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
if(E=window.document.getElementById('key_openDownloads')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
if(E=window.document.getElementById('key_undoCloseWindow')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}
if(E=window.document.getElementById('manBookmarkKb')){E.removeAttribute('key');E.removeAttribute('modifiers');E.removeAttribute('command');}

You can use the DOM Inspector to find the ID of a menu entry if you want to disable other menu entries.
You can modify the file keysdisable.xul in the keysdisable.jar (zip) archive in the keysdisable.xpi (zip) archive to make the changes.

Copy and paste the full DATA code in the location bar and press the Enter key. Save the file as keysdisable.xpi. Updated maxVersion to 6.* (Apr 13, 2011)

data:application/octet-stream;base64,
UEsDBBQAAAAIAIWYPzw1ZoQaSwAAAIIAAAAPABUAY2hyb21lLm1hbmlmZXN0VVQJAAMaxmVLGsZl
S1V4BADoA2QAS87PK0nNK+HMTq0sTsksTkzKSeVMzijKz03VT4ZI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AA8fFZUtVeAAAUEsBAhcDFAAAAAgAwqIk
PahmAbmIAQAA4QUAAB4ADQAAAAAAAQAAAO2BywIAAGNocm9tZS9jb250ZW50L2tleXNkaXNhYmxl
Lnh1bFVUBQADTI6CTFV4AABQSwECFwMUAAAACAC3mD88XNW0nYMAAACjAAAAHgANAAAAAAABAAAA
7YGkBAAAY2hyb21lL2NvbnRlbnQva2V5c2Rpc2FibGUuY3NzVVQFAAN5xmVLVXgAAFBLBQYAAAAA
BgAGANkBAAB4BQAAAAA=

Restart Firefox

This extension adds a Restart Firefox item to the File menu and the App menu. It displays that menu entry in the language of the installed locale (&addon.restartNow.label), so should work with all locales. All open tabs and windows should be restored if session restore is working properly.
Copy and paste the full DATA code in the location bar and press the Enter key. Save the file as restarter-1.2-fx.xpi (updated Jul 2, 2013) - works with Firefox 3.0 and later)

data:application/octet-stream;base64,
UEsDBAoAAAAAAMl4OzUAAAAAAAAAAAAAAAAHABUAY2hyb21lL1VUCQADWoUaRVqFGkVVeAQAPjP/
/1BLAwQKAAAAAADJeDs1AAAAAAAAAAAAAAAADwAVAGNocm9tZS9jb250ZW50L1VUCQADWoUaRVqF
GkVVeAQAPjP//1BLAwQUAAAACAD8COw8ZbXNK8ECAADJBQAAHAAVAGNocm9tZS9jb250ZW50L3Jl
c3RhcnRlci54dWxVVAkAA8xOOkzMTjpMVXgEAOgDZACNVN9P2zAQfkfifzgsMVFpdQbbw6AtjAGT
+jBgtC8IVZObXKnBsT3boXQ//vedk7RNGWzLS5K783fffXe+7tFjruABnZdG99guf8OODjc3ulun
FyfD68szMORTYg43mxsA3a2z82F/eA3bMHZCZ6fDUxhcD4Znn4GlU2dyPEiS0iP1baJMKhRW/zwL
GYPDJyD4GFDHzP5ZpNx8F9b6BdAquvHZAN5ecOqUf2vgZBpREFW2KEhmPebQB+ECOhZP1A8Jov3B
NOSqx6YhWCIym8347C037jbZ3d/fTx6j948za+HEXSolyjP3OM+FpzTJrQh4j2jpM0zRIZeeG63m
/LFQL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ited

In Firefox 3.6 and above it is no longer possible to use the selected attribute to style unvisited and visited tabs with code in userChrome.css. In Firefox 3.6 and above only the selected tab gets a selected="true" attribute. In previous Firefox 3 and 3.5 versions the visited tabs get a selected="false" attribute, but that attribute was removed to fix buggy behavior [3], [4].

For more information about the TabVisited extension please visit: User:Dickvl/TabVisited

In Firefox 9+ versions you will have an unread attribute that you can use to style tabs that haven't been visited during the current session.
See: tab - MDN

Quote: This attribute is set to true if the tab is unread; that is, either it has not yet been selected during the current session, or has changed since the last time it was selected.
This attribute is not present if the tab is not unread.

.tabbrowser-tab[unread="true"] .tab-text {}
.tabbrowser-tab:not([unread="true"]) .tab-text {}
.tabbrowser-tab[selected="true"] .tab-text {}

/* not busy: background image */
.tabbrowser-tab:not([busy])[unread="true"] {background-image:-moz-linear-gradient(rgba(153,221,6,0.8) 1px,rgba(153,221,6,0.7) 3px,rgba(153,221,6,0.5) 32%),-moz-linear-gradient(-moz-dialog,-moz-dialog)!important}

.tabbrowser-tab:not([busy]):not([unread]) {background-image:-moz-linear-gradient(rgba(255,204,204,0.8) 1px,rgba(255,204,204,0.7) 3px,rgba(255,204,204,0.5) 32%), -moz-linear-gradient(-moz-dialog,-moz-dialog)!important}

.tabbrowser-tab:not([busy])[selected="true"] {background-image:-moz-linear-gradient(rgba(255,255,9,0.8) 1px,rgba(255,255,9,0.6) 3px,rgba(255,255,9,0.4) 32%),-moz-linear-gradient(-moz-dialog,-moz-dialog)!important}

/* busy */
.tabbrowser-tab[busy] {background-image:-moz-linear-gradient(rgba(0,6,204,0.8) 1px, rgba(0,6,204,0.7) 3px, rgba(0,6,204,0.7) 32%),-moz-linear-gradient(-moz-dialog,-moz-dialog)!important}
.tabbrowser-tab[busy] .tab-text {color:rgb(255,255,0)!important}

.tabbrowser-tab[busy][selected="true"] {background-image:-moz-linear-gradient(rgba(0,204,255,0.8) 1px,rgba(0,204,255,0.7) 3px,rgba(0,204,255,0.6) 32%),-moz-linear-gradient(-moz-dialog,-moz-dialog)!important}
.tabbrowser-tab[busy][selected="true"] .tab-text {color:rgb(0,0,255)!important}

See also: