2024-03-04 22:25:39 -06:00
|
|
|
|
// Most importantly: Write the passed GET error (if any) to the error-header.
|
2024-03-04 21:56:08 -06:00
|
|
|
|
let urlParams = location.toString().split("?error=");
|
|
|
|
|
if (urlParams && urlParams.length > 0) {
|
|
|
|
|
let errorText = unescape(urlParams[urlParams.length - 1]);
|
2024-03-04 22:25:39 -06:00
|
|
|
|
document.getElementById("error").innerText = browser.i18n.getMessage("errorMessage", errorText);
|
2024-03-04 21:56:08 -06:00
|
|
|
|
}
|
|
|
|
|
|
2024-03-04 22:25:39 -06:00
|
|
|
|
|
|
|
|
|
// Write locale-specific translations to the page.
|
2024-03-04 12:58:05 -06:00
|
|
|
|
document.getElementsByTagName("html")[0].setAttribute("lang", browser.i18n.getMessage("@@ui_locale"));
|
|
|
|
|
|
|
|
|
|
document.getElementById("errorPageTitle").innerText = browser.i18n.getMessage("errorPageTitle");
|
|
|
|
|
document.getElementById("errorTitle").innerText = browser.i18n.getMessage("errorTitle");
|
|
|
|
|
document.getElementById("notInstalled").innerText = browser.i18n.getMessage("errorNotInstalled");
|
|
|
|
|
document.getElementById("notInstalledDesc").innerHTML = browser.i18n.getMessage("errorNotInstalledDesc");
|
|
|
|
|
|
|
|
|
|
document.getElementById("installTitle").innerText = browser.i18n.getMessage("repairInstallTitle");
|
|
|
|
|
document.getElementById("installIntro").innerText = browser.i18n.getMessage("repairInstallIntro");
|
|
|
|
|
document.getElementById("installStep1").innerHTML = browser.i18n.getMessage("repairInstallStep1");
|
|
|
|
|
document.getElementById("installStep2").innerHTML = browser.i18n.getMessage("repairInstallStep2");
|
|
|
|
|
document.getElementById("installStep3").innerHTML = browser.i18n.getMessage("repairInstallStep3");
|
|
|
|
|
document.getElementById("installStep4").innerHTML = browser.i18n.getMessage("repairInstallStep4");
|
|
|
|
|
document.getElementById("installStep5").innerText = browser.i18n.getMessage("repairInstallStep5");
|
|
|
|
|
document.getElementById("installTerminalIntro").innerText = browser.i18n.getMessage("repairInstallTerminalIntro");
|
|
|
|
|
|
2024-03-04 22:25:39 -06:00
|
|
|
|
document.getElementById("troubleshootTitle").innerText = browser.i18n.getMessage("troubleshootTitle");
|
|
|
|
|
document.getElementById("troubleshootDesc").innerHTML = browser.i18n.getMessage("troubleshootDesc");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Now, write our repo’s URLs to the links.
|
2024-03-04 12:58:05 -06:00
|
|
|
|
document.getElementById("zip_link").setAttribute("href", "https://hak.xwx.moe/jadedctrl/shellfox/archive/master.zip");
|
2024-03-04 22:25:39 -06:00
|
|
|
|
document.getElementById("tracker_link").setAttribute("href", "https://hak.xwx.moe/jadedctrl/shellfox/issues");
|
|
|
|
|
|
|
|
|
|
|