Add notice about dearrow, make dearrow links not appear if dearrow installed

This commit is contained in:
Ajay
2023-06-21 23:07:09 -04:00
parent d4f668559c
commit b4adee720f
9 changed files with 140 additions and 14 deletions

View File

@@ -17,6 +17,7 @@ import { localizeHtmlPage } from "@ajayyy/maze-utils/lib/setup";
import { StorageChangesObject } from "@ajayyy/maze-utils/lib/config";
import { getHash } from "@ajayyy/maze-utils/lib/hash";
import { isFirefoxOrSafari } from "@ajayyy/maze-utils";
import { isDeArrowInstalled } from "./utils/crossExtension";
const utils = new Utils();
let embed = false;
@@ -70,8 +71,14 @@ async function init() {
// DeArrow promotion
if (Config.config.showNewFeaturePopups && Config.config.showUpsells) {
const deArrowPromotion = document.getElementById("deArrowPromotion");
deArrowPromotion.classList.remove("hidden");
isDeArrowInstalled().then((installed) => {
if (!installed) {
const deArrowPromotion = document.getElementById("deArrowPromotion");
deArrowPromotion.classList.remove("hidden");
deArrowPromotion.addEventListener("click", () => Config.config.showDeArrowPromotion = false);
}
});
}
// Set all of the toggle options to the correct option