Created
September 27, 2018 20:21
-
-
Save priyankmaniar/c0301651a3f271593543863f73f0ba4c to your computer and use it in GitHub Desktop.
Javascript change image source to http.
This file contains hidden or 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
| var myVar = setInterval(httpOnlyMaker, 3000); | |
| /** Supply filename only in the imgElement. Full path is not required. | |
| */ | |
| function httpOnlyMaker() { | |
| var imgElement = jQuery("img[src$='LXH_Zinanshan.5ba65047732b8.jpg']"); | |
| if(imgElement.length >= 1){ | |
| imgElement.attr('src', imgElement.attr('src').replace('https', 'http')); | |
| clearInterval(myVar); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment