Skip to content

Instantly share code, notes, and snippets.

View chamlis's full-sized avatar

Olivia Reynolds chamlis

View GitHub Profile
(function(){
let text = document.createElement("textarea");
text.value = "# Netscape HTTP Cookie File\n" + document.cookie.split("; ").map(c => c.split("=")).map(c => [document.domain, "FALSE", "/", "TRUE", "0", c[0], c[1]].join("\t")).join("\n") + "\n";
text.style.position = "absolute";
text.style.zIndex = "9999999";
document.body.prepend(text);
})();
@chamlis
chamlis / itch_bundle_claim.js
Created February 15, 2025 03:45
Script to bulk claim an itch.io bundle (paste in console on bundle page)
[...Array(parseInt(document.querySelector("span.pager_label>a").innerText)).keys()]
.map(i => i + 1)
.reduce((p, i) => p.then(l => fetch(location.origin + location.pathname + "?page=" + i)
.then(x => x.text())
.then(x => [...l, new DOMParser().parseFromString(x, "text/html")]),
)
.then(x => new Promise(f => setTimeout(() => f(x), 2000))),
Promise.resolve([]))
.then(l => l
.flatMap(d => Array.from(d.querySelectorAll("form:has(button[value='claim'])")))
javascript:(function(){
const join_time = Date.now();
function debounce_msg(m){
m.style.visibility = Date.parse(m.querySelector("time").dateTime) < join_time ? "hidden" : "initial";
}
function debounce_msgs(records){
document.querySelectorAll("ol[data-list-id='chat-messages']>li").forEach(debounce_msg);
}
let observer = new MutationObserver(debounce_msgs);
@chamlis
chamlis / communityworld
Last active April 15, 2025 17:53
All the Packages
2bwm-doc=0.3-r2
2bwm=0.3-r2
6tunnel-doc=0.13-r2
6tunnel=0.13-r2
7zip-doc=23.01-r0
7zip=23.01-r0
R-dev=4.4.0-r0
R-doc=4.4.0-r0
R-mathlib=4.4.0-r0
R=4.4.0-r0