pins your bookmarklets to the sidebar in zen-browser.app

Add a few more updates

+5
README.md
··· 1 + # README 2 + 3 + hi. i really wanted to be able to have my bookmarklets pinned and nothing was letting me do that so i'm taking matters into my own hands 4 + 5 + if this is helpful to you, you can tip me at [https://ko-fi.com/veryroundbird](ko-fi)!
+13 -3
pinnedbookmarklets.uc.js
··· 1 - const sidebarBoxes = document.querySelectorAll('.workspace-arrowscrollbox'); 2 - const bookmarklets = document.getElementById('PlacesToolbarItems').querySelectorAll('toolbarbutton[scheme="javascript"]'); 3 - sidebarBoxes.forEach((box) => { 1 + // ==UserScript== 2 + // @name pinnedbookmarklets.uc.js 3 + // @description Puts your bookmarklets in the top of the sidebar. 4 + // @author Carly Smallbird 5 + // @version v1.0 6 + // @include main 7 + // @grant none 8 + // ==/UserScript== 9 + 10 + const sidebarBoxes = document.querySelectorAll('.workspace-arrowscrollbox'); // gets all sidebars 11 + const bookmarklets = document.getElementById('PlacesToolbarItems').querySelectorAll('toolbarbutton[scheme="javascript"]'); // filters bookmarks toolbar for bookmarklets 12 + sidebarBoxes.forEach((box) => { // creates a new box in each sidebar to put the bookmarks in 4 13 const newVbox = document.createElement('vbox'); 5 14 newVbox.classList.add('zen-workspace-bookmarklets-section'); 6 15 bookmarklets.forEach((b) => { 7 16 newVbox.append(b); 8 17 }); 18 + sidebarBoxes.prepend(newVbox); // adds the bookmarklets 9 19 });