From: Rick Waldron Date: Wed, 23 Feb 2011 04:30:20 +0000 (-0500) Subject: [#336] Cleanup X-Git-Tag: v0.4~42 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f50b316ccbea75753afc46910c4721a36d6ee55b;p=popcorn-js.git [#336] Cleanup --- diff --git a/popcorn.js b/popcorn.js index 16206a6..7461da7 100644 --- a/popcorn.js +++ b/popcorn.js @@ -680,8 +680,7 @@ // Provides some sugar, but ultimately extends // the definition into Popcorn.p - - var reserved = [ "start", "end"], + var reserved = [ "start", "end" ], plugin = {}, setup; @@ -691,12 +690,12 @@ return this; } - // storing the plugin natives + // Storing the plugin natives options._natives = setup; options._natives.type = name; options._running = false; - // ensure a manifest object + // Ensure a manifest object, an empty object is a sufficient fallback options._natives.manifest = manifest || setup.manifest || {}; // Checks for expected properties @@ -710,7 +709,6 @@ // If a _setup was declared, then call it before // the events commence - if ( "_setup" in setup && typeof setup._setup === "function" ) { // Resolves 239, 241, 242 @@ -719,14 +717,11 @@ ( "manifest" in setup && setup.manifest.options.target ); } - setup._setup.call( this, options ); } - Popcorn.addTrackEvent( this, options ); - // Future support for plugin event definitions // for all of the native events Popcorn.forEach( setup, function ( callback, type ) {