Imgur medium thumbnail -> original size

mysteriously

Beta Tester & Translator
Hello,

Imgur does not seem to provide direct way to copy medium thumbnail -> original size image link after uploading. I would like to replace HTML on double click event by replacing Original Linked BBCode (message boards) link with Medium thumbnail Linked BBCode link and first link to Direct Link (email & IM).

Example: http://pastebin.com/PisFhAeR

This rule: http://pastebin.com/HJuwv71p does it, but it breaks everything. Alternatively you can execute it right from web browser: http://pastebin.com/pVSPCtkZ

I failed to create one which would work only for this one div/class.
Code:
if ((document.getElementById = '[B]target-clippy-bbcode-linked[/B]') && (document.getElementsByClassName = 'share-link'))


If you need an Imgur account or better explanation, just let me know :)

Edit@: I think I just need regex filter to replace html like posted in example link
 
Last edited by a moderator:

avatar

Administrator
Staff member
Administrator
I believe that JS rule is a right choice here.

But you shouldn't use whole body innerHTML as it will break the website's own JS.
Instead you should use that div only:
Code:
var element = document.getElementById('target-clippy-bbcode-linked');
var curInnerHTML = element.innerHTML;
......
......
element.innerHTML = newInnerHTML;
 

mysteriously

Beta Tester & Translator
Ok, thanks. Well I think we got a little bit getting closer. However on the div it does not work, because it should work on 'INPUT.share-link' class inside the 'target-clippy-bbcode-linked' div.
There are 3 more 'INPUT.share-link' class in others divs, but I'm not interested in them
Generally this is really messed up, so for now I try to make rule to get it work in Firefox console.

I'm really bad in programming and similar :( http://pastebin.com/FYijUqNF
HTML looks like this http://pastebin.com/NGn0wckQ
 
Last edited by a moderator:
Top