This file contains 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 { 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>>; | |
/** |
This file contains 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
/** @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/"]'), | |
]); |
This file contains 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 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 |
This file contains 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 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 |
This file contains 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 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> |
This file contains 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 puppeteer = require('puppeteer'); | |
const prettier = require('prettier'); | |
const atob = require('atob'); | |
const btoa = require('btoa'); | |
const scriptUrlPatterns = [ | |
'*' | |
] | |
const requestCache = new Map(); |
This file contains 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
"editor.tokenColorCustomizations": { | |
"textMateRules": [ | |
{ | |
"scope": [ | |
"comment", | |
"comment.block", | |
"comment.block.documentation", | |
"comment.line", | |
"constant", | |
"constant.character", |
This file contains 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 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 |
This file contains 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
// in a new folder be sure to run "npm init -y" and "npm install puppeteer" | |
const puppeteer = require("puppeteer") | |
const fs = require("fs/promises") | |
async function start() { | |
const browser = await puppeteer.launch() | |
const page = await browser.newPage() | |
await page.goto("https://learnwebcode.github.io/practice-requests/") | |
const names = await page.evaluate(() => { |
This file contains 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
// Example Use | |
(function () { | |
function success() { | |
console.log("success: ", this.src); | |
} | |
function failure() { | |
console.log("failure: ", this.src); | |
} |
NewerOlder