From 53874ab8875f4a77a23649680e719f9ffe13a866 Mon Sep 17 00:00:00 2001 From: fkloft Date: Sat, 19 Oct 2013 15:14:56 +0200 Subject: [PATCH] Avoid errors in stock JS --- code/utils_misc.js | 9 +++++++++ main.js | 4 +++- style.css | 5 +++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/code/utils_misc.js b/code/utils_misc.js index a8f2048f..dc55c6b4 100644 --- a/code/utils_misc.js +++ b/code/utils_misc.js @@ -602,3 +602,12 @@ window.clampLatLng = function(latlng) { window.clampLatLngBounds = function(bounds) { return new L.LatLngBounds ( clampLatLng(bounds.getSouthWest()), clampLatLng(bounds.getNorthEast()) ); } + +// avoid error in stock JS +if(goog && goog.style) { + goog.style.showElement = function(a, b) { + if(a && a.style) + a.style.display = b ? "" : "none" + }; +} + diff --git a/main.js b/main.js index 72f96f7e..4e5a6ebf 100644 --- a/main.js +++ b/main.js @@ -100,7 +100,9 @@ document.getElementsByTagName('body')[0].innerHTML = '' + ' ' + ' ' + '' - + '
'; + + '
' + // avoid error by stock JS + + '
'; // putting everything in a wrapper function that in turn is placed in a // script tag on the website allows us to execute in the site’s context diff --git a/style.css b/style.css index 3b886151..d32df69c 100644 --- a/style.css +++ b/style.css @@ -969,3 +969,8 @@ td + td { .portal_details tr.padding-top th, .portal_details tr.padding-top td { padding-top: 0.7em; } + +#play_button { + display: none; +} +