Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. // ==UserScript==
  2. // @name APOLLO :: Rewrite HTTPS Image Hosts
  3. // @icon https://i.imgur.com/ppMrv8n.png
  4. // @namespace .
  5. // @description Rewrites non-HTTPS hosted images to HTTPS when possible
  6. // @include https://apollo.ch/*
  7. // @include https://tehconnection.eu/*
  8. // @version 1
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13.  
  14. ['i.imgur.com',
  15. 'imgur.com',
  16. 'picload.org',
  17. 'img.photobucket.com',
  18. "'][src*='.photobucket.com/albums/",
  19. 'imageshack.com'].forEach (
  20.  
  21. function( domain ) {
  22.  
  23. document.querySelectorAll ( "img[src^='http://" + domain + "']" ).forEach(
  24.  
  25. function ( el ) { el.src = 'https' + el.src.slice ( 4 ); }
  26.  
  27. );
  28.  
  29. }
  30.  
  31. )
  32.  
  33. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement