michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: function parseQueryString() { michael@0: let url = document.documentURI; michael@0: let queryString = url.replace(/^about:tabcrashed?e=tabcrashed/, ""); michael@0: michael@0: let urlMatch = queryString.match(/u=([^&]+)/); michael@0: let url = urlMatch && urlMatch[1] ? decodeURIComponent(urlMatch[1]) : ""; michael@0: michael@0: let titleMatch = queryString.match(/d=([^&]*)/); michael@0: title = titleMatch && titleMatch[1] ? decodeURIComponent(titleMatch[1]) : ""; michael@0: michael@0: return [url, title]; michael@0: } michael@0: michael@0: let [url, title] = parseQueryString(); michael@0: document.title = title; michael@0: document.getElementById("tryAgain").setAttribute("url", url);