SHARE
TWEET

userscript - imgur_embedded_album_direct_links

a guest Oct 21st, 2019 399 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name imgur_embedded_album_direct_links
  3. // @namespace misc_Scripts
  4. // @match https://imgur.com/a/*/embed*
  5. // @grant none
  6. // @run-at document-idle
  7. // ==/UserScript==
  8.  
  9. document.querySelector("#image-link").addEventListener("click", openOrigImage);
  10.  
  11. function openOrigImage()  {
  12.   var origHref=document.querySelector("#image-link").href;
  13.   var newHerf="https://i.imgur.com/"+ origHref.substr(origHref.lastIndexOf("#") + 1) + ".jpg";
  14.   window.open(newHerf,'_blank');
  15.   return false;    
  16.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top