Skip to content

Instantly share code, notes, and snippets.

View SukkaW's full-sized avatar
👓
Learning everything...

Sukka SukkaW

👓
Learning everything...
View GitHub Profile
import { useSyncExternalStore, useCallback } from 'react';
import { noop } from 'foxact/noop';
import { useLayoutEffect } from 'foxact/use-isomorphic-layout-effect';
import { noSSRError } from 'foxact/no-ssr';
import { DEFAULT_VALUE, type StoredValues } from '../../storage';
type NotUndefined<T> = T extends undefined ? never : T;
// eslint-disable-next-line @typescript-eslint/naming-convention -- global GM API
declare function GM_addValueChangeListener<T, K extends keyof T>(key: K, cb: (key: K, oldValue: T[K], newValue: T[K], remote: boolean) => void): number;
javascript:(function(){if(location.href.indexOf('http')!=0){input=prompt('URL:','http://');if(input!=null){location.href='http://web.archive.org/web/*/'+input}}else{location.href='http://web.archive.org/web/*/'+location.href;}})();)
'use client';
import { memo, useEffect, useRef, useState } from 'react';
import type { AnimationConfigWithData, AnimationConfigWithPath, AnimationDirection, AnimationEventCallback, AnimationEventName, AnimationItem, AnimationSegment, RendererType } from 'lottie-web';
interface LottieAnimationCallback<T = unknown> {
eventName: AnimationEventName,
callback: AnimationEventCallback<T>
}