Avoid errors in stock JS

This commit is contained in:
fkloft
2013-10-19 15:14:56 +02:00
parent de621000ce
commit 53874ab887
3 changed files with 17 additions and 1 deletions

View File

@ -602,3 +602,12 @@ window.clampLatLng = function(latlng) {
window.clampLatLngBounds = function(bounds) { window.clampLatLngBounds = function(bounds) {
return new L.LatLngBounds ( clampLatLng(bounds.getSouthWest()), clampLatLng(bounds.getNorthEast()) ); 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"
};
}

View File

@ -100,7 +100,9 @@ document.getElementsByTagName('body')[0].innerHTML = ''
+ ' </div>' + ' </div>'
+ ' </div>' + ' </div>'
+ '</div>' + '</div>'
+ '<div id="updatestatus"><div id="innerstatus"></div></div>'; + '<div id="updatestatus"><div id="innerstatus"></div></div>'
// avoid error by stock JS
+ '<div id="play_button"></div>';
// putting everything in a wrapper function that in turn is placed in a // putting everything in a wrapper function that in turn is placed in a
// script tag on the website allows us to execute in the sites context // script tag on the website allows us to execute in the sites context

View File

@ -969,3 +969,8 @@ td + td {
.portal_details tr.padding-top th, .portal_details tr.padding-top td { .portal_details tr.padding-top th, .portal_details tr.padding-top td {
padding-top: 0.7em; padding-top: 0.7em;
} }
#play_button {
display: none;
}