Jump to content

User:Casper2k3/Javascript/userheader.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.
// <nowiki>
function doISP(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Tagging as a Shared IP (ISP)- Please wait...</h2>';
var ISPName = prompt("What is the name of the ISP?");
if(ISPName == "" || ISPName == null){
alert ("You didn't enter the name of the ISP! User header cancelled.")
 return;
}
doHeader("ISP|" + ISPName);
};
function doSharedIP(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Tagging as a Shared IP (IP)- Please wait...</h2>';
var ISPName = prompt("Where is the IP registered to?");
if(ISPName == "" || ISPName == null){
alert ("You didn't enter the name of where the IP is registered! User header cancelled.")
 return;
}
doHeader("SharedIP|" + ISPName);
};
function doSharedIPEdu(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Tagging as a Shared IP (Edu)- Please wait...</h2>';
var ISPName = prompt("What institution is the IP registered to?");
if(ISPName == "" || ISPName == null){
alert ("You didn't enter the name of where the IP is registered! User header cancelled.")
 return;
}
doHeader("SharedIPEDU|" + ISPName);
};
function doSharedIPPublic(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Tagging as a Shared IP (Public)- Please wait...</h2>';
var ISPName = prompt("Where is the IP registered to?");
if(ISPName == "" || ISPName == null){
alert ("You didn't enter the name of where the IP is registered! User header cancelled.")
 return;
}
doHeader("SharedIPPublic|" + ISPName);
};
function doAbuseReport(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Tagging as undergoing an Abuse Report- Please wait...</h2>';
var ISPName = prompt("Where is the IP registered to?");
if(ISPName == "" || ISPName == null){
alert ("You didn't enter the name of where the IP is registered! User header cancelled.")
 return;
}
var PageName = prompt("What is the abuse sub page?");
if(PageName == "" || PageName == null){
alert ("You didn't enter the sub page name! User header cancelled.")
 return;
}
doHeader("AR talk|" + ISPName + "|" + PageName);
};

function doSpeedyG3(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (Vandalism - CSD:G3) - Please wait...</h2>';
doSpeedy("vandalism", "G3");
};
function doSpeedyG4(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (Repost - CSD:G4) - Please wait...</h2>';
doSpeedy("repost", "G4");
};
function doSpeedyG5(){
var bannedName = prompt("What is the name of the banned user?");
if(bannedName == "" || bannedName == null){
alert ("You didn't enter the name of the banned user! Speedy cancelled.")
 return;
}
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (Banned user [' + bannedName + '] - CSD:G5) - Please wait...</h2>';
var speedyTag = "banned|" + bannedName;
doSpeedy(speedyTag, "G5");
};
function doSpeedyG6(){
var pageName = prompt("What is the name of the page to merge history from?");
if(pageName == "" || pageName == null){
alert ("You didn't enter the name of the page! Speedy cancelled.")
 return;
}
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (History merge [' + pageName + '] - CSD:G6) - Please wait...</h2>';
var speedyTag = "histmerge|" + pageName;
doSpeedy(speedyTag, "G6");
};
function doSpeedyG7(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (Author requests delete - CSD:G7) - Please wait...</h2>';
doSpeedy("author", "G7");
};
function doSpeedyG8(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (Talk page of non-existent article - CSD:G8) - Please wait...</h2>';
doSpeedy("talk", "G8");
};
function doSpeedyA1(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (Empty / No context - CSD:A1) - Please wait...</h2>';
doSpeedy("empty", "A1");
};
function doSpeedyA3(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (No content / Attempt to contact - CSD:A3) - Please wait...</h2>';
doSpeedy("contact", "A3");
};
function doSpeedyA6(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (Attack page - CSD:A6) - Please wait...</h2>';
doSpeedy("attack", "A6");
};
function doSpeedyA7(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (Bio (Vanity) - CSD:A7) - Please wait...</h2>';
doSpeedy("bio", "A7");
};
function doSpeedyG11(){
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (Spam - CSD:G11) - Please wait...</h2>';
doSpeedy("spam", "G11");
};
function doSpeedyA8(){
var urlSource = prompt("What is the web address of the copyvio?");
if(urlSource == "" || urlSource == null){
alert ("You didn't enter the web address of the copyvio! Speedy cancelled.")
 return;
}
document.getElementById('jsWaitMessageBox').innerHTML = '<br><h2>Nominating for Speedy Deletion (Copyvio [' + urlSource + '] - CSD:A8) - Please wait...</h2>';
var speedyTag = "copyvio|url=" + urlSource;
doSpeedy(speedyTag, "A8");
};
function doHeader(tag){
document.location = document.URL + "?action=edit&autoedit=s/^/\n{{" + tag + "}}<br>/&autosummary=Header template {{" + tag + "}} by [[User:Casper2k3|Casper2k3]] ([[WP:RCP]])";
};
function userheaderButton(){
document.getElementById('jsArticleMessageBox').innerHTML = '<div style="background-color:yellow; -moz-border-radius:15px;">&nbsp;[[Shared IP]]: <a href="javascript:doISP()"><font color="#0000FF">ISP</font></a> - <a href="javascript:doSharedIP()"><font color="#0000FF">Shared IP</font></a> - <a href="javascript:doSharedIPEdu()"><font color="#0000FF">Shared IP (Educational Institution)</font></a> - <a href="javascript:doSharedIPPublic()"><font color="#0000FF">Shared IP (Public)</font></a><br>&nbsp;[[Abuse Report]]: <a href="javascript:doAbuseReport()"><font color="#0000FF">Abuse Report</font></a><sup>(<a href="http://en.wikipedia.org/wiki/Wikipedia:Abuse_reports" target="_blank">+</a>)</sup> - <a href="javascript:doSpeedyG6()"><font color="#0000FF">History Merge</font></a> - <a href="javascript:doSpeedyG7()"><font color="#0000FF">Author Requests Delete</font></a> - <a href="javascript:doSpeedyG8()"><font color="#0000FF">Talk Page of Non-Existent Article</font></a><br>&nbsp;<a href="javascript:doSpeedyG11()"><font color="#0000FF">Spam</font></a> - <a href="javascript:doSpeedyA1()"><font color="#0000FF">Empty / No Context</font></a> - <a href="javascript:doSpeedyA3()"><font color="#0000FF">No Content / Attempt to Contact</font></a> - <a href="javascript:doSpeedyA6()"><font color="#0000FF">Attack</font></a> - <a href="javascript:doSpeedyA7()"><font color="#0000FF">Bio (Vanity)</font></a> - <a href="javascript:doSpeedyA8()"><font color="#0000FF">Copyvio</font></a> - [<a href="http://en.wikipedia.org/wiki/WP:CSD"><font color="#0000FF">CSD</font></a>] [<a href="http://en.wikipedia.org/wiki/WP:RCP"><font color="#0000FF">RCP</font></a>]</div>';
};
// </nowiki>