Skip to content

Instantly share code, notes, and snippets.

Increment will be back soon:tm:

@easrng
easrng / README.md
Last active November 16, 2022 23:01

cssfetch

PropellerAds offers a free CORS-bypassing proxy. Their ad code uses it, and so can you. It's not blocked by adblockers yet, but it should be. Blocked now :)

Usage

Just like fetch, but only with a URL.

Example usage of cssfetch.

A small notepad

Copy this link to the address bar:

data:text/html;charset=utf8,<style>body{max-width:70ch;margin:1rem auto;font-family:sans-serif;line-height:1.5rem}img{max-width:100%}</style><a id=l></a><br><button onclick="document.execCommand('bold')"><b>b</b></button><button onclick="document.execCommand('italic')"><i>i</i></button><button onclick="document.execCommand('underline')"><u>u</u></button><button onclick="document.execCommand('createLink',false,prompt('Link URL'))"><a href="javascript:;">l</a></button><div contenteditable id=b>%3Cdiv%3EA%20little%20notepad.%20Drag%20the%20link%20above%20to%20your%20bookmarks%20bar%20to%20save.%3C%2Fdiv%3E%3Cdiv%3EThere%20are%20%3Cb%3Esome%20%3C%2Fb%3E%3Ci%3Eformatting%20%3C%2Fi%3E%3Cu%3Eoptions%3C%2Fu%3E.%20When%20you%20make%20a%20%3Ca%20href%3D%22https%3A%2F%2Fexample.com%22%3Elink%3C%2Fa%3E%20you%20will%20need%20to%20right%20click%20to%20open%20it%20since%20clicking%20it%20just%20moves%20the%20cursor.%3Cbr%3E%3C%2Fdiv%3E</div><script id=s>const r=()=>{l
@easrng
easrng / tweetnacl.eir
Created December 28, 2021 22:56
tweetnacl as elvm ir (manually assembled cus the compiler segfaults)
.text
randombytes:
mov D, SP
add D, -1
store BP, D
mov SP, D
mov BP, SP
mov SP, BP
load A, SP
add SP, 1
// ==UserScript==
// @name fluffyscratch oneclick test
// @namespace helo
// @match https://fluffyscratch.hampton.pw/auth/getKeys/v2
// @grant none
// @version 1.0
// @author -
// @description it does the thing
// ==/UserScript==
@easrng
easrng / discordColorByID.user.js
Created September 27, 2021 12:32
Makes username colors unique and based on user ID
// ==UserScript==
// @name User Colors
// @namespace https://easrng.us.to/
// @match https://discord.com/*
// @grant none
// @version 1.0
// @author easrng
// @description Makes Discord usernames be colored based on userid, not role.
// @run-at document-end
// @inject-into content
@easrng
easrng / setTheme.js
Created September 14, 2021 18:18
Override CSS prefers-color-scheme
function setTheme(theme) {
Array.from(document.styleSheets).map(e => {
try {
return Array.from(e.cssRules)
} catch (e) {
return []
}
}).flat().map(e => {
if (e.constructor != CSSMediaRule) return;
if (e.originalConditionText) e.conditionText = e.originalConditionText;
async function chromiumVendor(){
let chromium=navigator.userAgent.includes("Chrom")
if(!chromium) return null
if(navigator.userAgent.includes("Edg")) return "microsoft"
if(navigator.brave) return "brave"
let google=await new Promise(cb=>{
let ae=false;
function ov(){
cb(speechSynthesis.getVoices().filter(e=>e.name.includes("Google")).length!=0)
if(ae) speechSynthesis.removeEventListener("voiceschanged", ov)
.brand svg {
display: none !important;
}
.brand::after {content: "Mastodon";background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 575.3666 100.3612"><path d="M405.8645 0v33.0236c-4.5378-5.1171-11.0562-7.6725-19.5525-7.6725-9.2686 0-16.4684 3.219-21.5855 9.6878-5.117 6.4688-7.6725 15.6052-7.6725 27.3841 0 12.0686 2.6629 21.4294 7.973 28.0912 5.4068 6.5654 13.0281 9.847 22.876 9.847 7.724 0 14.2424-2.6628 19.5526-7.973v6.6648H421.51V0zM0 9.405v89.648h16.229V43.7368l23.6008 52.417h9.9884l23.6009-52.417V99.053h16.229V9.405H73.1361L44.9036 69.2293 16.5118 9.405zm237.4762 2.1745V69.512c0 20.0821 9.7375 30.1243 29.2403 30.1243h8.3973V85.0162h-6.8062c-5.117 0-8.883-1.3001-11.2966-3.907-2.4137-2.6068-3.6064-6.7221-3.6064-12.3219V40.5546h17.5194l6.0815-13.913h-23.601V11.5795zM131.4402 25.351c-9.7515 0-18.2514 2.0263-25.4926 6.0814l4.9324 11.8623c6.4687-2.5103 12.6376-3.7655 18.5271-3.7655 5.7929 0 9.998 1.3627 12.6048 4.066 2.606 2.6069 4.0137 6.9915 4.2075 13.1706-4.5378-2.4137-
/*
QuickMenu.js: Make a chromium-style menu. Made for use in bookmarklets
Copyright (C) 2021 easrng
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,