1,124
edits
(Created page with "→Any JavaScript here will be loaded for all users on every page load.: →Quick purge function: purgeUri = window.location.href + '?action=purge'; purgeShell = document.createElement('a'); purgeShell.innerHTML='Purge'; purgeShell.setAttribute('href', purgeUri); moreOptions = document.getElementById('p-cactions'); moreOptions = moreOptions.getElementsByClassName('vector-menu-content-list'); newChild = document.createElement('li'); newChild.setAttribute('id', 'ca-pu...") |
|||
Line 2: | Line 2: | ||
/* Quick purge function */ | /* Quick purge function */ | ||
if (mw.config.get('wgCanonicalNamespace') != 'Special') { | |||
purgeUri = window.location.href + '?action=purge'; | purgeUri = window.location.href + '?action=purge'; | ||
purgeShell = document.createElement('a'); | purgeShell = document.createElement('a'); | ||
Line 12: | Line 13: | ||
newChild.appendChild(purgeShell); | newChild.appendChild(purgeShell); | ||
moreOptions[0].appendChild(newChild); | moreOptions[0].appendChild(newChild); | ||
} |