Mercurial > nightly_tester_tools
comparison chrome/content/browser.js @ 2:472a16863ecc
expanded nightly.jar
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Tue, 02 Dec 2008 20:38:20 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1:93e46514f20d | 2:472a16863ecc |
---|---|
1 var nightlyApp = { | |
2 | |
3 storedTitle: document.documentElement.getAttribute("titlemodifier"), | |
4 | |
5 init: function() | |
6 { | |
7 var brandbundle = document.getElementById("bundle_brand"); | |
8 if (nightly.variables.name==null) | |
9 { | |
10 nightly.variables.name=brandbundle.getString("brandShortName"); | |
11 } | |
12 nightly.variables.brandname=brandbundle.getString("brandFullName"); | |
13 nightly.variables.defaulttitle=nightlyApp.storedTitle; | |
14 document.getElementById("content").addEventListener("DOMTitleChanged",nightlyApp.titleUpdated,false); | |
15 }, | |
16 | |
17 detectLeaks: function(event) | |
18 { | |
19 this.openURL('chrome://nightly/content/leaks/leaks.xul', event); | |
20 }, | |
21 | |
22 openURL: function(url, event) | |
23 { | |
24 openUILink(url, event, false, true); | |
25 }, | |
26 | |
27 titleUpdated: function() | |
28 { | |
29 if (!gBrowser.mTabbedMode) | |
30 { | |
31 gBrowser.updateTitlebar(); | |
32 } | |
33 }, | |
34 | |
35 updateTitlebar: function() | |
36 { | |
37 window.setTimeout("gBrowser.updateTitlebar();", 50); | |
38 }, | |
39 | |
40 setCustomTitle: function(title) | |
41 { | |
42 document.documentElement.setAttribute("titlemodifier",title); | |
43 document.documentElement.setAttribute("titlemenuseparator"," - "); | |
44 nightlyApp.updateTitlebar(); | |
45 }, | |
46 | |
47 setBlankTitle: function() | |
48 { | |
49 document.documentElement.setAttribute("titlemodifier",""); | |
50 document.documentElement.setAttribute("titlemenuseparator",""); | |
51 nightlyApp.updateTitlebar(); | |
52 }, | |
53 | |
54 setStandardTitle: function() | |
55 { | |
56 document.documentElement.setAttribute("titlemodifier",nightlyApp.storedTitle); | |
57 document.documentElement.setAttribute("titlemenuseparator"," - "); | |
58 nightlyApp.updateTitlebar(); | |
59 } | |
60 | |
61 } |