Skip to content

Commit

Permalink
fix #419
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpetro committed Jan 17, 2024
1 parent af023de commit 9479fac
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected] 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("[email protected]");
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() {
Expand Down

0 comments on commit 9479fac

Please sign in to comment.