Jump to content

User:シ/copyeditor.js

From Wikipedia, the free encyclopedia

This is the current revision of this page, as edited by Ladsgroup (talk | contribs) at 06:52, 29 November 2021 (Maintenance: Replacing addPortletLink() with mw.util.addPortletLink() (mw:ResourceLoader/Migration_guide_(users)#addPortletLink)). The present address (URL) is a permanent link to this version.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
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>
/*
//t.replace(<!--In Use By League Of Copyeditors Tag Added by CopyEditor.js by QwerpQwertus - Please remove the tag and comments when it is finished-->{{User:QwerpQwertus/copyeditor/GOCE-BED-INUSE|}}<!--Did some thing go wrong adding this tag? - Please leave a bug report at User:QwerpQwertus/copyeditor! Thanks!-->, "<!--# 1739 #-->");
function initNorm() {
 var article=prompt("Welcome to CopyEditor.js, by QwerpQwertus - Please enter the name of the article you'd like to copyedit.");
 var parsedarticle=escape(article);
 window.location.href="http://en.wikipedia.org/w/index.php?title=" + parsedarticle + "&action=edit&section=0&copyedit=true&act=tag"
};
function initEdit() {
 var contentComponentTwo = document.editform.wpTextbox1.value
 var user = prompt('Your username please');
 var contentComponentOne = "<!--In Use By League Of Copyeditors Tag Added by CopyEditor.js by QwerpQwertus - Please remove the tag and comments when it is finished-->{{User:QwerpQwertus/copyeditor/GOCE-BED-INUSE|" + user + "}}<!--Did some thing go wrong adding this tag? - Please leave a bug report at User:QwerpQwertus/copyeditor! Thanks!-->";
 document.editform.wpSummary.value = "Tagging as being copyedited by the [[WP:GOCE|Guild of Copy Editors]] - using '''[[User:QwerpQwertus/copyeditor|CopyEditor]] by [[User:QwerpQwertus]]";
 document.editform.wpMinoredit.checked = true ;
 var bodyContentId = document.getElementById("bodyContent") //monobook skin
 || document.getElementById("mw_contentholder")   // modern skin
 || document.getElementById ("article");          // classic skin
 bodyContentId.style.display = "none";
 document.editform.wpTextbox1.value =contentComponentOne+content+contentComponentTwo;
 document.editform.submit();
};
*/
function goTwo() {
  window.location='http://en.wikipedia.org/w/index.php?title=Talk:' + wgPageName + '&action=edit&copyeditor=true';
  document.getElementById('wpTextbox1').value = '{{User:QwerpQwertus/copyeditor/GOCE-BED-INUSE|}}' + document.getElementById('wpTextbox1').value;
  document.getElementById('wpSummary').value = "Adding [[WP:GOCE|Guild of Copy Editors]] [[WP:GOCE/BED|Backlog Elimination Drive]] inuse tag using [[User:シ/copyeditor]]. Please note that I may not be a member of the league, just a participant. Thanks!" + document.getElementById('wpSummary').value;
  document.getElementById('wpMinoredit').checked = true;
  document.getElementById('editform').submit();
}
function go() {
  window.location='http://en.wikipedia.org/w/index.php?title=' + wgPageName + '&action=edit&copyeditor=true';
  document.getElementById('wpTextbox1').value = '{{User:QwerpQwertus/copyeditor/GOCE-BED-INUSE|}}' + document.getElementById('wpTextbox1').value;
  document.getElementById('wpSummary').value = "Adding [[WP:GOCE|Guild of Copy Editors]] [[WP:GOCE/BED|Backlog Elimination Drive]] inuse tag using [[User:シ/copyeditor]]. Please note that I may not be a member of the league, just a participant. Thanks!" + document.getElementById('wpSummary').value;
  document.getElementById('wpMinoredit').checked = true;
  document.getElementById('editform').submit();
  goTwo();
}
addOnloadHook(function () {
    mw.util.addPortletLink('p-tb', 'javascript:go()', 'CopyEdit', 't-copy-edit', 'Leave and remove tags that the article is was being copyedited and get some auto spelling and grammar fixes', '', '');
    document.getElementById("t-copy-edit").firstChild.style.cssText = "color:green;"
}
//</pre>