wrap onChange to see when the ribbon says something moved

This commit is contained in:
bdeshi committed 2025-09-22 00:31:27 +06:00
1 parent aa62f35cbd
commit 4587612495
1 file changed
+6 -1
+6 -1
View File
@@ -4,7 +4,12 @@ module.exports = class RibbonOrderLock extends Plugin {
async onload() {
this.app.workspace.onLayoutReady(() => {
const ribbon = this.app.workspace.leftRibbon;
console.log(ribbon.items.map((item) => item.id));
const original = ribbon.onChange.bind(ribbon);
ribbon.onChange = (save) => {
original(save);
console.log('onChange', save, ribbon.items.map((item) => item.id));
};
});
}
};