Permalink
Browse files

Issue #31 - titlemodifier workaround for SeaMonkey Debug and QA UI

  • Loading branch information...
1 parent 286bb22 commit 26878644780ace099f6100bc984327fac073c3f4 @xabolcs committed Oct 26, 2012
Showing with 14 additions and 1 deletion.
  1. +14 −1 extension/chrome/content/suite.js
@@ -7,6 +7,7 @@ var nightlyApp = {
repository: ['comm-central','comm-aurora'],
oldUpdateTitlebar: null,
+debugQATitleModifierWorkaround: null,
get defaultTitle() {
var tabbrowser = gBrowser;
@@ -33,6 +34,17 @@ init: function()
tabbrowser.updateTitlebar = nightly.updateTitlebar;
tabbrowser.addEventListener("DOMTitleChanged", nightly.updateTitlebar, false);
+
+ var debugQABundle = document.getElementById("debugQANavigatorBundle");
+ if (debugQABundle) {
+ var titlemodifier = debugQABundle.getFormattedString("titlemodifier",
+ [nightly.variables.name,
+ nightly.variables.appbuildid]);
+
+ if (document.documentElement.getAttribute("titlemodifier") === titlemodifier){
@xabolcs

xabolcs Oct 26, 2012

Owner

nit: titlemodifier){ should have a space between ) and {

+ nightlyApp.debugQATitleModifierWorkaround = nightly.variables.name;
+ }
+ }
}
},
@@ -63,7 +75,8 @@ getWindowTitleForNavigator: function (aBrowser) {
var docTitle;
var docElement = document.documentElement;
var sep = docElement.getAttribute("titlemenuseparator");
- var modifier = docElement.getAttribute("titlemodifier");
+ var modifier = nightlyApp.debugQATitleModifierWorkaround ||
+ docElement.getAttribute("titlemodifier");
if (aBrowser.docShell.contentViewer)
docTitle = aBrowser.contentTitle;

0 comments on commit 2687864

Please sign in to comment.