MediaWiki:Common.js
Jump to navigation
Jump to search
Note: After saving, 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: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
overlay = document.getElementById('overlay'); confirmButtons = Array.from(document.getElementsByClassName('button-confirm')); cancelButtons = Array.from(document.getElementsByClassName('button-cancel')); cursors = Array.from(document.getElementsByClassName('custom-cursor')); goBack = function(){ history.back() }; if(overlay != null){ hideOverlay = function(){ overlay.style.visibility = 'hidden' }; cancelButtons.forEach(function(butt){ butt.addEventListener('click', goBack); }); confirmButtons.forEach(function(butt){ butt.addEventListener('click', hideOverlay ); }); } tools = document.getElementById('p-tb').children[1].children[0]; sideLinks = [ {'name':'Templates', 'url' :'https://dwaia.site/wiki/Category:Templates'}, {'name':'Help expand the lore!', 'url' :'https://dwaia.site/wiki/Help_expand_the_lore!'} ] sideLinks.forEach(function(link){ var li = document.createElement('li'); tools.appendChild(li); var a = document.createElement('a'); li.appendChild(a); a.innerText = link.name; a.href = link.url; }) if(cursors.length > 0){ document.body.style.cursor = 'none'; document.body.onmousemove = function(event){ cursors.forEach(function(cur){ cur.style.left = event.clientX+'px'; cur.style.top = event.clientY+'px'; }) } }