User:Mr.Z-man/moverevert.js

if (navigator.appName != "Microsoft Internet Explorer") { function moverevertclick { for (var i=0; i<document.links.length; i++) { if (document.links[i].href.indexOf('&wpOldTitle') != -1) { f=document.createElement("IFRAME"); f.src=document.links[i].href + "&printable=yes&click=true"; f.style.display = 'none'; document.body.appendChild(f); } } }

function moverevertlink { if (document.getElementsByTagName('h1')[0].innerHTML == "Move log") { mw.util.addPortletLink('p-cactions', 'javascript:moverevertclick', "revert all", "ca-moverevert", "Revert"); } if (document.URL.indexOf('click=true') != -1) { document.getElementById('movepage').submit; } } $(moverevertlink); }