Skip to content

Instantly share code, notes, and snippets.

View wooningeire's full-sized avatar

wooningeire

View GitHub Profile
const g = Map.prototype.get
// l = [1,2,3,4,5,6,7,8,9,10,11,23];
const l = Array(24).fill().map((_, i) => i);
Map.prototype.get = function (...args) {
const c = g.apply(this, args);
console.log(c);
if (c?.def) {
// c.def.img = "/fruit/watermelon.png";
// c.def.size = {x:778,y:776.8229954614221};
// c.def.score = 300000000;
@wooningeire
wooningeire / bingtr.js
Created May 29, 2023 05:16
(What I believe to be) A failed attempt at making an Ackuna Bad Translator out of Bing Translate (2017-09-23)
var ilangs = [...document.querySelectorAll( ".sourceText .LanguageList td")].slice(1);
var olangs = [...document.querySelectorAll(".destinationText .LanguageList td")];
var itext = document.querySelector("#srcText" );
var otext = document.querySelector("#destText");
var start = document.querySelector(".translateButton");
var swap = document.querySelector(".swapButton");
var langs = ["en","el","pt","af","ht","otq","ar","he","ro","bn","hi","ru","bs-Latn","mww","sm","bg","hu","sr-Cyrl","yue","id","sr-Latn","ca","it","sk","zh-CHS","ja","sl","zh-CHT","sw","es","hr","tlh","sv","cs","tlh-Qaak","ty","da","ko","th","nl","lv","to","lt","tr","et","mg","uk","fj","ms","ur","fil","mt","vi","fi","no","cy","fr","fa","yua","de","pl"];
@wooningeire
wooningeire / notinterested.js
Created May 29, 2023 05:02
Simple script that clicks "Not interested" on every recommendation on the YouTube home page (2021-03-07)
(async function list(elements, i=0, delay=50) {
const x = elements[i];
if (!x) return;
x.click();
await new Promise(resolve => {
setTimeout(resolve, delay);
});
@wooningeire
wooningeire / ultranewjsnotation.js
Created May 29, 2023 04:21
Absolutely incredible math notation parsing feature in JavaScript (from 2018-10-06)
parseInt(`
17 ⎧ ⎢ ___ ⎥ ⎫
⎲ ⎪ ⎢⎹ x̲² ⎥ ⎪
⎳ ⎩ ⎣⎷ x ⎦ ⎭ + 1
x = 1`,
0o44);
// 43
// Verify it: https://www.wolframalpha.com/input?i2d=true&i=Sum%5BFloor%5C%2891%29Sqrt%5BDivide%5BPower%5Bx%2C2%5D%2Cx%5D%5D%5C%2893%29%2C%7Bx%2C1%2C17%7D%5D%2B1
@wooningeire
wooningeire / DiscordGuildMessageCounter.js
Last active November 2, 2017 19:57
Discord.JS self-bot code that fetches the message counts for each user in a guild. (originally written September 7, 2017, revised slightly today)
/**
* @file Defines a function used to count the messages of every user in a Discord guild.
* @author wooningc
* @requires discord.js.org
*/
"use strict";
/**
* @function countMessages
* @param {Guild} guild The guild whose members will be iterated through.