How Can I add Hide Panel button to Bookmark Bar?
-
Yes, I know I can use shortcut or mouse gesture for it.
I just want to add hide panel button to bookmark bar. -
Try this
(function () { function movePanelButton() { function style() { const style = document.createElement('style'); style.innerHTML = ` .button-toolbar.panel-clickoutside-ignore { position: absolute; right: 0; } .bookmark-bar-top .bookmark-bar { padding-right: 28px; } `; document.getElementsByTagName('head')[0].appendChild(style); }; function panel() { let bookmarkBar = document.querySelector(".bookmark-bar-top .bookmark-bar"); let panelToggle = document.querySelector(".button-toolbar.panel-clickoutside-ignore"); bookmarkBar.appendChild(panelToggle); style(); } const panelToggle = document.querySelector(".button-toolbar.panel-clickoutside-ignore"); let main = document.getElementById("main"); let observer = new MutationObserver(function (mutations) { mutations.forEach(function (mutation) { if (mutation.addedNodes.length) { panel(panelToggle); } }); }); observer.observe(main, { childList: true }); panel(panelToggle); } let intervalID = setInterval(() => { const browser = document.getElementById("browser"); if (browser) { clearInterval(intervalID); movePanelButton(); } }, 300); })();
-
@sjudenim Thank you for trying to help.
It placed the settings button in the right corner of the bookmark bar.
-
That's not what I'm getting. I suspect you don't have the
panel toggle
button on any toolbar. Add it to your addressbar and restart the browser -
Oh, It worked
Thank you.