Last active
August 29, 2015 14:24
-
-
Save lukephills/fb73b83bf8a4d6c91ae7 to your computer and use it in GitHub Desktop.
Change all images on local site to point to the remote site
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
function updateImages(localUrl, remoteUrl) { | |
var imgs = document.getElementsByTagName('img') | |
for (i = 0; i<imgs.length; i++) { | |
imgs[i].src = imgs[i].src.replace(localUrl, remoteUrl) | |
} | |
} | |
updateImages('http://www.kollektivgallery.dev', 'http://www.kollektivgallery.com') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment