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"); [].slice.call(document.querySelectorAll("[id*=toolbar]"))
if (toolbarRoot && toolbarRoot.nodeName === "UL") processUL(toolbarRoot); .filter(function(toolbar){
toolbarRoot = document.getElementById("toolbar-repo"); return (toolbar && toolbar.nodeName === "UL");
if (toolbarRoot && toolbarRoot.nodeName === "UL") processUL(toolbarRoot); }).forEach(function(toolbar){
// Add more toolbars ? processUL(toolbar);
});
if (items.length === 0) return; if (items.length === 0) return;
items = items.map(function(item) { items = items.map(function(item) {