Skip to content

Instantly share code, notes, and snippets.

@MystK
MystK / downloadPdfs.js
Last active March 20, 2023 19:28
Download a Land Rover/Range Rover manual from Topix. Run on a page like: https://topix.jaguar.jlrext.com/topix/content/document/view?id=611070&groupId=1577 Downloads pdfs, assemble using Acrobat or similar.
links = [];
text = [];
function n(num) {
if (num > 99) return num;
if (num > 9) return `0${num}`;
return `00${num}`;
}
async function downloadURI(uri, name) {
await new Promise(res => setTimeout(() => res(), 100));
var link = document.createElement("a");
@MystK
MystK / reddit-delete.js
Created January 4, 2022 16:26
Reddit delete comments - run on old.reddit.com user profile
let editWaitTimeout = 2000;
let deleteWaitTimeout = 2000;
(async () => {
for (let thing of document.querySelectorAll('.thing.comment')) {
const textArea = thing.querySelector('textarea');
if (textArea.innerHTML === '*') {
continue;
}
const editButton = thing.querySelector("a.edit-usertext")