Last active
October 9, 2015 12:37
-
-
Save cameroooon/3506348 to your computer and use it in GitHub Desktop.
CoffeeScript SVG to PNG Polyfill
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
# SVG polyfill (requires modernizr - http://modernizr.com) | |
unless Modernizr.svg | |
$('img[src *= ".svg"]').each( -> | |
nurl = $(this).attr('src').replace(/\.svg$/, '.png') | |
$(this).attr src: nurl | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment