Index: safari/include.youtube.js |
=================================================================== |
--- a/safari/include.youtube.js |
+++ b/safari/include.youtube.js |
@@ -19,8 +19,6 @@ |
if (document.domain != "www.youtube.com") |
return; |
- var pushStateDisabled = false; |
- |
function rewriteFlashvars(flashvars) |
{ |
var pairs = flashvars.split("&"); |
@@ -69,15 +67,7 @@ |
// player with JavaScript which video and which ads to show next, |
// bypassing our flashvars rewrite code. So we disable |
// history.pushState on pages with YouTube's flash player. |
- if (!pushStateDisabled) |
- { |
- var script = document.createElement("script"); |
- script.type = "application/javascript"; |
- script.textContent = "history.pushState = undefined;"; |
- document.documentElement.appendChild(script); |
- |
- pushStateDisabled = true; |
- } |
+ document.location.href = "javascript:void(history.pushState = undefined);"; |
} |
var deferred = []; |