From 0772ec1731f8a6f3ad9473b47184dffd681eef49 Mon Sep 17 00:00:00 2001 From: Philip Chee Date: Sun, 6 Mar 2016 01:44:38 +0800 Subject: [PATCH] Bug 1252479 - Adding the Developer Dynamically (Bug 1248601) doesn't work in SeaMonkey because it doesn't have a "browser-bottombox" r=ochameau --HG-- extra : rebase_source : 9038cc693f739a2f4bd09ad1e1ee4ce26f588df0 --- devtools/client/shared/developer-toolbar.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/devtools/client/shared/developer-toolbar.js b/devtools/client/shared/developer-toolbar.js index 01ec8e3bb233..0256f18ed643 100644 --- a/devtools/client/shared/developer-toolbar.js +++ b/devtools/client/shared/developer-toolbar.js @@ -299,7 +299,7 @@ DeveloperToolbar.prototype.createToolbar = function() { let close = this._doc.createElement("toolbarbutton"); close.setAttribute("id", "developer-toolbar-closebutton"); - close.setAttribute("class", "devtools-closebutton"); + close.setAttribute("class", "close-icon"); close.setAttribute("oncommand", "DeveloperToolbar.hide();"); close.setAttribute("tooltiptext", "developerToolbarCloseButton.tooltiptext"); @@ -333,10 +333,15 @@ DeveloperToolbar.prototype.createToolbar = function() { toolbar.appendChild(close); } - let bottomBox = this._doc.getElementById("browser-bottombox"); this._element = toolbar; - bottomBox.appendChild(this._element); - + let bottomBox = this._doc.getElementById("browser-bottombox"); + if (bottomBox) { + bottomBox.appendChild(this._element); + } else { // SeaMonkey does not have a "browser-bottombox". + let statusBar = this._doc.getElementById("status-bar"); + if (statusBar) + statusBar.parentNode.insertBefore(this._element, statusBar); + } this._errorCounterButton = toolboxBtn this._errorCounterButton._defaultTooltipText = this._errorCounterButton.getAttribute("tooltiptext");