suite/debugQA/content/debugQANavigatorOverlay.xul
author Mark Banner <bugzilla@standard8.plus.com>
Tue, 08 Nov 2011 20:22:54 +0000
changeset 9343 20ddb394e7e8710f84aa26ccdc2fb53bf044efb4
parent 4093 c235554b121d87ead968dc20c5e4d445ed8da0d2
child 12286 84ac3c71109811da751f0ef2d72108075938f094
permissions -rw-r--r--
Added tag BETA_BASE_20111108 for changeset 96f9be89d243 a=betamerge DONTBUILD CLOSED TREE

<?xml version="1.0"?> 

<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is mozilla.org code.
   -
   - The Initial Developer of the Original Code is
   -   Mark Banner <bugzilla@standard8.demon.co.uk>
   - Portions created by the Initial Developer are Copyright (C) 2007
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the GPL or the LGPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->

<overlay id="debugQANavigatorOverlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <script type="application/javascript">
  <![CDATA[
    window.addEventListener("load", debugQABuildIDOnLoad, true);

    // Set the title modifer to include the build id.
    function debugQABuildIDOnLoad() {
      window.removeEventListener("load", debugQABuildIDOnLoad, true);

      var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]
                              .getService(Components.interfaces.nsIXULAppInfo);

      var bundle = document.getElementById("debugQANavigatorBundle");

      var titlemodifier = bundle.getFormattedString("titlemodifier",
                                                    [appInfo.name,
                                                     appInfo.appBuildID]);

      // On mac, with contenttitlesetting="true", the titlemodifier is removed
      // and replaced with a titledefault attribute that holds the value of the
      // titlemodifier attribute. We don't use titledefault, but let's remove
      // it since we're adding back the titlemodifier.
      document.documentElement.removeAttribute("titledefault");

      // Set the new title modifier
      document.documentElement.setAttribute("titlemodifier", titlemodifier);

      // Now set the title of the window
      document.title = titlemodifier;
    }
  ]]>
  </script>

  <stringbundleset id="stringbundleset">
    <stringbundle id="debugQANavigatorBundle"
                  src="chrome://debugQA/locale/debugQANavigatorOverlay.properties"/>
  </stringbundleset>
</overlay>