From: Rick Waldron Date: Tue, 6 Sep 2011 20:29:01 +0000 (-0400) Subject: [#700] Style updates X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1255ae559b0bdf74ecfb8e823b303fb4fe9c9752;p=popcorn-js.git [#700] Style updates --- diff --git a/test/popcorn.unit.setup.js b/test/popcorn.unit.setup.js index 32de33d..e69f3db 100644 --- a/test/popcorn.unit.setup.js +++ b/test/popcorn.unit.setup.js @@ -1,12 +1,10 @@ -if ( !window["console"] ) { - jQuery.getScript("https://getfirebug.com/firebug-lite-debug.js"); +if ( !window[ "console" ] ) { + jQuery.getScript( "https://getfirebug.com/firebug-lite-debug.js" ); } - -(function (global) { +(function( global ) { // Store the number of global properties that exist prior to Popcorn API definition - var Setup = { hasRun: false, globalSize: 0, @@ -16,17 +14,17 @@ if ( !window["console"] ) { Setup.getGlobalSize = function() { - var size = 0; + var size = 0, prop; - for( var p in window ) { - if ( p !== "_firebug" ) { + for ( prop in window ) { + if ( prop !== "_firebug" ) { size++; if ( !Setup.hasRun ) { - Setup.globalCache.push( p ); + Setup.globalCache.push( prop ); } else { - if ( Setup.globalCache.indexOf( p ) === -1 ) { - Setup.globalDiff.push( p ); + if ( Setup.globalCache.indexOf( prop ) === -1 ) { + Setup.globalDiff.push( prop ); } } } @@ -47,16 +45,14 @@ if ( !window["console"] ) { return size; }; - Setup.eventset = "loadstart progress suspend emptied stalled play pause " + - "loadedmetadata loadeddata waiting playing canplay canplaythrough " + - "seeking seeked timeupdate ended ratechange durationchange volumechange"; + Setup.eventset = "loadstart progress suspend emptied stalled play pause " + + "loadedmetadata loadeddata waiting playing canplay canplaythrough " + + "seeking seeked timeupdate ended ratechange durationchange volumechange"; Setup.events = Setup.eventset.split(/\s+/g); global.Setup = Setup; -})(window); - - -Setup.getGlobalSize(); +})( window ); +Setup.getGlobalSize(); \ No newline at end of file