Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update to version 1.3.1

  • Loading branch information...
commit 4814fe26c8f89c0db93334d55725df3172cf08cc 1 parent eeed0a5
Todd Motto authored
Showing with 5 additions and 10 deletions.
  1. +1 −0  CHANGELOG.md
  2. +4 −10 js/scripts.js
View
1  CHANGELOG.md
@@ -10,6 +10,7 @@
* Update jQuery to version 1.9.1, Google CDN and CloudFlare CDN
* Update Conditionizr to CDNJS CloudFlare v2.1.1
* Removed mediaqueries.min.js, do we really need older browsers to be responsive, HTML5Shiv (built-in Modernizr) is enough
+* Updated scripts.js to ride off Modernizr.svg feature detect and remove custom script detect
## 1.3.0 (09 February, 2013)
View
14 js/scripts.js
@@ -1,17 +1,11 @@
// DOM Ready
$(function() {
- // SVG custom feature detection and svg to png fallback
+ // SVG fallback
// toddmotto.com/mastering-svg-use-for-a-retina-web-fallbacks-with-png-script#update
- function supportsSVG() {
- return !! document.createElementNS && !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect;
- }
- if (supportsSVG()) {
- document.documentElement.className += ' svg';
- } else {
- document.documentElement.className += ' no-svg';
- var imgs = document.getElementsByTagName('img'),
- dotSVG = /.*\.svg$/;
+ if (!Modernizr.svg) {
+ var imgs = document.getElementsByTagName('img');
+ var dotSVG = /.*\.svg$/;
for (var i = 0; i != imgs.length; ++i) {
if(imgs[i].src.match(dotSVG)) {
imgs[i].src = imgs[i].src.slice(0, -3) + "png";
Please sign in to comment.
Something went wrong with that request. Please try again.