User:Vildricianus/replace2.js

Hello, you have come here looking for the meaning of the word User:Vildricianus/replace2.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word User:Vildricianus/replace2.js, but we will also tell you about its etymology, its characteristics and you will know how to say User:Vildricianus/replace2.js in singular and plural. Everything you need to know about the word User:Vildricianus/replace2.js you have here. The definition of the word User:Vildricianus/replace2.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofUser:Vildricianus/replace2.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
// <pre><nowiki>

// my on-wiki replacement tool for things that need UTF-8

function textReplace() {
  var oldtext = txt;

  txt = txt.replace(/    /g, "");
  txt = txt.replace(/\n/g, "]]\n");
  txt = txt.replace(/\* /g, "*[[");

  if (txt != oldtext) {
    document.editform.wpSummary.value = "replacement done";
  }
}

function autoFormat() {
  pagetitle = document.getElementById('content').getElementsByTagName('h1').item(0).firstChild.nodeValue;
  if (pagetitle.search(/Editing /) == -1) return;
  pagetitle = pagetitle.replace(/Editing /g, "");
  pageexternal = pagetitle.replace(/\ /g, "_");

  if (pagetitle.search(/\:/) != -1) {
    return;
  }

  txt = " " + document.editform.wpTextbox1.value;
  txt = txt.substr (1, txt.length-1);
  myoldtxt = txt;
  oldtxt = txt;
  if (txt.length < 2) txt = " " + txt;

  textReplace();

  if (txt==" ") txt = "";
  document.editform.wpTextbox1.value = txt;

}

function reformatMyPage() {
   autoFormat();
}

window.myAddOnload=function(f) {
  if (window.addEventListener) window.addEventListener("load", f, false);
  else if (window.attachEvent) window.attachEvent("onload",f);
}

myAddOnload(reformatMyPage);

// </nowiki></pre>