Scriptbar Snippets 🚀
Handy and easy to understand snippets to keep in your browser
Why was this created?

Snippets/ScractchPad is a feature most chromium browser and Firefox provide that allow you and other to save handy snippet right in Chrome. Your snippet can also be run in debug mode. This website provides list of handy and easy to understand snippets to help boost developer productivities e.g save json as file, turn any website into dark mode, add any remote library into page, etc...

Thinking to contribute?
add-jquery-to-page.js

#Basic

Add jquery to current page if it doesn't exist already

all-color.js

#Basic, #intermediate

Print out all colors from computed styles used in elements on the page. Uses styled console.log calls to visualize each color.

console-inject-javascript-library.js

#Intermediate

Injecting remote javascript library into any page

console-run-remote-snippet-given-url.js

#Basic

Run remote javascript snippet given url

console-save-json-as-file.js

#intermediate

Save object as .json file from Chrome Devtool

console-wrap-element.js

#Basic

Expose a method to wrap an html element with inputed element

format-minified-css-on-page.js

#Intermediate

Unminified and pretify a CSS file on page

insert-css.js

#Basic

Insert css into current page DOM

list-all-event-listeners.js

#Basic

List all event listener on page

log-local-storage-key-value-size.js

#Basic

Print out current page localStorage values size

pause-javascript-execution-on-keydown.js

#Basic

Pause javascript execution on keydown. Handy to debug dynamic element

pretty-print-query-string-params.js

#Basic

Pretty print all query string params on page as table

scroll-to-bottom.js

#Basic

Scroll to bottom of page

scroll-to-top.js

#Basic

Scroll to top of page

test-if-page-allow-adding-inline-javascript.js

#Basic

Run script to test if page allow injecting js or running remote script

toggle-design-mode.js

#Basic

Toggle design mode to edit webpage live

turn-website-to-darkmode.js

#Basic

Turn any website into dark mode by adding this css 1liner

view-current-page-cookies.js

#Basic

View current page url cookies

Built with ❤️ by @domnguyen and everyone on the internet 🚀