Skip to content

Instantly share code, notes, and snippets.

View zazaulola's full-sized avatar
🏠
Working from home

zazaulola

🏠
Working from home
View GitHub Profile
@zazaulola
zazaulola / SearchInTheShadows.js
Last active August 14, 2024 01:12 — forked from Spencer-Doak/SearchInTheShadows.js
Recursively find all shadow roots in a page.
/**
* Find all elements with openned ShadowRoots
*
* @param {Node} e - An element that we should search for ShadowRoots within.
* @returns {Array<Element>} Array of Elements that holds ShadowRoot
*/
const findRoots = (e = document.documentElement) =>
[e,...e.querySelectorAll('*')]
.filter(e => e.shadowRoot)
.flatMap(e => [e, ...findRoots(e.shadowRoot)]);
@zazaulola
zazaulola / LICENSE.txt
Last active August 25, 2021 17:20 — forked from diafygi/LICENSE.txt
Base58 Encoder/Decoder - slightly over 140 bytes, but still pretty useful
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE