From: Karim Hamidou Date: Thu, 17 Nov 2011 10:55:44 +0000 (+0100) Subject: added a history compatibility test X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=refs%2Fheads%2Fmediafragment;p=popcorn-js.git added a history compatibility test --- diff --git a/plugins/mediafragment/popcorn.mediafragment.js b/plugins/mediafragment/popcorn.mediafragment.js index e840479..a1750a5 100644 --- a/plugins/mediafragment/popcorn.mediafragment.js +++ b/plugins/mediafragment/popcorn.mediafragment.js @@ -37,6 +37,11 @@ } var updateTime = function() { + var history = window.history; + if ( !history.pushState ) { + return false; + } + splitArr = window.location.href.split( "#" ) history.replaceState( {}, "", splitArr[0] + "#t=" + this.currentTime().toFixed( 2 ) ); };