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 Oglaf.com keyboard shortcuts | |
// @namespace http://tampermonkey.net/ | |
// @version 2025-01-14 | |
// @description Arrow right for next, arrow left for previous | |
// @author https://github.com/Yarillo4/ | |
// @match https://*.oglaf.com/* | |
// @exclude https://*.oglaf.com/archive/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=oglaf.com | |
// @grant none |
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
{ | |
let findDeepestChildren_rec = (pwdElem, acc) => { | |
if (pwdElem.children.length == 0) { | |
// No more children, deepest child | |
acc.push(pwdElem); | |
} | |
for (v of pwdElem.children) { | |
acc = findDeepestChildren_rec(v, acc); | |
} |
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
--[[ | |
fakeperipheral, peripheral mocks github.com/Yarillo4. | |
--]] | |
local newFuncs = {} | |
local oldFuncs = {} | |
local fakeRegistry = {} | |
oldFuncs.wrap = peripheral.wrap | |
oldFuncs.find = peripheral.find |