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

Add a few more updates

+5
README.md
···
···
+
# README
+
+
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
+
+
if this is helpful to you, you can tip me at [https://ko-fi.com/veryroundbird](ko-fi)!
+13 -3
pinnedbookmarklets.uc.js
···
-
const sidebarBoxes = document.querySelectorAll('.workspace-arrowscrollbox');
-
const bookmarklets = document.getElementById('PlacesToolbarItems').querySelectorAll('toolbarbutton[scheme="javascript"]');
-
sidebarBoxes.forEach((box) => {
const newVbox = document.createElement('vbox');
newVbox.classList.add('zen-workspace-bookmarklets-section');
bookmarklets.forEach((b) => {
newVbox.append(b);
});
});
···
+
// ==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
});