]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
added a history compatibility test mediafragment
authorKarim Hamidou <khamidou@gmail.com>
Thu, 17 Nov 2011 10:55:44 +0000 (11:55 +0100)
committerKarim Hamidou <khamidou@gmail.com>
Thu, 17 Nov 2011 10:55:44 +0000 (11:55 +0100)
plugins/mediafragment/popcorn.mediafragment.js

index e84047955fb3e0bfb7e1525d3793cfd533457f87..a1750a5d8c46360bcee8b7cf7a627a8e99dbcbd9 100644 (file)
         }
 
         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 ) );
         };