It adds an imgur button that uploads your local file and appends the url inside a img tag.
Brilliant.
I tried to extend it with a clipboard thingy so that I could paste an image (e.g. a screenshot) into the textbox. Unfortunately imgur doesn't like Tor but I'm thinking if I got that far then it might work for someone who's not on Tor. Try at your own risk. Add the following code somewhere inside the main "function":
document.querySelector('textarea').addEventListener('paste', e => {
if (e.clipboardData.files && e.clipboardData.files.length > 0) {
document.getElementById('uploadImage').files = e.clipboardData.files;
document.getElementById('uploadImage').dispatchEvent(new Event('change'));
}
});
Dude.... Works AWESOME in my latest chrome version! I can't thank you enough, only thing better (?)is if there was a way to upload hidden to your [own] imgur account(if even possible ofc), and maybe size options lol..
(Now I'm def asking too much sorry)!
Not sure how imgur API works - what with being unable to use it as per above - but perhaps this line can be changed to use your account:
headers: { authorization: 'Client-ID 09727b421c2303e' },