From: rwldrn Date: Tue, 14 Dec 2010 18:03:25 +0000 (-0500) Subject: [#217] removePlugin does not remove plugin from prototype X-Git-Tag: v0.2~51 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1b3b16d03bb230a8ce943a2a57504c245c5ed8a3;p=popcorn-js.git [#217] removePlugin does not remove plugin from prototype --- diff --git a/popcorn.js b/popcorn.js index 11adf01..372d512 100644 --- a/popcorn.js +++ b/popcorn.js @@ -175,9 +175,9 @@ // A Few reusable utils, memoized onto Popcorn Popcorn.extend( Popcorn, { - error: function( msg ) { - throw msg; - }, + error: function( msg ) { + throw msg; + }, guid: function() { return +new Date() + Math.floor(Math.random()*11); }, @@ -270,7 +270,7 @@ var byStart = this.data.trackEvents.byStart, byEnd = this.data.trackEvents.byEnd; - this[name] = undef; + delete Popcorn.p[ name ]; // remove plugin reference from registry for ( var i = 0, rl = Popcorn.registry.length; i < rl; i++ ) {