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