add more toolbars to CommandPalette (#5136)

This commit is contained in:
Christian Günter 2021-11-17 07:52:47 +01:00 committed by GitHub
parent 6d02555f96
commit 9d0e19feb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2326,11 +2326,13 @@ function enumerateToolbarActions() {
}
}
var toolbarRoot = document.getElementById("toolbar-main");
if (toolbarRoot && toolbarRoot.nodeName === "UL") processUL(toolbarRoot);
toolbarRoot = document.getElementById("toolbar-repo");
if (toolbarRoot && toolbarRoot.nodeName === "UL") processUL(toolbarRoot);
// Add more toolbars ?
[].slice.call(document.querySelectorAll("[id*=toolbar]"))
.filter(function(toolbar){
return (toolbar && toolbar.nodeName === "UL");
}).forEach(function(toolbar){
processUL(toolbar);
});
if (items.length === 0) return;
items = items.map(function(item) {