Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpetro committed Apr 12, 2023
1 parent b9c5861 commit 2b8ba29
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1640,19 +1640,17 @@ class SmartConnectionsPlugin extends Obsidian.Plugin {
}
// brand container
if(!this.sc_branding[location]){
this.sc_branding[location] = container.createEl("div", { cls: "sc-brand" });
}else{
this.sc_branding[location].innerHTML = "";
this.sc_branding[location] = container;
}
// if brand container is not HTMLDivElement, delete from this.sc_branding and return
if (!(this.sc_branding[location] instanceof HTMLDivElement)) {
delete this.sc_branding[location];
return;
// if this.sc_branding[location] contains child with class "sc-brand", remove it
if (this.sc_branding[location].querySelector(".sc-brand")) {
this.sc_branding[location].querySelector(".sc-brand").remove();
}
const brand_container = this.sc_branding[location].createEl("div", { cls: "sc-brand" });
// add text
// add SVG signal icon using getIcon
Obsidian.setIcon(this.sc_branding[location], "smart-connections");
const brand_p = this.sc_branding[location].createEl("p");
Obsidian.setIcon(brand_container, "smart-connections");
const brand_p = brand_container.createEl("p");
let text = "Smart Connections";
let attr = {};
// if update available, change text to "Update Available"
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Smart Connections",
"author": "Brian Petro",
"description": "Find links to similar notes using artificial intelligence from OpenAI.",
"version": "1.6.6",
"version": "1.6.7",
"minAppVersion": "1.1.0",
"authorUrl": "https://wfhbrian.com",
"isDesktopOnly": true
Expand Down

0 comments on commit 2b8ba29

Please sign in to comment.