You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
981 B
25 lines
981 B
/* |
|
This code waits for the viewer to load with the search panel open, then it closes the search 'companion window' |
|
leaving the search icon visible. This combo is not available in the configs |
|
*/ |
|
window.addEventListener("load", (event) => { |
|
// find elements |
|
const searchPanel = document.querySelector(".mirador31"); |
|
const searchPanelToggle = document.querySelector("button.mirador34"); |
|
const searchPanelIcon = document.querySelector("button.MuiButtonBase-root.MuiTab-root.mirador26 svg"); |
|
// hide the panel |
|
searchPanel.style.display = "none"; |
|
searchPanel.style.transform = "translateX(0px)"; |
|
searchPanel.style.visibility = "hidden"; |
|
|
|
searchPanelToggle.setAttribute("aria-expanded", "false"); |
|
searchPanelToggle.setAttribute("aria-label", "Expand sidebar"); |
|
searchPanelToggle.setAttribute("title", "Expand sidebar"); |
|
|
|
searchPanelIcon.style.fontSize = "2.7em"; |
|
searchPanelIcon.style.marginTop = "21px"; |
|
//fake click |
|
searchPanelToggle.click(); |
|
|
|
|
|
});
|
|
|