Skip to content

Instantly share code, notes, and snippets.

@xulapp
Created March 31, 2010 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xulapp/350113 to your computer and use it in GitHub Desktop.
Save xulapp/350113 to your computer and use it in GitHub Desktop.
showFxVersionInTitlebar.uc.js
// ==UserScript==
// @name showFxVersionInTitlebar.uc.js
// @description the version number is displayed behind "Mozilla Firefox".
// @include main
// @compatibility Firefox 3.5+
// @namespace http://twitter.com/xulapp
// @author xulapp
// @license MIT License
// @version 2010/03/31 18:00 +09:00
// ==/UserScript==
(function showFxVersionInTitlebar() {
var {documentElement} = document;
var version = Cc['@mozilla.org/xre/app-info;1'].getService(Ci.nsIXULAppInfo).version;
for each (let name in [
'title_normal',
'title_privatebrowsing',
'titlemodifier',
'titlemodifier_normal',
'titlemodifier_privatebrowsing',
]) {
let value = documentElement.getAttribute(name);
value && documentElement.setAttribute(
name,
value.replace(/Mozilla Firefox/, '$& ' + version)
);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment