summaryrefslogtreecommitdiffstats
path: root/content/manager/manageProvider.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 06:29:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 06:29:37 +0000
commit9355e23a909a7801b3ccdf68ee05b3480be42407 (patch)
tree78220623341b88bd42d16929e2acb3e5ef52e0c8 /content/manager/manageProvider.js
parentInitial commit. (diff)
downloadtbsync-9355e23a909a7801b3ccdf68ee05b3480be42407.tar.xz
tbsync-9355e23a909a7801b3ccdf68ee05b3480be42407.zip
Adding upstream version 4.7.upstream/4.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--content/manager/manageProvider.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/content/manager/manageProvider.js b/content/manager/manageProvider.js
new file mode 100644
index 0000000..01b3be5
--- /dev/null
+++ b/content/manager/manageProvider.js
@@ -0,0 +1,40 @@
+/*
+ * This file is part of TbSync.
+ *
+ * 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";
+
+var { TbSync } = ChromeUtils.import("chrome://tbsync/content/tbsync.jsm");
+
+var tbSyncManageProvider = {
+
+ prepInstall: function () {
+ let url = window.location.toString();
+ let provider = url.split("provider=")[1];
+ window.document.getElementById("header").textContent = TbSync.getString("installProvider.header::" + TbSync.providers.defaultProviders[provider].name);
+
+ window.document.getElementById("link").textContent = TbSync.providers.defaultProviders[provider].homepageUrl;
+ window.document.getElementById("link").setAttribute("link", TbSync.providers.defaultProviders[provider].homepageUrl);
+
+ window.document.getElementById("warning").hidden = TbSync.providers.defaultProviders[provider].homepageUrl.startsWith("https://addons.thunderbird.net");
+ },
+
+ prepMissing: function () {
+ let url = window.location.toString();
+ let provider = url.split("provider=")[1];
+
+ let e = window.document.getElementById("missing");
+ let v = e.textContent;
+ e.textContent = v.replace("##provider##", provider.toUpperCase());
+
+ if (TbSync.providers.defaultProviders.hasOwnProperty(provider)) {
+ window.document.getElementById("link").textContent = TbSync.providers.defaultProviders[provider].homepageUrl;
+ window.document.getElementById("link").setAttribute("link", TbSync.providers.defaultProviders[provider].homepageUrl);
+ }
+
+ },
+};