Skip to content

Instantly share code, notes, and snippets.

@JenieX
JenieX / esm-package.md
Created June 17, 2025 04:41 — forked from sindresorhus/esm-package.md
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@JenieX
JenieX / redirect-to-farside.js
Created June 17, 2025 03:33 — forked from examosa/redirect-to-farside.user.js
Redirect to Farside (Userscript)
// ==UserScript==
// @name Redirect to Farside
// @version 1.4
// @description Redirects the configured websites to third-party privacy-respecting front ends.
// @author examosa
// @license AGPLv3-or-later
// @updateUrl https://gist.github.com/examosa/50eb28bc16a006b62b3f43893ab457e7/raw/redirect-to-farside.js
// @match https://www.fandom.com/*
// @match https://*.medium.com/*
// @match https://stackoverflow.com/*
@JenieX
JenieX / useStorage.tsx
Created November 12, 2023 01:38 — forked from JohnBra/useStorage.tsx
Typed React useStorage hook for chrome extensions
import { Dispatch, SetStateAction, useState, useEffect, useCallback, useRef } from 'react';
export type StorageArea = 'sync' | 'local';
// custom hook to set chrome local/sync storage
// should also set a listener on this specific key
type SetValue<T> = Dispatch<SetStateAction<T>>;
/**
@JenieX
JenieX / letterboxd-clear-watched-films.js
Created September 17, 2023 10:48
Letterboxd - clear films in current page from watched list
/** @param {number} milliSeconds */
async function sleep(milliSeconds) {
return new Promise((resolve) => {
setTimeout(resolve, milliSeconds);
});
}
const elements = /** @type {HTMLSpanElement[]} */ ([
...document.querySelectorAll('span[data-action$="/mark-as-not-watched/"]'),
]);
@JenieX
JenieX / safeguard.user.js
Created August 22, 2023 02:47
Userscript: Safeguard — Unbreak the web by preventing sites from blocking default browser behavior such as copy-paste, context menus, text selection, etc.
// ==UserScript==
// @name Safeguard
// @description Unbreak the web by preventing sites from blocking default browser behavior such as copy-paste, context menus, text selection, etc.
// @match <all_urls>
// @run-at document-start
// @version 2023.08.21.1
// @downloadURL https://gist.github.com/msanders/76923c70348086108ca47e7b46ffc97c/raw/safeguard.user.js
// @updateURL https://gist.github.com/msanders/76923c70348086108ca47e7b46ffc97c/raw/safeguard.user.js
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEwAAABMCAMAAADwSaEZAAAARVBMVEVHcEzZOy8AAAAAAADfTz4AAAAAAAAAAAAAAAABAQElFxY0NDNwcG+mpaRSUlLPzs27urnqWkeSkpGuLCRxIhvSLyfDSzsFvPdkAAAACXRSTlMA+eU8+8J0G6R5tfGAAAACbElEQVR4Xu2X25bqMAxD6b1yrr3A/3/qwfFAVsmcJpm+okcoG0l2utrbmb766qupG8dxHp/qpkuccWhxUDuM3Z9Is4BAygYpggDnWl43MEdp412U80arwBtrXDFKrf7NWNdINZZxxe5GADaQvJZwIlL651MAcxlrBhSjvCUkop+vgKHQl2ZUaIf2R98vS3N/atv2QCfGrWXehKWZ9OgX0f2tjXlWaPneBtCTpRi1vMTOogjhEp0POgHeOQvsgonWojZAOeeBKbdgQLhuY8QJbXUO6EpgCrR8qD/QdraWdzYxDOC+Tq0R27/9EXZPYAZtwWYYl1bWpLC1YG0HaKewJ40lnem
@JenieX
JenieX / rarbg-captcha-solver.user.js
Created August 5, 2023 19:41 — forked from Klaster1/rarbg-captcha-solver.user.js
Rarbg automatic captcha solver
// ==UserScript==
// @name Rarbg captcha solver
// @version 1.2
// @grant none
// @match https://*/threat_defence.php?defence=2*
// @require https://unpkg.com/[email protected]/dist/tesseract.min.js
// @run-at document-idle
// @author Klaster_1
// @icon https://rarbgenter.org/favicon.ico
// @downloadURL https://gist.github.com/Klaster1/dd7991d59fc8e6a7ec2544b47a12e4e9/raw/rarbg-captcha-solver.user.js
@JenieX
JenieX / paint-likes.user.js
Created August 5, 2023 19:40 — forked from Klaster1/paint-likes.user.js
Paint likes 🖌️🥰
// ==UserScript==
// @name Paint likes 🖌️🥰
// @description Like comments by pressing Shift while mouse curosor is over or hovering while Shift is down
// @version 1.2
// @grant none
// @match https://news.ycombinator.com/*
// @match https://www.youtube.com/*
// @match https://www.reddit.com/r/*/comments/*
// @match https://old.reddit.com/r/*/comments/*
// @icon data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🖌️</text></svg>
@JenieX
JenieX / intercept.js
Created January 20, 2023 07:38 — forked from jsoverson/intercept.js
Intercept responses with chrome and puppeteer
const puppeteer = require('puppeteer');
const prettier = require('prettier');
const atob = require('atob');
const btoa = require('btoa');
const scriptUrlPatterns = [
'*'
]
const requestCache = new Map();
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"comment.line",
"constant",
"constant.character",
@JenieX
JenieX / generatePassword.js
Created January 13, 2023 02:12 — forked from piyush01123/generatePassword.js
Generate and copy to clipboard strong password - Tampermonkey script
// ==UserScript==
// @name Generate Strong Password
// @namespace http://tampermonkey.net/
// @version 3.1.1
// @description Strong password generator of size 12
// @author Piyush Singh
// @match *://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant unsafeWindow
// @grant GM_setClipboard