Created
April 28, 2011 20:24
-
-
Save joseanpg/947255 to your computer and use it in GitHub Desktop.
humane.js unnecessary let
This file contains hidden or 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
| /********************************************************************** | |
| Current Version: unnecessary scope | |
| **********************************************************************/ | |
| eventOn('load',function(){ | |
| transitionSupported = (function(style){ //Surplus | |
| var prefixes = ['MozT','WebkitT','OT','msT','KhtmlT','t']; | |
| for(var i = 0, prefix; prefix = prefixes[i]; i++){ | |
| if(prefix+'ransition' in style) return true; | |
| } | |
| return false; | |
| }(doc.body.style)); | |
| humane.setup(); | |
| }); | |
| /********************************************************************** | |
| Fixed | |
| **********************************************************************/ | |
| eventOn('load',function(){ | |
| /*transitionSupported = false; //Optional */ | |
| var prefixes = ['MozT','WebkitT','OT','msT','KhtmlT','t']; | |
| var style = doc.body.style; | |
| for(var i = 0, prefix; prefix = prefixes[i]; i++){ | |
| if(prefix+'ransition' in style) { | |
| transitionSupported = true; | |
| break; | |
| } | |
| } | |
| humane.setup(); | |
| }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment