User:シ/copyeditor.js
Appearance
< User:シ
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
Documentation for this user script can be added at User:シ/copyeditor. |
//<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/enwiki/w/index.php?title=" + parsedarticle + "&action=edit§ion=0©edit=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/enwiki/w/index.php?title=Talk:' + wgPageName + '&action=edit©editor=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/enwiki/w/index.php?title=' + wgPageName + '&action=edit©editor=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>