From f337a63b64897c4830a7dccc90e25a4a82bfee7f Mon Sep 17 00:00:00 2001 From: Karim Hamidou Date: Thu, 17 Nov 2011 11:55:44 +0100 Subject: [PATCH] added a history compatibility test --- plugins/mediafragment/popcorn.mediafragment.js | 5 +++++ 1 file changed, 5 insertions(+) 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 ) ); }; -- 2.43.0