0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2025-01-20 11:22:33 -05:00

fix console errors

This commit is contained in:
Malte Jürgens 2022-01-02 12:13:35 +01:00
parent de99327b43
commit 55966bbd93
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3
2 changed files with 82 additions and 120 deletions

View file

@ -2,23 +2,23 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict"; "use strict";
/* import-globals-from aboutDialog-appUpdater.js */ /* import-globals-from aboutDialog-appUpdater.js */
// Services = object with smart getters for common XPCOM services // Services = object with smart getters for common XPCOM services
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
var { AppConstants } = ChromeUtils.import( var { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm" "resource://gre/modules/AppConstants.jsm"
); );
if (AppConstants.MOZ_UPDATER) { if (AppConstants.MOZ_UPDATER) {
Services.scriptloader.loadSubScript( Services.scriptloader.loadSubScript(
"chrome://browser/content/aboutDialog-appUpdater.js", "chrome://browser/content/aboutDialog-appUpdater.js",
this this
); );
} }
async function init(aEvent) { async function init(aEvent) {
if (aEvent.target != document) { if (aEvent.target != document) {
return; return;
} }
@ -76,42 +76,6 @@
await document.l10n.translateElements([versionField]); await document.l10n.translateElements([versionField]);
// Show a release notes link if we have a URL.
let relNotesLink = document.getElementById("releasenotes");
let relNotesPrefType = Services.prefs.getPrefType(
"app.releaseNotesURL.aboutDialog"
);
if (relNotesPrefType != Services.prefs.PREF_INVALID) {
let relNotesURL = Services.urlFormatter.formatURLPref(
"app.releaseNotesURL.aboutDialog"
);
if (relNotesURL != "about:blank") {
relNotesLink.href = relNotesURL;
relNotesLink.hidden = false;
}
}
if (AppConstants.MOZ_UPDATER) {
gAppUpdater = new appUpdater({ buttonAutoFocus: true });
let channelLabel = document.getElementById("currentChannel");
let currentChannelText = document.getElementById("currentChannelText");
channelLabel.value = UpdateUtils.UpdateChannel;
let hasWinPackageId = false;
try {
hasWinPackageId = Services.sysinfo.getProperty("hasWinPackageId");
} catch (_ex) {
// The hasWinPackageId property doesn't exist; assume it should be false.
}
if (/^release($|\-)/.test(channelLabel.value) || hasWinPackageId) {
currentChannelText.hidden = true;
}
}
if (AppConstants.IS_ESR) {
document.getElementById("release").hidden = false;
}
window.sizeToContent(); window.sizeToContent();
if (AppConstants.platform == "macosx") { if (AppConstants.platform == "macosx") {
@ -120,5 +84,4 @@
screen.availHeight / 5 screen.availHeight / 5
); );
} }
} }

View file

@ -6,7 +6,6 @@
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?> <?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
<window xmlns:html="http://www.w3.org/1999/xhtml" <window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"