This browser snippet allows you to download all favicons from a web page into a structured folder using the File System Access API.
It automatically generates smart filenames based on the type of favicon (apple-touch-icon, mask-icon, favicon) and the actual image dimensions.
It also creates a simple example.html referencing all the saved icons with correct rel, sizes, and mask-color attributes.
I used to be a huge Firefox nerd before chrome become mainstream. I loved how it fought for better, cleaner, more bug-free web standards. I believed in the open web — a place where everyone could build, compete, and innovate fairly. Safari impressed me with its speed, efficiency, and privacy focus and macOS integration.
But today? I’m stuck. Stuck in Chrome.
Why? Because Chrome has become the new Internet Explorer. The browser that sets its own rules, forces everyone else to follow, and drags the entire web down its own rabbit hole.
This is for when you are building a library and csp are in the way and require you to use trustedTypes html
var toSafeNode=(h,x=new XMLHttpRequest)=>(x.send(x.open('GET',URL.createObjectURL(new Blob([h])),0)),x.responseXML)var fragment = toSafeNode('<div>hej</div>')// https://github.com/nodejs/undici/issues/2750#issuecomment-2707472553
// undici global symbol are lazy loaded, so we need to trigger it first
try { fetch('data:;base64,') } catch (e) { }
// Get the global agent
const unidiciGlobalDispatcherSymbol = Symbol.for('undici.globalDispatcher.1');
const agent = globalThis[unidiciGlobalDispatcherSymbol]This is a response to https://gist.github.com/joepie91/bca2fda868c1e8b2c2caf76af7dfcad3?permalink_comment_id=4767875#gistcomment-4767875
if you are so sure about using 'import' from common js then send some code samples - maybe it will help someone else.
Sure @cybafelo, i can give you 3 example (from easy to more adv)
i'm going to create a basic hello world example that uses express (cjs) and node-fetch (esm-only)
here is what my package.json looks like:
| /** | |
| * Read a stream into same underlying ArrayBuffer of a fixed size. | |
| * And yield a new Uint8Array view of the same underlying buffer. | |
| * @param {ReadableStreamBYOBReader} reader | |
| * @param {number} chunkSize | |
| */ | |
| async function* blockReader(reader, chunkSize) { | |
| let offset = 0; | |
| let buffer = new ArrayBuffer(chunkSize) | |
| let done, view |
| import { watch } from 'node:fs/promises' | |
| import { Worker } from 'node:worker_threads' | |
| let worker = new Worker('./app.js') | |
| async function reloadOnChange (dir) { | |
| const watcher = watch(dir, { recursive: true }) | |
| for await (const change of watcher) { | |
| if (change.filename.endsWith('.js')) { | |
| worker.terminate() |
| const blob = new Blob(['123']) | |
| const xhr = new XMLHttpRequest() | |
| const url = URL.createObjectURL(blob) | |
| // required if you need to read binary data: | |
| xhr.overrideMimeType('text/plain; charset=x-user-defined') | |
| xhr.open('GET', url, false) | |
| xhr.send() | |
| URL.revokeObjectURL(url) |
- ⎋ (escape):
U+238B - ⇥ (tab):
U+21E5 - ⇪ (caps lock):
U+21EA - ⇧ (shift):
U+21E7 - ⌃ (control):
U+2303 - ⌥ (option):
U+2325 - (Apple):
U+F8FF(in some Apple-provided fonts only) - ⌘ (command):
U+2318
␣ (space):
U+2423