Jump to content

User:Avenged Eightfold/general.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/ <pre>
//Helps automate copyediting
//Feel free to use and/or make better
 
function generalmain()
{
  var f = document.editform, t = f.wpTextbox1;
  t.value = t.value.split('{{Mlbretired').join('{{Infobox MLB retired');
  t.value = t.value.split('Horacio Ramirez').join('Horacio Ramírez');
  t.value = t.value.split('[[Horacio Ramirez|Ramirez]]').join('[[Horacio Ramírez|Ramírez]]');
  t.value = t.value.split('{{Infobox MLB Player').join('{{Infobox MLB player');
  t.value = t.value.split('<div class="references-small"><references/></div>').join('{{reflist}}');
  t.value = t.value.split('Eric Gagne').join('Eric Gagné');
  t.value = t.value.split('[[Eric Gagne|Gagne]]').join('[[Eric Gagné|Gagné]]');
  t.value = t.value.split('{{WP:BOSOX/NEWS/HEAD}}').join('{{Wikipedia:WikiProject Boston Red Sox/Newsletter/Header}}');
  t.value = t.value.split('{{refs').join('{{reflist');
  t.value = t.value.split('{{Refs').join('{{reflist');
  t.value = t.value.split('{{Disambiguation}}').join('{{disambig}}');
  t.value = t.value.split('{{disambiguation}}').join('{{disambig}}');
  t.value = t.value.split('{{Dab}}').join('{{disambig}}');
  t.value = t.value.split('{{dab}}').join('{{disambig}}');
  t.value = t.value.split('{{pp-semi-protect}}').join('{{pp-semi-protected}}');
  t.value = t.value.split('{{pp-semi-protect|').join('{{pp-semi-protected|');
  t.value = t.value.split('{{Pp-semi-protect}}').join('{{pp-semi-protected}}');
  t.value = t.value.split('{{Pp-semi-protect|').join('{{pp-semi-protected|');
  t.value = t.value.split('[[Chargers]]').join('[[San Diego Chargers|Chargers]]');
  t.value = t.value.split('collectable').join('collectible'); //Typo
  t.value = t.value.split('Collectable').join('Collectible'); //Typo
  t.value = t.value.split('<references/>').join('{{reflist}}');
  t.value = t.value.split('<references />').join('{{reflist}}');
  t.value = t.value.split('{{Baseball-WikiProject|').join('{{WikiProject Baseball|');
  t.value = t.value.split('{{Baseball-WikiProject}}').join('{{WikiProject Baseball}}');
  t.value = t.value.split('{{talkpage}}').join('{{talkheader}}');
  t.value = t.value.split('{{Talkpage}}').join('{{talkheader}}');
  t.value = t.value.split('Jose Canseco').join('José Canseco');
  t.value = t.value.split('[[Jose Canseco|Canseco]]').join('[[José Canseco|Canseco]]');
  t.value = t.value.split('{{verify}}').join('{{refimprove}}');
  t.value = t.value.split('{{verify|').join('{{refimprove|');
  t.value = t.value.split('{{Verify}}').join('{{refimprove}}');
  t.value = t.value.split('{{Verify|').join('{{refimprove|');
  t.value = t.value.split('Motley Crue').join('Mötley Crüe');
  t.value = t.value.split('closeby').join('close by');
  t.value = t.value.split('welsh').join('Welsh');
  t.value = t.value.split('Cesar Geronimo').join('César Gerónimo');
  t.value = t.value.split('Tony Fernandez').join('Tony Fernández');
  t.value = t.value.split('{{nofootnote|').join('{{nofootnotes|');
  t.value = t.value.split('{{Nofootnote|').join('{{nofootnotes|');
  t.value = t.value.split('{{nofootnote}}').join('{{nofootnotes}}');
  t.value = t.value.split('{{Nofootnote}}').join('{{nofootnotes}}');
  t.value = t.value.split('Manny Ramirez').join('Manny Ramírez');
  t.value = t.value.split('Pedro Martinez').join('Pedro Martínez');
  t.value = t.value.split('Raul Mondesi').join('Raúl Mondesí');
  t.value = t.value.split('Javy Lopez').join('Javy López');
  t.value = t.value.split('Livan Hernandez').join('Liván Hernández');
  t.value = t.value.split('Edgar Martinez').join('Edgar Martínez');
  t.value = t.value.split('Orlando Hernandez').join('Orlando Hernández');
  t.value = t.value.split('Carmelo Martinez').join('Carmelo Martínez');
  t.value = t.value.split('Raul Ibanez').join('Raúl Ibáñez');
  t.value = t.value.split('Ken Griffey Jr.').join('Ken Griffey, Jr.');
  t.value = t.value.split('Felix Hernandez').join('Félix Hernández');
  t.value = t.value.split('Ruben Sierra').join('Rubén Sierra');
  t.value = t.value.split('==See Also==').join('==See also==');
  t.value = t.value.split('==External Links==').join('==External links==');
  document.editform.wpMinoredit.checked = true;
  f.wpSummary.value = "Copyedited.";
}
 
function gentab()
{
  // Only add for pages with the right string somewhere in the title
  if (document.title.indexOf("Editing ") != -1)
    {
      mw.util.addPortletLink('p-cactions', 'javascript:generalmain()', "general");
    }
}
 
$(gentab);
 
// </pre>