Last active
October 11, 2015 11:58
-
-
Save thomasjbradley/3855802 to your computer and use it in GitHub Desktop.
js: svg to png
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
if (!Modernizr.inlinesvg) { | |
;(function () { | |
var imgs = document.getElementsByTagName('img') | |
, totalImgs = imgs.length | |
, i = 0 | |
for (i = 0; i < totalImgs; i++) { | |
imgs[i].src = imgs[i].src.replace(/svg$/, 'png') | |
} | |
}()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment