Mercurial > nightly_tester_tools
view 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 |
line wrap: on
line source
var nightlyApp = { storedTitle: '', init: function() { nightlyApp.storedTitle = document.title; var brandbundle = document.getElementById("bundle_branding"); if (nightly.variables.name==null) { nightly.variables.name = brandbundle.getString("brandShortName"); } nightly.variables.defaulttitle = nightlyApp.storedTitle; nightly.variables.brandname = brandbundle.getString("brandFullName"); }, openURL: function(url, event) { var uri = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService) .newURI(url, null, null); var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"] .getService(Components.interfaces.nsIExternalProtocolService); protocolSvc.loadUrl(uri); }, detectLeaks: function(event) { var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var win = wm.getMostRecentWindow("Nightly:LeakReporter"); if (win) win.focus(); else window.openDialog("chrome://nightly/content/leaks/leaks.xul", "_blank", "chrome,all,dialog=no"); }, setCustomTitle: function(title) { document.title = title; }, setBlankTitle: function() { document.title = ''; }, setStandardTitle: function() { document.title = nightlyApp.storedTitle; } }