Add obsidian plugin unloading

This commit is contained in:
Idrees Hassan
2025-11-13 17:20:04 -05:00
parent e99a61a4c6
commit 40169dd474
8 changed files with 20 additions and 8 deletions

View File

@@ -165,6 +165,12 @@ module.exports = class MyPlugin extends Plugin {
onload() {
${birbJs}
}
onunload() {
// Remove the birb when the plugin is unloaded
document.getElementById('birb')?.remove();
console.log('Pocket Bird unloaded!');
}
};`
// Create main.js with plugin code