bug 258158 make about: not require javascript to show the version. add

version.dtd in chrome://global/content/ to contain the current mozilla (gecko)
version.
r=bsmedberg sr=neil
This commit is contained in:
cbiesinger%web.de 2004-09-14 20:44:30 +00:00
Родитель 6d283ec3a4
Коммит 8e1b8492ac
3 изменённых файлов: 42 добавлений и 7 удалений

Просмотреть файл

@ -40,6 +40,7 @@ toolkit.jar:
content/global/plugins.html (resources/content/plugins.html)
content/global/fullScreen.js (resources/content/fullScreen.js)
content/global/build.dtd (build.dtd)
* content/global/version.dtd (resources/content/version.dtd)
content/global/MPL-1.1.html (resources/content/MPL-1.1.html)
content/global/NPL-1.1.html (resources/content/NPL-1.1.html)
content/global/bindings/browser.xml (resources/content/bindings/browser.xml)

Просмотреть файл

@ -0,0 +1,37 @@
<!-- ***** 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 the version DTD of Mozilla.
-
- The Initial Developer of the Original Code is
- Christian Biesinger <cbiesinger@web.de>.
- Portions created by the Initial Developer are Copyright (C) 2004
- 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 LGPL or the GPL. 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 ***** -->
#expand <!ENTITY version "__MOZILLA_VERSION__">

Просмотреть файл

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [
<!ENTITY % versionDTD SYSTEM "chrome://global/content/version.dtd" >
<!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
<!ENTITY % regionDTD SYSTEM "chrome://global-region/locale/region.dtd" >
%versionDTD;
%brandDTD;
%regionDTD;
]>
@ -87,15 +89,10 @@ h1 {
<td id="mozver">
<h1>
<a id="mozlink" href="&releaseURL;">&brandShortName; </a>
<a id="mozlink" href="&releaseURL;">&brandShortName; &version;</a>
</h1>
<script type="application/x-javascript">
// using try..catch to handle empty useragents and other cases where the regex fails to apply
try {
document.getElementById("mozver").appendChild(document.createTextNode(navigator.userAgent));
document.getElementById("mozlink").firstChild.appendData(navigator.userAgent.match(/rv:([^;)]+)/)[1]);
}
catch (e) {}
document.getElementById("mozver").appendChild(document.createTextNode(navigator.userAgent));
</script>
</td>