Created
April 12, 2017 19:57
-
-
Save ianhampton/75bd0add411b805724527323d74bb8d4 to your computer and use it in GitHub Desktop.
Fix Pistonheads Images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Fix Pistonheads Images | |
// @version 1.0 | |
// @description Fixes insecure images on Pistonheads | |
// @match *://*.pistonheads.com/* | |
// @author Ian Hampton | |
// @copyright 2017 | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
jQuery('img[src*=http\\:\\/\\/]').each(function() { | |
var $img = jQuery(this); | |
var imgsrc = $img.attr('src'); | |
imgsrc = imgsrc.replace("http://", "https://images.weserv.nl/?url="); | |
$img.attr('src',imgsrc); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment