From a444e713e6095882a1682001a10cf79cb1cee885 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 20 Mar 2013 21:27:32 +0100 Subject: [PATCH] Cleanup, less debugging, and also add no-spec url --- raitv.user.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/raitv.user.js b/raitv.user.js index 154a3ca..9ef9d42 100644 --- a/raitv.user.js +++ b/raitv.user.js @@ -14,7 +14,7 @@ if (typeof(unsafeWindow) == 'undefined') unsafeWindow = window; function getURL(name) { var list = document.getElementsByName(name) ; - if (list) { + if (list && list[0]) { return list[0].content; } else { return null; @@ -31,7 +31,7 @@ if (typeof(unsafeWindow) == 'undefined') unsafeWindow = window; function H5video(fmt) { if (urls[fmt]) { - return '' + return '' } else { return ''; } @@ -42,8 +42,7 @@ if (typeof(unsafeWindow) == 'undefined') unsafeWindow = window; sch.innerHTML = ""; - } else { - alert("sCH not found"); } })(); -- 2.32.0.93.g670b81a890