Fixing UA.

This commit is contained in:
blakeross%telocity.com 2002-09-20 21:56:24 +00:00
parent 16e6a1d146
commit 94bbb61e45
3 changed files with 3 additions and 6 deletions

View File

@ -57,8 +57,6 @@
function onLoad() {
var userAgentField = document.getElementById("userAgent");
userAgentField.value = navigator.userAgent;
var versionField = document.getElementById("version");
versionField.setAttribute("value", navigator.userAgent.match(/rv:([^;)]+)/)[1]);
}
]]>
</script>
@ -68,7 +66,7 @@
<separator class="thin"/>
<hbox>
<label value="&brandShortName;" style="font-weight: bold;"/>
<label id="version"/>
<label value="0.1"/>
</hbox>
<spacer flex="1"/>
<textbox id="userAgent" multiline="true" readonly="true" cols="60"/>

View File

@ -487,7 +487,7 @@ nsContextMenu.prototype = {
throw "not reached";
var docUrl = null; // unused (and play nice for fragments generated via XSLT too)
window.openDialog("chrome://navigator/content/viewPartialSource.xul",
window.openDialog("chrome://browser/content/viewPartialSource.xul",
"_blank", "scrollbars,resizable,chrome,dialog=no",
docUrl, docCharset, reference, context);
},

View File

@ -66,13 +66,12 @@ h1 {
<img src="chrome://browser/content/about.gif" alt="&brandShortName;"/></a>
<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("mozinfo").appendChild(document.createTextNode(navigator.userAgent));
document.getElementById("mozlink").firstChild.appendData(navigator.userAgent.match(/rv:([^;)]+)/)[1]);
}
catch (e) {}
</script>