From 9479fac1d8f61061c74075a1621b6de9b895ccb5 Mon Sep 17 00:00:00 2001 From: WFH Brian Date: Wed, 17 Jan 2024 17:01:22 -0500 Subject: [PATCH] fix #419 --- src/index.js | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/src/index.js b/src/index.js index 2aa068fc..a52372b6 100644 --- a/src/index.js +++ b/src/index.js @@ -191,50 +191,6 @@ class SmartConnectionsPlugin extends Obsidian.Plugin { // register API to global window object (window["SmartSearchApi"] = this.api) && this.register(() => delete window["SmartSearchApi"]); - // if no supporter license key and !settings.best_new_plugin then - if(((typeof this.settings.license_key !== 'string') || this.settings.license_key.length === 0) && !this.settings.best_new_plugin) { - const frag = document.createDocumentFragment(); // document fragment - // prevent default click behavior on frag - frag.addEventListener("click", (event) => { - event.preventDefault(); // prevent default click behavior - event.stopPropagation(); - }); - const message = frag.createEl("p"); // add message - message.setText("Vote Smart Connections for Best New Plugin!"); - // vote for Smart Connections and send a screenshot to brian@smartconnections.app to get early access to V2 - const vote = frag.createEl("button"); - vote.setText("Vote on Discord (click here)"); - vote.addEventListener("click", (event) => { - event.preventDefault(); // prevent default click behavior - event.stopPropagation(); - require("electron").shell.openExternal("https://discord.com/channels/686053708261228577/702717892533157999/1193993954346139729"); - }); - const text = frag.createEl("p"); // add text - text.setText("Show your support by sending a screenshot of your vote to brian@smartconnections.app and get early access to V2.0! Voting requires joinng the Obsidian Discord server, going to the 'Announcements' section and clicking the 'S' to vote. Note: The link above only works if you are already logged in to the Discord server."); - // copy email to clipboard on click - text.addEventListener("click", (event) => { - event.preventDefault(); // prevent default click behavior - event.stopPropagation(); - navigator.clipboard.writeText("brian@smartconnections.app"); - new Obsidian.Notice("Copied email to clipboard"); - }); - // join the discord server button - const discord = frag.createEl("button"); - discord.setText("Join Discord Server"); - discord.addEventListener("click", (event) => { - event.preventDefault(); // prevent default click behavior - event.stopPropagation(); - require("electron").shell.openExternal("https://discord.gg/obsidianmd"); - }); - const hide = frag.createEl("button"); // hide this for good - hide.setText("Delete this message"); - hide.addEventListener("click", (event) => { - this.settings.best_new_plugin = true; - this.saveSettings(); - }); - new Obsidian.Notice(frag, 0); - } - } async init_vecs() {