MediaWiki:Common.js: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
document.getElementById('linkNorth').addEventListener('click', function() { | document.getElementById('linkNorth')?.addEventListener('click', function() { | ||
window.location.hash = 'North'; | window.location.hash = 'North'; | ||
}); | }); | ||
document.getElementById('linkWest').addEventListener('click', function() { | document.getElementById('linkWest')?.addEventListener('click', function() { | ||
window.location.hash = 'West'; | window.location.hash = 'West'; | ||
}); | }); | ||
document.getElementById('linkEast').addEventListener('click', function() { | document.getElementById('linkEast')?.addEventListener('click', function() { | ||
window.location.hash = 'East'; | window.location.hash = 'East'; | ||
}); | }); | ||
document.getElementById('linkSouth').addEventListener('click', function() { | document.getElementById('linkSouth')?.addEventListener('click', function() { | ||
window.location.hash = 'South'; | window.location.hash = 'South'; | ||
}); | }); | ||
Revision as of 11:01, 17 March 2025
/* Any JavaScript here will be loaded for all users on every page load. */
document.getElementById('linkNorth')?.addEventListener('click', function() {
window.location.hash = 'North';
});
document.getElementById('linkWest')?.addEventListener('click', function() {
window.location.hash = 'West';
});
document.getElementById('linkEast')?.addEventListener('click', function() {
window.location.hash = 'East';
});
document.getElementById('linkSouth')?.addEventListener('click', function() {
window.location.hash = 'South';
});