Don't have an account yet? Sign up as a New User
Lost your password?
Enquirer Home Page | Twitter | Back to Improbable Island
// @name ii-quick-upload
// @namespace http://enquirer.improbableisland.com/dokuwiki/doku.php?id=greasemonkey
// @author Full Metal Lion
// @description Adds a file upload dialog below all forms on II that uploads to a third-party file hosting service. This slightly speeds up the process of uploading a picture to a file host and putting the url into banter.
// @version 1
// @match *://*.improbableisland.com/*
// @exclude *://enquirer.improbableisland.com/*
// @icon http://improbableisland.com/favicon.ico
// @grant none
//IF THIS SCRIPT DOESN'T WORK, CHECK THAT THE FILE HOSTING SERVICE USED HERE STILL WORKS
//THESE THINGS WITHER AND DIE LIKE SPRING EPHEMERALS
//ALSO MAKE SURE YOU HAVE POP-UPS ENABLED ON IMPROBABLE ISLAND
// various urls that didn't work for me are recorded here
//var hostURL = "https://uguu.se/api.php?d=upload"; //blocked by my ISP
//var hostURL = "http://s000.tinyupload.com/cgi-bin/upload.cgi?sid=ktqhcreqaocjh2i2gb82n0u190" //not a direct image link
//var hostURL = "https://cockfile.com/api.php?d=upload"; //html, not text
var hostURL = "https://cockfile.com/api.php?d=upload-tool"; //good.
htmlForm='<form action="'+hostURL+'" method="post" enctype="multipart/form-data" target="_blank">'+
'<input type="file" id="file" name="file" onchange="this.form.submit()">'+
var forms = document.querySelectorAll("form");
for(var i=0; i<forms.length; i++)