comparison chrome/content/calendar.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: '',
4
5 init: function()
6 {
7 nightlyApp.storedTitle = document.title;
8 var brandbundle = document.getElementById("bundle_branding");
9 if (nightly.variables.name==null)
10 {
11 nightly.variables.name = brandbundle.getString("brandShortName");
12 }
13 nightly.variables.defaulttitle = nightlyApp.storedTitle;
14 nightly.variables.brandname = brandbundle.getString("brandFullName");
15 },
16
17 openURL: function(url, event)
18 {
19 var uri = Components.classes["@mozilla.org/network/io-service;1"]
20 .getService(Components.interfaces.nsIIOService)
21 .newURI(url, null, null);
22
23 var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
24 .getService(Components.interfaces.nsIExternalProtocolService);
25 protocolSvc.loadUrl(uri);
26 },
27
28 detectLeaks: function(event)
29 {
30 var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
31 .getService(Components.interfaces.nsIWindowMediator);
32 var win = wm.getMostRecentWindow("Nightly:LeakReporter");
33 if (win)
34 win.focus();
35 else
36 window.openDialog("chrome://nightly/content/leaks/leaks.xul", "_blank", "chrome,all,dialog=no");
37 },
38
39 setCustomTitle: function(title)
40 {
41 document.title = title;
42 },
43
44 setBlankTitle: function()
45 {
46 document.title = '';
47 },
48
49 setStandardTitle: function()
50 {
51 document.title = nightlyApp.storedTitle;
52 }
53
54 }