User Tools

Site Tools


greasemonkey:ii-quick-upload

ii-quick-upload

ii-quick-upload.user.js
// ==UserScript==
// @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
// ==/UserScript==
 
//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()">'+
'</form>'
 
var forms = document.querySelectorAll("form");
for(var i=0; i<forms.length; i++)
{
  forms[i].insertAdjacentHTML('afterend', htmlForm);
}
greasemonkey/ii-quick-upload.txt · Last modified: 2023/11/21 18:04 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki