We are actively looking for staff to help us build the wiki. If you are interested please join our Discord server and apply.
MediaWiki:Masterlist.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
document.addEventListener('DOMContentLoaded', () => {
const icons = document.querySelectorAll('.masterlist-icon');
// Load saved state from localStorage
icons.forEach(icon => {
const itemId = icon.closest('.masterlist-item').dataset.id;
const isClicked = localStorage.getItem(`icon-${itemId}`) === 'true';
if (isClicked) {
icon.classList.add('clicked');
}
});
// Add click event listeners to toggle clicked state and save to localStorage
icons.forEach(icon => {
icon.addEventListener('click', () => {
const itemId = icon.closest('.masterlist-item').dataset.id;
icon.classList.toggle('clicked');
localStorage.setItem(`icon-${itemId}`, icon.classList.contains('clicked'));
});
});
});