User:Shane/bsgbook.js/tabs.js: Difference between revisions
From the only original and legitimate Battlestar Wiki: the free-as-in-beer, non-corporate, open-content encyclopedia, analytical reference, and episode guide on all things Battlestar Galactica. Accept neither subpar substitutes nor subpar clones.
More actions
< User:Shane | bsgbook.js
forgot image ;-x |
No edit summary |
||
| (65 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
suf_noinclude_var = "</noinclude>"; | suf_noinclude_var = "</noinclude>"; | ||
// ========== Content Relating to this Script Only ============ | |||
function checkContent() { | function checkContent() { | ||
| Line 78: | Line 18: | ||
if (document.title.indexOf("Editing ") == 0) { | if (document.title.indexOf("Editing ") == 0) { | ||
addLoadEvent(loadTabs); | |||
} | } | ||
if (window.location.href.indexOf("Special") == -1) { | if (window.location.href.indexOf("Special") == -1) { | ||
addLoadEvent(loadNonEdit); | |||
} | } | ||
function loadTabs() { | function loadTabs() { | ||
sNamespace = getNameSpace(); | sNamespace = getNameSpace(); | ||
sAdmin = isAdmin(); | |||
sTrusted = isTrusted(); | |||
sCheckUser = isCheckUser(); | |||
sDebug = isDebug(); | |||
bContent = checkContent(); | bContent = checkContent(); | ||
if (sDebug == "true") { | |||
alert("Namespace: " + sNamespace + | |||
"\n Admin: " + sAdmin + | |||
"\n Trusted: " + sTrusted + | |||
"\n Checkuser: " + sCheckUser + | |||
"\n Content: " + bContent + | |||
"\n Shortwiki Code: " + shortwikiloc + | |||
"\n URL: " + wikiloc); | |||
} | |||
if ((sNamespace == "Template") || (sNamespace == "Quotes")) { | if ((sNamespace == "Template") || (sNamespace == "Quotes")) { | ||
if (bContent) { | if (bContent) { | ||
if (shortwikiloc != "md") { | |||
addQcl(); // Mark as "Cleanup" | |||
addQdd(); // Mark as "Delete" | |||
if (sAdmin == "false") { | |||
addQrpp(); // Add {{request protected}} | |||
if (sTrusted == "false") { | |||
addQrmv(); // Requested Move | |||
} | |||
} | |||
addQrp(); // Revert Page Option | |||
} | |||
} | } | ||
} | } | ||
if (sNamespace == "Image") { | if (sNamespace == "Image") { | ||
if (shortwikiloc != "md") { | |||
addQfp(); // Mark as Featured Picture | |||
addQrp(); // Revert Page Option | |||
} else { | |||
if (sAdmin == "false") { | |||
addQrpp(); // Add {{request protected}} | |||
} | |||
addQnt(); // Add {{no tag}} | |||
addQns(); // Add {{no source}} | |||
addQnc(); // Add {{no copyright}} | |||
} | |||
} | } | ||
if ((sNamespace == "User") || (sNamespace == "Category")) { | if ((sNamespace == "User") || (sNamespace == "Category") || (sNamespace == "User talk")) { | ||
if (bContent) { | if (bContent) { | ||
addQsd(); // Mark as "Speedy Delete" | addQsd(); // Mark as "Speedy Delete" | ||
if (sAdmin == "false") { | |||
addQdd(); // Mark as "Delete" | |||
} | |||
addQrp(); // Revert Page Option | addQrp(); // Revert Page Option | ||
} | } | ||
} | } | ||
if ((sNamespace == "Article") || (sNamespace == "Battlestar Wiki") || (sNamespace == "Sources")) { | if ((sNamespace == "Article") || (sNamespace == "Battlestar Wiki") || (sNamespace == "Sources") || (sNamespace == "Portal")) { | ||
if (bContent) { | if (bContent) { | ||
addQdd(); // Mark as "Delete" | if (shortwikiloc != "md") { | ||
addQdd(); // Mark as "Delete" | |||
addQsd(); // Mark as "Speedy Delete" | |||
if (sAdmin == "false") { | |||
addQrpp(); // Add {{request protected}} | |||
if (sTrusted == "false") { | |||
addQrmv(); // Requested Move | |||
} | |||
} | |||
if (sNamespace == "Article") { | |||
addQfa(); // Mark as Featured Article | |||
addQqa(); // Mark as Quaility Article | |||
} | |||
addQae(); // Mark as "Expantion" | |||
} | |||
addQcl(); // Mark as "Cleanup" | addQcl(); // Mark as "Cleanup" | ||
addQrt(); // Replace Text Option | addQrt(); // Replace Text Option | ||
addQrp(); // Revert Page Option | addQrp(); // Revert Page Option | ||
} else { | } else { | ||
addQar(); // Mark as "Requested" | addQar(); // Mark as "Requested" | ||
addQrd(); // Create shortcut. | |||
} | |||
} | |||
if (sNamespace == "User talk") { | |||
if (shortwikiloc == "en") { | |||
if (!bContent) { | |||
addQwm(); // Welcome Message | |||
} | |||
} | } | ||
} | |||
if (sNamespace == "Help") { | |||
addQcl(); // Mark as "Cleanup" | |||
addQrt(); // Replace Text Option | |||
addQrp(); // Revert Page Option | |||
addQae(); // Mark as "Expantion" | |||
} | } | ||
} | } | ||
function loadNonEdit() { | function loadNonEdit() { | ||
sNamespace = getNameSpace(); | |||
sAdmin = isAdmin(); | |||
sTrusted = isTrusted(); | |||
sCheckUser = isCheckUser(); | |||
sDebug = isDebug(); | |||
if (sDebug == "true") { | |||
alert("Namespace: " + sNamespace + | |||
"\n Admin: " + sAdmin + | |||
"\n Trusted: " + sTrusted + | |||
"\n Checkuser: " + sCheckUser + | |||
"\n Shortwiki Code: " + shortwikiloc + | |||
"\n URL: " + wikiloc); | |||
} | |||
if ((sNamespace == "User") || (sNamespace == "User talk")) { | |||
if (sAdmin == "false") { | |||
addQru(); // Adding Report User | |||
} | |||
if (sCheckUser != "false") { | |||
addQcu(); // Check User Button | |||
} | |||
} | |||
addLastDiff(); // Last Diff Button | addLastDiff(); // Last Diff Button | ||
addQpp(); // Purge Page Button | addQpp(); // Purge Page Button | ||
| Line 141: | Line 147: | ||
function doLastDiff() { | function doLastDiff() { | ||
var nurl = " | var nurl = wikiloc + "index.php?title=" + getPname() + "&diff=cur&oldid=prev"; | ||
document.location = nurl; | document.location = nurl; | ||
} | } | ||
| Line 151: | Line 157: | ||
} | } | ||
// ========== | // ========== Report User =========== | ||
function addQru() { | |||
username = location.href.split(':')[2]; | |||
if (!username) { | |||
username = document.getElementsByTagName('h1')[0].innerHTML.split(':')[1]; | |||
} | |||
if (username.indexOf("&action=edit") != -1){ | |||
username = username.split('&')[0]; | |||
} else if (username.indexOf("&action=submit") != -1){ | |||
username = username.split('&')[0]; | |||
} | |||
if (username.indexOf("#") != -1){ | |||
username = username.split('#')[0]; | |||
} | |||
if (username.indexOf("&") != -1){ | |||
username = username.split('&')[0]; | |||
} | |||
addTab("javascript:AIVandal('"+ username + "')", "report user", "ca-ru", "Report User to Adminboard", ""); | |||
} | |||
// ========== Check User =========== | |||
function addQcu() { | |||
gUsername = getUsername(); | |||
addTab("javascript:doQcu('"+ gUsername + "')", "check user", "ca-cu", "Check User IP", ""); | |||
} | |||
function doQcu(sUsername) { | |||
var nurl = wikiloc_mod + "Special:CheckUser/" + sUsername; | |||
document.location = nurl; | |||
} | |||
// ========== Replace ========== | |||
function doQrt() { | function doQrt() { | ||
| Line 167: | Line 206: | ||
function addQrt() { | function addQrt() { | ||
//addTab("javascript:doQrt()", "replace", "ca-rt", "Do a mass replace.", ""); | //addTab("javascript:doQrt()", "replace", "ca-rt", "Do a mass replace.", ""); | ||
} | |||
// ========== Welcome! User ========== | |||
function doQwm() { | |||
gUsername = getUsername(); | |||
document.editform.wpTextbox1.value = "{{subst:welcome|"+ gUsername +"}}--~~~~"; | |||
document.editform.wpSummary.value = "Welcome to Battlestar Wiki!"; | |||
document.editform.submit(); | |||
} | |||
function addQwm() { | |||
addTab("javascript:doQwm()", "welcome", "ca-wm", "welcome", ""); | |||
} | } | ||
| Line 183: | Line 235: | ||
function addQrpp() { | function addQrpp() { | ||
addTab("javascript:doQrpp()", "protect req", "ca-rpp", "Request Protection Status.", ""); | |||
} | |||
// ========== Request Move ========== | |||
function doQrmv() { | |||
sPagename = "[["+getPname()+"]]"; | |||
var sWhereTo = prompt('Plase enter the correct verb. (e.x. into, from, etc.) Default: to', 'to'); | |||
var sWhereName = prompt('Plase enter the page you want the move request to.', ''); | |||
if ((sNamespace == "Template") || (sNamespace == "Quotes")) { | |||
document.editform.wpTextbox1.value = pre_noinclude_var + "{{move|" + sWhereTo + "|" + sWhereName + "}}" + suf_noinclude_var + "\n\n" + document.editform.wpTextbox1.value; | |||
} else { | |||
document.editform.wpTextbox1.value = "{{move|" + sWhereTo + "|" + sWhereName + "}}\n\n" + document.editform.wpTextbox1.value; | |||
} | |||
if (((sWhereName == "") || (sWhereName == "null")) && ((sWhereTo == "") || (sWhereTo == "null"))) { | |||
document.editform.wpSummary.value = "Move request of " + sPagename; | |||
document.editform.submit(); | |||
} else { | |||
alert("Will not add move request tag. Both fields must be complete."); | |||
} | } | ||
} | |||
function addQrmv() { | |||
addTab("javascript:doQrmv()", "req. move", "ca-rmv", "Request Move.", ""); | |||
} | } | ||
| Line 260: | Line 333: | ||
function doQnt() { | function doQnt() { | ||
document.editform.wpTextbox1.value = "{{no tag | document.editform.wpTextbox1.value = "{{subst:no tag syntax}}\n\n" + document.editform.wpTextbox1.value; | ||
document.editform.wpSummary.value = "Tag needs to be updated."; | document.editform.wpSummary.value = "[[BWM:ITP|Tag]] needs to be updated."; | ||
document.editform.submit(); | document.editform.submit(); | ||
} | } | ||
| Line 267: | Line 340: | ||
function addQnt() { | function addQnt() { | ||
addTab("javascript:doQnt()", "nt", "ca-nt", "Tag needs to be updated.", ""); | addTab("javascript:doQnt()", "nt", "ca-nt", "Tag needs to be updated.", ""); | ||
} | |||
// ========== 'No Source' ========== | |||
function doQns() { | |||
document.editform.wpTextbox1.value = "{{subst:no source syntax}}\n\n" + document.editform.wpTextbox1.value; | |||
document.editform.wpSummary.value = "[[BWM:ITP|Tag]] needs to be updated."; | |||
document.editform.submit(); | |||
} | |||
function addQns() { | |||
addTab("javascript:doQns()", "ns", "ca-ns", "Tag needs to be updated.", ""); | |||
} | |||
// ========== 'No Copyright' ========== | |||
function doQnc() { | |||
document.editform.wpTextbox1.value = "{{subst:no copyright syntax}}\n\n" + document.editform.wpTextbox1.value; | |||
document.editform.wpSummary.value = "[[BWM:ITP|Tag]] needs to be updated."; | |||
document.editform.submit(); | |||
} | |||
function addQnc() { | |||
addTab("javascript:doQnc()", "nc", "ca-nc", "Tag needs to be updated.", ""); | |||
} | } | ||
| Line 273: | Line 370: | ||
function doQqa() { | function doQqa() { | ||
sPagename = "[["+getPname()+"|"+getPname('name')+"]]"; | sPagename = "[["+getPname()+"|"+getPname('name')+"]]"; | ||
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + "\n{{ | document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + "\n{{quality candidate}}"; | ||
document.editform.wpSummary.value = "Marked " + sPagename + " as [[Battlestar Wiki: | document.editform.wpSummary.value = "Marked " + sPagename + " as [[Battlestar Wiki:Quality Articles|quality article candidate.]]"; | ||
document.editform.submit(); | document.editform.submit(); | ||
} | } | ||
| Line 293: | Line 390: | ||
function addQqa() { | function addQqa() { | ||
addTab("javascript:doQqa()", "qa", "ca-qa", "Mark as | addTab("javascript:doQqa()", "qa", "ca-qa", "Mark as Quality Article Candidate.", ""); | ||
} | } | ||
| Line 311: | Line 408: | ||
document.editform.wpSummary.value = "Marked [[" + sPagename + "]] as [[Battlestar Wiki:Requested pages|a requested pages.]]"; | document.editform.wpSummary.value = "Marked [[" + sPagename + "]] as [[Battlestar Wiki:Requested pages|a requested pages.]]"; | ||
document.editform.submit(); | document.editform.submit(); | ||
} | |||
function doQrd() { | |||
var sRedirect = prompt('Plase enter the page you want the redirect to go to.', ''); | |||
sPagename = getPname(); | |||
document.editform.wpTextbox1.value = "#REDIRECT [[" + sRedirect + "]]"; | |||
document.editform.wpSummary.value = "Marked [[" + sPagename + "]] as [[BW:SHORT|a shortcut.]]"; | |||
} | } | ||
| Line 317: | Line 421: | ||
} | } | ||
// ========== | function addQrd() { | ||
addTab("javascript:doQrd()", "shortcut", "ca-rd", "Create shortcut.", ""); | |||
} | |||
// ========== Expansion ========== | |||
function doQae() { | function doQae() { | ||
sPagename = getPname(); | sPagename = getPname(); | ||
document.editform.wpTextbox1.value = "{{expansion}}"; | document.editform.wpTextbox1.value = "{{expansion}}\n\n" + document.editform.wpTextbox1.value; | ||
document.editform.wpSummary.value = "Marked [[" + sPagename + "]] as [[Battlestar Wiki:Requests for expansion|a expansion request.]]"; | document.editform.wpSummary.value = "Marked [[" + sPagename + "]] as [[Battlestar Wiki:Requests for expansion|a expansion request.]]"; | ||
document.editform.submit(); | document.editform.submit(); | ||
| Line 328: | Line 436: | ||
function addQae() { | function addQae() { | ||
addTab("javascript:doQae()", "exp", "ca-ae", "Mark as Expansion.", ""); | addTab("javascript:doQae()", "exp", "ca-ae", "Mark as Expansion.", ""); | ||
} | } | ||
| Line 374: | Line 441: | ||
function doQpp() { | function doQpp() { | ||
var nurl = " | var nurl = wikiloc + "index.php?title=" + getPname() + "&action=purge"; | ||
document.location = nurl; | document.location = nurl; | ||
} | } | ||
Latest revision as of 17:49, 18 February 2007
/* <pre><nowiki> */
// ========== Hardcoded Vars Needed =============
pre_noinclude_var = "<noinclude>";
suf_noinclude_var = "</noinclude>";
// ========== Content Relating to this Script Only ============
function checkContent() {
if (document.editform.wpTextbox1.value == "") {
return false;
} else {
return true;
}
}
if (document.title.indexOf("Editing ") == 0) {
addLoadEvent(loadTabs);
}
if (window.location.href.indexOf("Special") == -1) {
addLoadEvent(loadNonEdit);
}
function loadTabs() {
sNamespace = getNameSpace();
sAdmin = isAdmin();
sTrusted = isTrusted();
sCheckUser = isCheckUser();
sDebug = isDebug();
bContent = checkContent();
if (sDebug == "true") {
alert("Namespace: " + sNamespace +
"\n Admin: " + sAdmin +
"\n Trusted: " + sTrusted +
"\n Checkuser: " + sCheckUser +
"\n Content: " + bContent +
"\n Shortwiki Code: " + shortwikiloc +
"\n URL: " + wikiloc);
}
if ((sNamespace == "Template") || (sNamespace == "Quotes")) {
if (bContent) {
if (shortwikiloc != "md") {
addQcl(); // Mark as "Cleanup"
addQdd(); // Mark as "Delete"
if (sAdmin == "false") {
addQrpp(); // Add {{request protected}}
if (sTrusted == "false") {
addQrmv(); // Requested Move
}
}
addQrp(); // Revert Page Option
}
}
}
if (sNamespace == "Image") {
if (shortwikiloc != "md") {
addQfp(); // Mark as Featured Picture
addQrp(); // Revert Page Option
} else {
if (sAdmin == "false") {
addQrpp(); // Add {{request protected}}
}
addQnt(); // Add {{no tag}}
addQns(); // Add {{no source}}
addQnc(); // Add {{no copyright}}
}
}
if ((sNamespace == "User") || (sNamespace == "Category") || (sNamespace == "User talk")) {
if (bContent) {
addQsd(); // Mark as "Speedy Delete"
if (sAdmin == "false") {
addQdd(); // Mark as "Delete"
}
addQrp(); // Revert Page Option
}
}
if ((sNamespace == "Article") || (sNamespace == "Battlestar Wiki") || (sNamespace == "Sources") || (sNamespace == "Portal")) {
if (bContent) {
if (shortwikiloc != "md") {
addQdd(); // Mark as "Delete"
addQsd(); // Mark as "Speedy Delete"
if (sAdmin == "false") {
addQrpp(); // Add {{request protected}}
if (sTrusted == "false") {
addQrmv(); // Requested Move
}
}
if (sNamespace == "Article") {
addQfa(); // Mark as Featured Article
addQqa(); // Mark as Quaility Article
}
addQae(); // Mark as "Expantion"
}
addQcl(); // Mark as "Cleanup"
addQrt(); // Replace Text Option
addQrp(); // Revert Page Option
} else {
addQar(); // Mark as "Requested"
addQrd(); // Create shortcut.
}
}
if (sNamespace == "User talk") {
if (shortwikiloc == "en") {
if (!bContent) {
addQwm(); // Welcome Message
}
}
}
if (sNamespace == "Help") {
addQcl(); // Mark as "Cleanup"
addQrt(); // Replace Text Option
addQrp(); // Revert Page Option
addQae(); // Mark as "Expantion"
}
}
function loadNonEdit() {
sNamespace = getNameSpace();
sAdmin = isAdmin();
sTrusted = isTrusted();
sCheckUser = isCheckUser();
sDebug = isDebug();
if (sDebug == "true") {
alert("Namespace: " + sNamespace +
"\n Admin: " + sAdmin +
"\n Trusted: " + sTrusted +
"\n Checkuser: " + sCheckUser +
"\n Shortwiki Code: " + shortwikiloc +
"\n URL: " + wikiloc);
}
if ((sNamespace == "User") || (sNamespace == "User talk")) {
if (sAdmin == "false") {
addQru(); // Adding Report User
}
if (sCheckUser != "false") {
addQcu(); // Check User Button
}
}
addLastDiff(); // Last Diff Button
addQpp(); // Purge Page Button
}
// ========== Add Last Diff ==========
function doLastDiff() {
var nurl = wikiloc + "index.php?title=" + getPname() + "&diff=cur&oldid=prev";
document.location = nurl;
}
function addLastDiff() {
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
var l = addlilink(tabs, "javascript:doLastDiff()", 'last', '');
l.lastChild.title = "Show most recent diff";
}
// ========== Report User ===========
function addQru() {
username = location.href.split(':')[2];
if (!username) {
username = document.getElementsByTagName('h1')[0].innerHTML.split(':')[1];
}
if (username.indexOf("&action=edit") != -1){
username = username.split('&')[0];
} else if (username.indexOf("&action=submit") != -1){
username = username.split('&')[0];
}
if (username.indexOf("#") != -1){
username = username.split('#')[0];
}
if (username.indexOf("&") != -1){
username = username.split('&')[0];
}
addTab("javascript:AIVandal('"+ username + "')", "report user", "ca-ru", "Report User to Adminboard", "");
}
// ========== Check User ===========
function addQcu() {
gUsername = getUsername();
addTab("javascript:doQcu('"+ gUsername + "')", "check user", "ca-cu", "Check User IP", "");
}
function doQcu(sUsername) {
var nurl = wikiloc_mod + "Special:CheckUser/" + sUsername;
document.location = nurl;
}
// ========== Replace ==========
function doQrt() {
var obj = document.editform;
sPagename = "[["+getPname()+"]]";
var sReplace_input = prompt('Please enter the text you are looking for and that you will be replacing. (Case Sensitive)', '');
var sReplace_new = prompt('Plase enter the text that is new.', '');
if ( ((sReplace_input != null) || (sReplace_new != null)) && (sReplace_input != sReplace_new) ) {
// Working on this..
obj.wpSummary.value = "Replaced '''" + sReplace_input + "''' with '''" + sReplace_new + "''' on " + sPagename + ".";
//obj.submit();
}
}
function addQrt() {
//addTab("javascript:doQrt()", "replace", "ca-rt", "Do a mass replace.", "");
}
// ========== Welcome! User ==========
function doQwm() {
gUsername = getUsername();
document.editform.wpTextbox1.value = "{{subst:welcome|"+ gUsername +"}}--~~~~";
document.editform.wpSummary.value = "Welcome to Battlestar Wiki!";
document.editform.submit();
}
function addQwm() {
addTab("javascript:doQwm()", "welcome", "ca-wm", "welcome", "");
}
// ========== Request Protected ==========
function doQrpp() {
sPagename = "[["+getPname()+"]]";
if ((sNamespace == "Template") || (sNamespace == "Quotes")) {
document.editform.wpTextbox1.value = pre_noinclude_var + "{{rp}}" + suf_noinclude_var + "\n\n" + document.editform.wpTextbox1.value;
} else {
document.editform.wpTextbox1.value = "{{rp}}\n\n" + document.editform.wpTextbox1.value;
}
document.editform.wpSummary.value = "Marked for request protected status of " + sPagename;
document.editform.submit();
}
function addQrpp() {
addTab("javascript:doQrpp()", "protect req", "ca-rpp", "Request Protection Status.", "");
}
// ========== Request Move ==========
function doQrmv() {
sPagename = "[["+getPname()+"]]";
var sWhereTo = prompt('Plase enter the correct verb. (e.x. into, from, etc.) Default: to', 'to');
var sWhereName = prompt('Plase enter the page you want the move request to.', '');
if ((sNamespace == "Template") || (sNamespace == "Quotes")) {
document.editform.wpTextbox1.value = pre_noinclude_var + "{{move|" + sWhereTo + "|" + sWhereName + "}}" + suf_noinclude_var + "\n\n" + document.editform.wpTextbox1.value;
} else {
document.editform.wpTextbox1.value = "{{move|" + sWhereTo + "|" + sWhereName + "}}\n\n" + document.editform.wpTextbox1.value;
}
if (((sWhereName == "") || (sWhereName == "null")) && ((sWhereTo == "") || (sWhereTo == "null"))) {
document.editform.wpSummary.value = "Move request of " + sPagename;
document.editform.submit();
} else {
alert("Will not add move request tag. Both fields must be complete.");
}
}
function addQrmv() {
addTab("javascript:doQrmv()", "req. move", "ca-rmv", "Request Move.", "");
}
// ========== Revert ==========
function doQrp() {
sPagename = "[["+getPname()+"]]";
document.editform.wpSummary.value = "Reverted to an old version of " + sPagename;
document.editform.submit();
}
function addQrp() {
if (window.location.href.indexOf("&oldid=") != -1) {
addTab("javascript:doQrp()", "revert", "ca-rp", "Revert this page to this version.", "");
}
}
// ========== Delete ==========
function doQdd() {
sNamespace = getNameSpace();
sPagename = "[["+getPname()+"]]";
if (sNamespace == "Template") {
document.editform.wpTextbox1.value = pre_noinclude_var + "{{tfd}}" + suf_noinclude_var + "\n\n" + document.editform.wpTextbox1.value;
} else if (sNamespace == "Quotes") {
document.editform.wpTextbox1.value = pre_noinclude_var + "{{qfd}}" + suf_noinclude_var + "\n\n" + document.editform.wpTextbox1.value;
} else {
document.editform.wpTextbox1.value = "{{delete}}\n\n" + document.editform.wpTextbox1.value;
}
document.editform.wpSummary.value = sPagename + " - marked for deletion.";
document.editform.submit();
}
function addQdd() {
addTab("javascript:doQdd()", "del", "ca-dd", "Mark for deletion.", "");
}
// ========== Cleanup==========
function doQcl() {
sNamespace = getNameSpace();
sPagename = "[["+getPname()+"]]";
if ((sNamespace == "Quotes") || (sNamespace == "Template")) {
document.editform.wpTextbox1.value = pre_noinclude_var + "{{cleanup}}" + suf_noinclude_var + "\n\n" + document.editform.wpTextbox1.value;
} else {
document.editform.wpTextbox1.value = "{{cleanup}}\n\n" + document.editform.wpTextbox1.value;
}
document.editform.wpSummary.value = sPagename + " - marked for cleanup.";
document.editform.submit();
}
function addQcl() {
addTab("javascript:doQcl()", "clp", "ca-cp", "Mark for Cleanup.", "");
}
// ========== Quick Speedy delete ==========
function doQsd() {
sPagename = "[["+getPname()+"]]";
if ((sNamespace == "Quotes") || (sNamespace == "Template")) {
document.editform.wpTextbox1.value = pre_noinclude_var + "{{speedydelete}}" + suf_noinclude_var + "\n\n" + document.editform.wpTextbox1.value;
} else {
document.editform.wpTextbox1.value = "{{speedydelete}}\n\n" + document.editform.wpTextbox1.value;
}
document.editform.wpSummary.value = sPagename + " - marked for speedy deletion.";
document.editform.submit();
}
function addQsd() {
addTab("javascript:doQsd()", "sd", "ca-sd", "Mark for speedy deletion.", "");
}
// ========== 'No Tag' ==========
function doQnt() {
document.editform.wpTextbox1.value = "{{subst:no tag syntax}}\n\n" + document.editform.wpTextbox1.value;
document.editform.wpSummary.value = "[[BWM:ITP|Tag]] needs to be updated.";
document.editform.submit();
}
function addQnt() {
addTab("javascript:doQnt()", "nt", "ca-nt", "Tag needs to be updated.", "");
}
// ========== 'No Source' ==========
function doQns() {
document.editform.wpTextbox1.value = "{{subst:no source syntax}}\n\n" + document.editform.wpTextbox1.value;
document.editform.wpSummary.value = "[[BWM:ITP|Tag]] needs to be updated.";
document.editform.submit();
}
function addQns() {
addTab("javascript:doQns()", "ns", "ca-ns", "Tag needs to be updated.", "");
}
// ========== 'No Copyright' ==========
function doQnc() {
document.editform.wpTextbox1.value = "{{subst:no copyright syntax}}\n\n" + document.editform.wpTextbox1.value;
document.editform.wpSummary.value = "[[BWM:ITP|Tag]] needs to be updated.";
document.editform.submit();
}
function addQnc() {
addTab("javascript:doQnc()", "nc", "ca-nc", "Tag needs to be updated.", "");
}
// ========== FA/FP/QA Candidate Buttons ==========
function doQqa() {
sPagename = "[["+getPname()+"|"+getPname('name')+"]]";
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + "\n{{quality candidate}}";
document.editform.wpSummary.value = "Marked " + sPagename + " as [[Battlestar Wiki:Quality Articles|quality article candidate.]]";
document.editform.submit();
}
function doQfa() {
sPagename = "[["+getPname()+"|"+getPname('name')+"]]";
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + "\n{{featured article candidate}}";
document.editform.wpSummary.value = "Marked " + sPagename + " as [[Battlestar Wiki:Featured articles|featured article candidate.]]";
document.editform.submit();
}
function doQfp() {
sPagename = "[["+getPname()+"|"+getPname('name')+"]]";
document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + "\n{{featured picture candidate}}";
document.editform.wpSummary.value = "Marked " + sPagename + " as [[Battlestar Wiki:Featured pictures|featured picture candidate.]]";
document.editform.submit();
}
function addQqa() {
addTab("javascript:doQqa()", "qa", "ca-qa", "Mark as Quality Article Candidate.", "");
}
function addQfa() {
addTab("javascript:doQfa()", "fa", "ca-fa", "Mark as Featured Article Candidate.", "");
}
function addQfp() {
addTab("javascript:doQfp()", "fp", "ca-fp", "Mark as Featured Picture Candidate.", "");
}
// ========== Requested ==========
function doQar() {
sPagename = getPname();
document.editform.wpTextbox1.value = "{{requested}}";
document.editform.wpSummary.value = "Marked [[" + sPagename + "]] as [[Battlestar Wiki:Requested pages|a requested pages.]]";
document.editform.submit();
}
function doQrd() {
var sRedirect = prompt('Plase enter the page you want the redirect to go to.', '');
sPagename = getPname();
document.editform.wpTextbox1.value = "#REDIRECT [[" + sRedirect + "]]";
document.editform.wpSummary.value = "Marked [[" + sPagename + "]] as [[BW:SHORT|a shortcut.]]";
}
function addQar() {
addTab("javascript:doQar()", "req", "ca-ar", "Mark as Requested.", "");
}
function addQrd() {
addTab("javascript:doQrd()", "shortcut", "ca-rd", "Create shortcut.", "");
}
// ========== Expansion ==========
function doQae() {
sPagename = getPname();
document.editform.wpTextbox1.value = "{{expansion}}\n\n" + document.editform.wpTextbox1.value;
document.editform.wpSummary.value = "Marked [[" + sPagename + "]] as [[Battlestar Wiki:Requests for expansion|a expansion request.]]";
document.editform.submit();
}
function addQae() {
addTab("javascript:doQae()", "exp", "ca-ae", "Mark as Expansion.", "");
}
// ========== Purge Button ==========
function doQpp() {
var nurl = wikiloc + "index.php?title=" + getPname() + "&action=purge";
document.location = nurl;
}
function addQpp() {
addTab("javascript:doQpp()", "purge", "ca-pp", "Purge this page.", "");
}
/* </nowiki></pre> */