mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 04:58:00 +00:00
Fixing UA.
This commit is contained in:
parent
16e6a1d146
commit
94bbb61e45
@ -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"/>
|
||||
|
@ -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);
|
||||
},
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user