clean up after ourselves when the plugin is disabled
This commit is contained in:
1 parent
dc3c5428e2
commit
2cbc29c4e9
1 file changed
+5
@@ -23,6 +23,11 @@ module.exports = class RibbonOrderLock extends Plugin {
|
||||
});
|
||||
}
|
||||
|
||||
onunload() {
|
||||
this.observer?.disconnect();
|
||||
this.app.workspace.leftRibbon.onChange = this.originalOnChange;
|
||||
}
|
||||
|
||||
observeRibbon() {
|
||||
const ribbon = this.app.workspace.leftRibbon;
|
||||
const containerEl = ribbon.ribbonItemsEl;
|
||||
|
||||
Reference in new issue
Block a user