// ==UserScript== // @name pinnedbookmarklets.uc.js // @description Puts your bookmarklets in the top of the sidebar. // @author Carly Smallbird // @version v1.0 // @include main // @grant none // ==/UserScript== const sidebarBoxes = document.querySelectorAll('.workspace-arrowscrollbox'); // gets all sidebars const bookmarklets = document.getElementById('PlacesToolbarItems').querySelectorAll('toolbarbutton[scheme="javascript"]'); // filters bookmarks toolbar for bookmarklets sidebarBoxes.forEach((box) => { // creates a new box in each sidebar to put the bookmarks in const newVbox = document.createElement('vbox'); newVbox.classList.add('zen-workspace-bookmarklets-section'); bookmarklets.forEach((b) => { newVbox.append(b); }); sidebarBoxes.prepend(newVbox); // adds the bookmarklets });