summaryrefslogtreecommitdiffstats
path: root/application/palemoon/modules/AboutHomeUtils.jsm
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-12-14 14:37:24 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-12-14 14:37:24 -0500
commit4e34c57467a8d38d593c6fbb7c0d63c3257e99f0 (patch)
treeff5ee62f90cebe34f23f734669e2c526d783caf0 /application/palemoon/modules/AboutHomeUtils.jsm
parentdacb3da00bd17e69f1a8f1080668808a5f3fe431 (diff)
downloadUXP-4e34c57467a8d38d593c6fbb7c0d63c3257e99f0.tar
UXP-4e34c57467a8d38d593c6fbb7c0d63c3257e99f0.tar.gz
UXP-4e34c57467a8d38d593c6fbb7c0d63c3257e99f0.tar.lz
UXP-4e34c57467a8d38d593c6fbb7c0d63c3257e99f0.tar.xz
UXP-4e34c57467a8d38d593c6fbb7c0d63c3257e99f0.zip
Remove Pale Moon from the Unified XUL Platform repository
Development will proceed at https://github.com/MoonchildProductions/Pale-Moon
Diffstat (limited to 'application/palemoon/modules/AboutHomeUtils.jsm')
-rw-r--r--application/palemoon/modules/AboutHomeUtils.jsm67
1 files changed, 0 insertions, 67 deletions
diff --git a/application/palemoon/modules/AboutHomeUtils.jsm b/application/palemoon/modules/AboutHomeUtils.jsm
deleted file mode 100644
index 72712e1f3..000000000
--- a/application/palemoon/modules/AboutHomeUtils.jsm
+++ /dev/null
@@ -1,67 +0,0 @@
-/* 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/. */
-
-"use strict";
-
-this.EXPORTED_SYMBOLS = [ "AboutHomeUtils" ];
-
-Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm");
-
-this.AboutHomeUtils = {
- /**
- * Returns an object containing the name and searchURL of the original default
- * search engine.
- */
- get defaultSearchEngine() {
- let defaultEngine = Services.search.defaultEngine;
- let submission = defaultEngine.getSubmission("_searchTerms_", null, "homepage");
-
- return Object.freeze({
- name: defaultEngine.name,
- searchURL: submission.uri.spec,
- postDataString: submission.postDataString
- });
- },
-
- /*
- * showKnowYourRights - Determines if the user should be shown the
- * about:rights notification. The notification should *not* be shown if
- * we've already shown the current version, or if the override pref says to
- * never show it. The notification *should* be shown if it's never been seen
- * before, if a newer version is available, or if the override pref says to
- * always show it.
- */
- get showKnowYourRights() {
- // Look for an unconditional override pref. If set, do what it says.
- // (true --> never show, false --> always show)
- try {
- return !Services.prefs.getBoolPref("browser.rights.override");
- } catch (e) { }
- // Ditto, for the legacy EULA pref.
- try {
- return !Services.prefs.getBoolPref("browser.EULA.override");
- } catch (e) { }
-
-#ifndef MC_OFFICIAL
- // Non-official builds shouldn't show the notification.
- return false;
-#endif
-
- // Look to see if the user has seen the current version or not.
- var currentVersion = Services.prefs.getIntPref("browser.rights.version");
- try {
- return !Services.prefs.getBoolPref("browser.rights." + currentVersion + ".shown");
- } catch (e) { }
-
- // Legacy: If the user accepted a EULA, we won't annoy them with the
- // equivalent about:rights page until the version changes.
- try {
- return !Services.prefs.getBoolPref("browser.EULA." + currentVersion + ".accepted");
- } catch (e) { }
-
- // We haven't shown the notification before, so do so now.
- return true;
- }
-};