From 93b6f985a9b0227a1150e0ac1c211f219db8cb6b Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 21 Mar 2013 19:36:51 +0100 Subject: [PATCH] Minor fixes after testing in FF Get rid of the unsafeWindow line, it's unnecessary and for some reason causes troubles in some versions of FF and GM, and change the id of the element we're hacking, it prevents scripts running after the UserJS from re-changing its content. --- raitv.user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/raitv.user.js b/raitv.user.js index 9ef9d42..e7766e0 100644 --- a/raitv.user.js +++ b/raitv.user.js @@ -5,11 +5,9 @@ // @include http://rai.tv/* // @include http://www.rai.tv/* // @author Giuseppe "Oblomov" Bilotta -// @version 20130320 +// @version 20130321 // ==/UserScript== -if (typeof(unsafeWindow) == 'undefined') unsafeWindow = window; - (function() { function getURL(name) { @@ -37,8 +35,10 @@ if (typeof(unsafeWindow) == 'undefined') unsafeWindow = window; } } - var sch = unsafeWindow.document.getElementById("silverlightControlHost"); + var sch = document.getElementById("silverlightControlHost"); if (sch) { + // prevent other JS with messing with this element further + sch.id = 'html5videoHost'; sch.innerHTML = "