User:Mr.Z-man/movereverttest.js

The issue of User:Mr.Z-man/movereverttest.js is of great importance today, as it affects a wide spectrum of people and has significant repercussions in various areas of life. In this article, we will explore in depth the different facets of User:Mr.Z-man/movereverttest.js and analyze its impact on society, economy and culture. In addition, we will examine the different approaches and opinions on User:Mr.Z-man/movereverttest.js, with the aim of providing a comprehensive and enriching vision on this topic. Through a detailed and exhaustive analysis, we aim to shed light on User:Mr.Z-man/movereverttest.js and offer new perspectives that invite reflection and debate.
function moverevertclick() {
  for (var i=0; i<document.links.length; i++) {
    if (document.links.href.indexOf('&wpOldTitle') != -1)  {
      f=document.createElement("IFRAME");
      f.src=document.links.href + "&printable=yes&moveclick=true";
      f.style.display = 'none';
      document.body.appendChild(f);
      page = document.links.href.toString().replace(/http:\/\/en\.wikipedia\.org\/w\/index\.php\?title=Special:MovePage\&wpOldTitle=(.*?)\&wpNewTitle=.*/, "$1");
      deleteurl = "http://en.wikipedia.org/w/index.php?title=" + page + "&action=delete&wpReason=pagemove%20vandalism%20cleanup&deleteclick=true";
      g=document.createElement("IFRAME");
      g.src = deleteurl;
      g.style.display = 'none';
      document.body.appendChild(g);
    }
  }
}

function moverevertlink() {
  if (document.getElementsByTagName('h1').innerHTML == "Move log") {
    addPortletLink('p-cactions', 'javascript:moverevertclick()', "revert all", "ca-moverevert", "Revert");
  }
  if (document.URL.indexOf('moveclick=true') != -1) {
    document.getElementById('movepage').submit();
  }
  if (document.URL.indexOf('deleteclick=true') != -1) {
    setTimeout("confirmdelete()", 10000);
  }
}

function confirmdelete() {
  if (document.getElementById('mw-historywarning') == null && document.getElementById('deleteconfirm')) {
    document.getElementById('deleteconfirm').submit();
  } else if (wgArticleId != 0)  { document.location.reload(); }
}
addOnloadHook(moverevertlink);