hey :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name YouTube Jump Ahead Shortcut | |
| // @namespace https://aht.cx/userscripts/youtube-jump-ahead-shortcut | |
| // @version 1.0 | |
| // @description Keyboard shortcut for the "Jump ahead" button available to YouTube Premium users | |
| // @match https://www.youtube.com/watch* | |
| // @run-at document-end | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const getTypeofValue = (value: any) => typeof value; | |
| export type TypeofReturnType = ReturnType<typeof getTypeofValue>; | |
| // prettier-ignore | |
| export type TypeFromTypeString<TypeString extends TypeofReturnType> = | |
| TypeString extends "string" ? string : | |
| TypeString extends "number" ? number : | |
| TypeString extends "bigint" ? BigInt : | |
| TypeString extends "boolean" ? boolean : | |
| TypeString extends "symbol" ? symbol : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export type UseRasterizedImageUrlParameters = [imageUrl: string, width: number, height?: number]; | |
| export interface UseRasterizedImageUrlCache { | |
| promise: Promise<void>; | |
| inputs: UseRasterizedImageUrlParameters; | |
| error?: unknown; | |
| rasterizedImageUrl?: string; | |
| } | |
| const caches: UseRasterizedImageUrlCache[] = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useCallback, useState } from "react"; | |
| export const useForceUpdate = () => { | |
| const [, dispatch] = useState(Object.create(null)); | |
| return useCallback(() => dispatch(Object.create(null)), [dispatch]); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useEffect, useRef } from 'react' | |
| export interface ScrollEvents<Event extends any> { | |
| scrollStart?: (event: Event) => void | |
| scrollStop?: (event: Event) => void | |
| scroll?: (event: Event) => void | |
| } | |
| export const useScrollEvents = <Event extends any = React.UIEvent>( | |
| scrollEvents: ScrollEvents<Event>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useEffect, useRef } from 'react' | |
| type Callback = () => void | |
| export const useInterval = (callback: Callback, delay: number | null = null) => { | |
| const savedCallback = useRef<Callback>() | |
| useEffect(() => { | |
| savedCallback.current = callback | |
| }, [callback]) |
Epitech's API is located at https://intra.epitech.eu/ and for the most part is any intranet page with the format=json param added.
To access most endpoints a PHPSESSID cookie must be set to an authenticated session. Authentification can be done with an autologin code or via Office 365 oauth.
API endpoints and what they require and do. JSON file of endpoints below the documentation.
NewerOlder