// ==UserScript==
// @name 4chan filename randomiser
// @namespace chan4
// @match https://boards.4chan.org/*
// @run-at document-idle
// ==/UserScript==
document.addEventListener("change",e=>{
if(e.target.matches('input[type="file"]')){
const dT = new DataTransfer;
for(const f of e.target.files){
dT.items.add(new File([f], "17"+Math.floor(Math.random() * 1e14).toString().padStart(14, "0")+"."+f.name.split('.').pop(), {type:f.type}));
}
e.target.files = dT.files;
}
}, true);