chocolatey/chocolatey.org — pull request #46 by TomOne (2013-08-19 18:26:38+00:00)
Title: PNG fallback for old browsers that don’t support SVG

This is a pull request for a PNG fallback for old browsers that don’t support SVG (as announced at https://github.com/chocolatey/chocolatey/issues/324)). It’s a little JavaScript code which replaces all package icons in SVG format with their PNG equivalents that must be stored at the same location, for example http://tomone.github.io/icons/seafile.svg >>> http://tomone.github.io/icons/seafile.png.

In addition this makes the inline JavaScript code in the img tags (`onerror=…`) obsolete, because it already includes the fallback to the default package icon if an error occurs. Inline JavaScript event handlers are bad practice anyway.

The `pngfallback.js` script works fine. But I couldn’t figure out how to integrate this in the .cshtml files. It must be integrated at the bottom of the html body on every site which includes package icons.