зеркало из https://github.com/mozilla/gecko-dev.git
Bug 948889 - Move the inline script in aboutTabCrashed.xhtml into a separate file; r=ttaubert
This commit is contained in:
Родитель
f2c0466119
Коммит
d50b997a29
|
@ -0,0 +1,20 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
function parseQueryString() {
|
||||
let url = document.documentURI;
|
||||
let queryString = url.replace(/^about:tabcrashed?e=tabcrashed/, "");
|
||||
|
||||
let urlMatch = queryString.match(/u=([^&]+)/);
|
||||
let url = urlMatch && urlMatch[1] ? decodeURIComponent(urlMatch[1]) : "";
|
||||
|
||||
let titleMatch = queryString.match(/d=([^&]*)/);
|
||||
title = titleMatch && titleMatch[1] ? decodeURIComponent(titleMatch[1]) : "";
|
||||
|
||||
return [url, title];
|
||||
}
|
||||
|
||||
let [url, title] = parseQueryString();
|
||||
document.title = title;
|
||||
document.getElementById("tryAgain").setAttribute("url", url);
|
|
@ -42,22 +42,5 @@
|
|||
</div>
|
||||
</body>
|
||||
|
||||
<script type="text/javascript;version=1.8"><![CDATA[
|
||||
function parseQueryString() {
|
||||
let url = document.documentURI;
|
||||
let queryString = url.replace(/^about:tabcrashed?e=tabcrashed/, "");
|
||||
|
||||
let urlMatch = queryString.match(/u=([^&]+)/);
|
||||
let url = urlMatch && urlMatch[1] ? decodeURIComponent(urlMatch[1]) : "";
|
||||
|
||||
let titleMatch = queryString.match(/d=([^&]*)/);
|
||||
title = titleMatch && titleMatch[1] ? decodeURIComponent(titleMatch[1]) : "";
|
||||
|
||||
return [url, title];
|
||||
}
|
||||
|
||||
let [url, title] = parseQueryString();
|
||||
document.title = title;
|
||||
document.getElementById("tryAgain").setAttribute("url", url);
|
||||
]]></script>
|
||||
<script type="text/javascript;version=1.8" src="chrome://browser/content/aboutTabCrashed.js"/>
|
||||
</html>
|
||||
|
|
|
@ -56,6 +56,7 @@ browser.jar:
|
|||
content/browser/aboutRobots-icon.png (content/aboutRobots-icon.png)
|
||||
content/browser/aboutRobots-widget-left.png (content/aboutRobots-widget-left.png)
|
||||
content/browser/aboutSocialError.xhtml (content/aboutSocialError.xhtml)
|
||||
content/browser/aboutTabCrashed.js (content/aboutTabCrashed.js)
|
||||
content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml)
|
||||
* content/browser/browser.css (content/browser.css)
|
||||
* content/browser/browser.js (content/browser.js)
|
||||
|
|
Загрузка…
Ссылка в новой задаче