Merge pull request #1190 from th-ch/compact-sidebar-plugin

Add plugin to always use the compact sidebar
This commit is contained in:
th-ch
2023-07-09 19:47:39 +02:00
committed by GitHub
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,10 @@
module.exports = () => {
const compactSidebar = document.querySelector("#mini-guide");
const isCompactSidebarDisabled =
compactSidebar === null ||
window.getComputedStyle(compactSidebar).display === "none";
if (isCompactSidebarDisabled) {
document.querySelector("#button").click();
}
};