- uBlock Origin
- Privacy Badger
- a11y.css
- web developer toolbar
- VisBug
export type FormDataObject = Record< | |
string, | |
FormDataEntryValue | FormDataEntryValue[] | |
>; | |
/** | |
* converts native FormData to obejct while preserving non-unique keys from multi-value fiels like checkboxes or multiselect | |
*/ | |
export function formDataToObject(formData: FormData): FormDataObject { | |
const obj: FormDataObject = {}; | |
new Set(formData.keys()).forEach((key) => { |
// there's no Browser API yet, that allows setting it via JS | |
// https://github.com/whatwg/html/issues/5326 | |
// stick to native behaviour with href="#id" where possible! | |
// apparently best solution for now, use only when there's no other way. | |
// Still hacky and far from perfect. | |
// credit Rich Harris | |
// https://github.com/whatwg/html/issues/5326#issuecomment-1150090942 | |
function getFocusStartPoint() { |
[ | |
{ | |
"date": "2025-11-03", | |
"event": "Concert 1", | |
"location": "Location 1" | |
}, | |
{ | |
"date": "2025-11-04", | |
"event": "Concert 2", | |
"location": "Location 2" |
// usualy we do: | |
const canvas = within(canvasElement); | |
// but some things are rendered outside of .storybook-root, e.g. via portal directly in body. These can be targetet via: | |
const body = within(canvasElement.ownerDocument.body); |
// source: | |
// https://www.youtube.com/watch?v=52vHiczZ3Bc | |
// https://github.com/typed-rocks/typescript/blob/main/one_of.ts | |
type BaseMessage = { id: string, timestamp: number }; | |
type TextMessage = BaseMessage & { text: string; }; | |
type ImgMessage = BaseMessage & { imgPath: string }; | |
type UrlMessage = BaseMessage & { url: string; }; |
/* | |
* I recommend using a more mature solution like https://floating-ui.com/docs/useDismiss for advanced use cases | |
*/ | |
import { useEffect, useCallback, type RefObject } from 'react'; | |
/** | |
* triggers callback on user interaction outside provided element |
// @ts-check | |
const fs = require("fs"); | |
const glob = require("glob"); | |
// Regular expression to match the pattern (number followed by "rem") | |
const searchPattern = /(\d+(\.\d+)?)rem/g; | |
// Function to calculate the replacement value | |
function calculateReplacement(match) { | |
const originalValue = parseFloat(match); |
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>My subscriptions in feedly</title> | |
</head> | |
<body> | |
<outline text="Tech" title="Tech"> | |
<outline type="rss" text="RedMonk Tech Events (uploads) on YouTube" title="RedMonk Tech Events (uploads) on YouTube" xmlUrl="https://www.youtube.com/playlist?list=UUaUtAK8xECTkETCYivJegeQ" htmlUrl="https://www.youtube.com/playlist?list=UUaUtAK8xECTkETCYivJegeQ"/> | |
<outline type="rss" text="Publikationen (Webentwicklung, Webdesign, Barrierefreiheit, Usability) · Jens Oliver Meiert" title="Publikationen (Webentwicklung, Webdesign, Barrierefreiheit, Usability) · Jens Oliver Meiert" xmlUrl="http://meiert.com/de/publications/publications.xml" htmlUrl="https://meiert.com/"/> |
// Add on element with overflow | |
-webkit-mask-image: -webkit-radial-gradient(white, black); |