• Community
    • Community
    • Vivaldi Social
    • Blogs
  • Forum
    • Vivaldi Forum
    • Categories
    • Recent
    • Popular
  • Themes
    • Vivaldi Themes
    • My Themes
    • FAQ
  • Contribute
    • Contribute
    • Volunteer
    • Donate
  • Browser
    • Vivaldi Browser
    • Latest News
    • Snapshots
    • Help
Register Login

Vivaldi

  • Community
  • Themes
  • Contribute
  • Browser

Navigation

    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Desktop
    3. Customizations & Extensions
    4. Modifications
    5. How Can I add Hide Panel button to Bookmark Bar?

    How Can I add Hide Panel button to Bookmark Bar?

    Scheduled Pinned Locked Moved Modifications
    request
    5 Posts 2 Posters 417 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • sydprox
      S
      sydprox
      last edited by

      Yes, I know I can use shortcut or mouse gesture for it.
      I just want to add hide panel button to bookmark bar.

      1 Reply Last reply Reply Quote 1
    • sjudenim
      S
      sjudenim Supporters
      last edited by

      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);
        })();
      

      https://github.com/sjudenim

      sydprox
      S
      1 Reply Last reply
      Reply Quote 3
    • sydprox
      S
      sydprox @sjudenim
      last edited by

      @sjudenim Thank you for trying to help.

      It placed the settings button in the right corner of the bookmark bar.

      sjudenim
      S
      1 Reply Last reply
      Reply Quote 0
    • sjudenim
      S
      sjudenim Supporters @sydprox
      last edited by sjudenim

      @sydprox

      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

      https://github.com/sjudenim

      1 Reply Last reply Reply Quote 1
    • sydprox
      S
      sydprox
      last edited by

      Oh, It worked 🙂

      Thank you.

      1 Reply Last reply Reply Quote 1
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    • 1 / 1
    • First post
      Last post

    Copyright © Vivaldi Technologies™ — All rights reserved. Privacy Policy | Code of conduct | Terms of use | Vivaldi Status