MediaWiki:Common.js
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: 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.
/* Any JavaScript here will be loaded for all users on every page load. */ if (window.location.href.indexOf('https://dkcspeedruns.com/Leaderboards') > -1) { setTimeout(function() { console.log('test'); var editLinks = document.getElementsByClassName('mw-editsection-visualeditor'); for (var i = 0; i < editLinks.length; i++) { editLinks[i].style.display = 'none'; var newLink = document.createElement('a'); newLink.href = 'https://dkcspeedruns.com/' + editLinks[i].href.substr(51).split('&')[0] + '?veaction=edit'; newLink.innerHTML = 'edit', editLinks[i].parentNode.insertBefore(newLink, editLinks[i]); } }, 1000); } if (window.location.href == 'https://dkcspeedruns.com/Main_Page') { var body, donkey, clickbait, krool, bleak, bleakFrames, idling, throwing, snow, snowball, launch, preloadThrow; body = document.getElementsByTagName('body')[0]; donkey = document.createElement('span'); donkey.className = 'donkey-vine'; document.getElementById('bodyContent').appendChild(donkey); donkeyImg = document.createElement('img'); donkeyImg.src = 'https://lh3.googleusercontent.com/qcXQ6Eev0ihpbLEqjiFIOMxGI8qOlCTBWOACtzC_QA89kKoRJmeEqOf-fdL5A0DCekZHm6eGRvoyOHW9wQrHXKZ3BaWwd1_r14T855ZOog=s0'; donkey.appendChild(donkeyImg); clickbait = document.createElement('img'); clickbait.src = 'https://lh3.googleusercontent.com/eOOIdVO2nbcWBDrOhq_iv-GkaZP5pXlvv84yqaPLwWRsNKZwseqw2XF65v-zu8n7oJfeZBLAyb0aU0hVekSHbfZ8j11XtYFVk4jumnC00w=s0'; clickbait.id = "clickbait"; document.getElementById('bodyContent').insertBefore(clickbait, document.getElementById('bodyContent').firstChild); krool = document.createElement('div'); krool.id = 'krool'; krool.className = 'pop-out'; krool.className += ' paused'; body.appendChild(krool); clickbait.onclick = function() { krool.classList.remove('paused'); } bleak = document.createElement('div'); bleak.id = 'bleak'; body.appendChild(bleak); bleakFrames = document.createElement('div'); bleakFrames.className = 'idling'; bleak.appendChild(bleakFrames); snowball = document.createElement('div'); snowball.id = 'snowball'; body.appendChild(snowball); snowballFrames = document.createElement('div'); snowball.appendChild(snowballFrames); snowing = document.createElement('div'); snowing.id = 'snowing'; body.appendChild(snowing); preloadThrow = document.createElement('img'); preloadThrow.src = 'https://lh3.googleusercontent.com/aafEpqMbKyN7lefvMButXX_7Q-DMnoMXMmYgF-77ddQnvqtI56QuYzeceTbQzkqAv68ICDVNVw7Ewsf6K00ZrXaQiRExMokX9j3GYToLXQ=s0'; preloadThrow.style.opacity = '0'; preloadThrow.style.height = '0'; preloadThrow.id = "preloadThrow"; body.appendChild(preloadThrow); launch = document.createElement('style'); launch.type = 'text/css'; launch.innerHTML = '.launch { transition-duration: 1s; transform: scale(' + (window.innerHeight * 2) / 48 + ', ' + (window.innerHeight * 2) / 48 + '); bottom: ' + (window.innerHeight * 0.9) / 2 + 'px !important; right: ' + (window.innerWidth) / 2 + 'px !important}'; document.getElementsByTagName('head')[0].appendChild(launch); setTimeout(function() { bleak.className = 'up'; setTimeout(function() { bleakFrames.className = 'throwing'; setTimeout(function() { snowballFrames.style.display = 'block'; snowball.className = 'launch'; setTimeout(function() { snowballFrames.style.display = 'none'; }, 600); setTimeout(function() { snowing.className = 'flash'; }, 550); }, 400); setTimeout(function() { bleakFrames.className = 'idling'; setTimeout(function() { bleak.className = 'down'; }, 1500); }, 1000); }, 3000); }, 1500); }