MediaWiki:Mobile.js: Forskelle mellem versioner
Fra AarhusWiki
Diversen (diskussion | bidrag) (Oprettede siden med "→All JavaScript here will be loaded for users of the mobile site: // Debounce function in ES5 syntax function debounce(func, wait) { var timeout; return function() { var context = this, args = arguments; clearTimeout(timeout); timeout = setTimeout(function() { func.apply(context, args); }, wait); }; } // Function to reload the page function reloadPage() { window.location.reload(); } // Set up the resi...") |
Diversen (diskussion | bidrag) No edit summary |
||
| Linje 1: | Linje 1: | ||
/* All JavaScript here will be loaded for users of the mobile site */ | /* All JavaScript here will be loaded for users of the mobile site */ | ||
// Function to reload the page | // Function to reload the page | ||
| Linje 18: | Linje 6: | ||
} | } | ||
// Set up the | // Set up the orientation change event listener | ||
window.addEventListener(' | window.addEventListener('orientationchange', reloadPage); | ||
Nuværende version fra 23. nov. 2023, 13:14
/* All JavaScript here will be loaded for users of the mobile site */
// Function to reload the page
function reloadPage() {
window.location.reload();
}
// Set up the orientation change event listener
window.addEventListener('orientationchange', reloadPage);