MediaWiki:Mobile.js: Unterschied zwischen den Versionen
Aus FürthWiki
KKeine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung Markierungen: Mobile Bearbeitung Mobile Web-Bearbeitung |
||
Zeile 10: | Zeile 10: | ||
}); | }); | ||
} | } | ||
/* ************************************************* | |||
* Reinitialize leaflet after page load | |||
* Fixes #36 for mobile. | |||
*/ | |||
$( document ).ready(function() { | |||
setTimeout(function() { | |||
window.maps.leafletList.forEach(function(l) { | |||
l.map.invalidateSize(false); | |||
}); | |||
}, 100); | |||
}); |
Version vom 18. September 2017, 20:30 Uhr
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/wiki/serviceworker.js').then(function(registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}, function(err) {
// registration failed :(
console.log('ServiceWorker registration failed: ', err);
});
});
}
/* *************************************************
* Reinitialize leaflet after page load
* Fixes #36 for mobile.
*/
$( document ).ready(function() {
setTimeout(function() {
window.maps.leafletList.forEach(function(l) {
l.map.invalidateSize(false);
});
}, 100);
});