User:Ipatrol/tags.js

// // //Developed from wp:User:S/tags.js //Uses common RationalWiki tags //Dual licensed under the Gnu Free Documentation Licence and the Gnu Public Licence

importScript('User:Ipatrol/li.js'); importStylesheet('User:Ipatrol/li.css'); if(typeof(autosubmit) == 'undefined') { var autosubmit = 'true'; } if(typeof(minoredit) == 'undefined') { var minoredit = 'false'; } Date.monthNames = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]; Date.prototype.getMonthName = function { return Date.monthNames[ this.getMonth ]; } Date.prototype.getUTCMonthName = function { return Date.monthNames[ this.getUTCMonth ]; } function tag(n) { text = document.editform.wpTextbox1.value; date = new Date;

switch(n) { case 'delete': text = '{' + '{' + 'Delete|' + prompt("Reason?"," ";) + '}}\n\n' + text; summary = 'Marked page for deletion using tags'; break; case 'Edit Warring': text = '{' + '{' + 'Edit' + 'Warring' + '}}\n\n' + text; summary = 'Marked article as having been subject to edit warring using tags'; break; case 'WIP': text = '{' + '{' + 'WiP' + '}}\n\n' + text; summary = 'Marked article as under construction using tags'; break; if (wgCanonicalNamespace) == " User talk" && toLowerCase(wgPageName) != toUpperCase(wgPageName){ case 'Welcome': text = '{' + '{' + 'Welcome' + '}}\n\n' + text; summary = 'Welcomed user using tags'; break; case 'Unwelcome': text = '{' + '{' + 'Unwelcome' + '}}\n\n' + text; summary = 'Unwelcomed user using tags'; break; case 'Welcome2': text = '{' + '{' + 'Welcome2|' + wgUserName + '}}\n\n' + text; summary = 'Welcomed user using tags'; break; }	   if (wgCanonicalNamespace) == "User talk" && toLowerCase(wgPageName) == toUpperCase(wgPageName){case 'WelcomeIP': text = '{' + '{' + 'Welcome/IP' + '}}\n\n' + text; summary = 'Welcomed IP using tags'; break; case 'Welkome': text = '{' + '{' + 'Welkome|' + 'wgUserName' + '}}\n\n' + text; summary = 'Welcomed IP usingtags'; break; }       if (wgCanonicalNamespace)==" "){case 'Bat':		  text = '{' + '{' + 'Batshit' + 'insane' + '}' + '}\n\n' + text;		  summary = 'Marked article as completely insane using tags';		  break;	     case 'Blasphemy':		  text = '{' + '{' + 'Blasphemy' + '}}\n\n' + text;		  summary = 'Marked article as blasphemy using tags';		 break;         case 'Cpcentric':		  text = '{' + '{' + 'Cpcentric' + '}}\n\n' + text;		  summary = 'Marked article as Cpcentric using tags';		 break;         case 'Sarcasm':		  text = '{' + '{' + 'Sarcasm' + '}}\n\n' + text;		  summary = 'Marked article as sarcastic using tags';		 break;		 case 'Dumb':		 text = '{' + '{' + 'Dumbening' + 'warning' + '}}\n\n' + text;		 summary = 'Marked article as dumb using tags';		 break;		 case 'Drive-by': text = '{' + '{' + 'Drive-by' + '}}\n\n' + text; summary = 'Marked article as drive by spam/vandalism using tags'; break; case 'CPPOV': text = '{' + '{' + 'CPPOV' + '}}\n\n' + text; summary = 'Marked article as liberally POVed using tags'; break; case 'Jerboa Approved': text = '{' + '{' + 'Jerboa' + 'Approved' + '}}\n\n' + text; summary = 'Marked article as Jerboa approved using tags'; break; case 'More vandalism': text = '{' + '{' + 'More' + 'vandalism' + '}}\n\n' + text; summary = 'Marked article for vandalism using tags'; break; case 'Needs Vandal': text = '{' + '{' + 'Needs' + 'Vandal' + '}}\n\n' + text; summary = 'Marked article as needing vandalism using tags'; break; case 'Not science': text = '{' + '{' + 'Not' + 'science' + '}}\n\n' + text; summary = 'Marked article subject as unscientific using tags'; break; case 'Pseudoscience': text = '{' + '{' + 'Pseudoscience' + '}}\n\n' + text; summary = 'Marked article subject as pseudoscience using tags'; break; case 'Bull': text = '{' + '{' + 'Bullshit' + '}' + '}\n\n' + text; summary = 'Marked article subject as wingnuttery using tags'; break; case 'WP': text = '{' + '{' + 'Wp' + '}}\n\n' + text; summary = 'Add Wikipedia article box using tags'; break; case 'CP': text = '{' + '{' + 'Cp' + '}}\n\n' + text; summary = 'Add Conservapedia article box using tags'; break; case 'ED': text = '{' + '{' + 'Ed' + '}}\n\n' + text; summary = 'Add Encyclopedia Dramatica article box using tags'; break; case 'No CP': text = '{' + '{' + 'No' + 'Cp' + '}}\n\n' + text; summary = 'Marked article as lacking a Conservapedia counterpart using tags'; break; case 'YEC': text = '{' + '{' + 'YEC' + 'Disclaimer' + '}}\n\n' + text; summary = 'Marked article as being hazardous to YECs using tags'; break; case 'Women': text = '{' + '{' + 'WomansTouch' + '}}\n\n' + text; summary = 'Marked article as needing a women using tags'; break; }		if (wgCanonicalNamespace) == "Talk"||"User talk"){case 'Talkheader'		 text = '{' + '{' + 'Talkheader' + '}}\n\n' + text;		 summary = 'Added talkheader using tags]'		 break;		}		if (wgCanonicalNamespace) == "User talk"{case 'Talkheader no user': 	     text = '{' + '{' + 'Talkheader' + 'no' + 'user' + '}}\n\n' + text; 	      summary = 'Added talkheader using [[User:Ipatrol/tags.js|tags';	    break;		}	}	document.editform.wpSummary.value = summary;	document.editform.wpTextbox1.value = text;	if (minoredit == true) {		document.editform.wpMinoredit.checked = true;	}	if (autosubmit == true) {		document.editform.submit;	} }		if ( document.editform ) {			var tabs = document.getElementById( 'p-cactions' ).getElementsByTagName( 'ul' )[0];			addlimenu(tabs, "tags", "tags" );			addPortletLink("tags", "javascript:tag('Delete')", "Delete", "Delete", "Add deletion template template", "");			addPortletLink("tags", "javascript:tag('Edit Warring')", "Edit Warring", "Edit Warring", "Mark page as having been subject to edit warring", "");			addPortletLink("tags", "javascript:tag('WIP')", "Under construction", "Under construction", "Mark page as under construction", "");			if (wgCanonicalNamespace) == "User talk" && toLowerCase(wgPageName) != toUpperCase(wgPageName){			 addPortletLink("tags", "javascript:tag('Welcome')", "Welcome", "Welcome", "Welcome user", "");			 addPortletLink("tags", "javascript:tag('Unwelcome')", "Unwelcome", "Unwelcome", "Unwelcome user", "");			 addPortletLink("tags", "javascript:tag('Welcome2')", "Welcome2", "Welcome2", "Welcome user (alternate)", "");			}			if (wgCanonicalNamespace) == "User talk" && toLowerCase(wgPageName) == toUpperCase(wgPageName){			 addPortletLink("tags", "javascript:tag('WelcomeIP')", "WelcomeIP", "WelcomeIP", "Welcome IP", "");			 addPortletLink("tags", "javascript:tag('Welkome')", "Welkome", "Welkome", "Welkome IP", "");			}			if (wgCanonicalNamespace)==" "){			 addPortletLink("tags", "javascript:tag('Bat')", "Insane", "Bat", "Mark article as completely insane", "");			 addPortletLink("tags", "javascript:tag('Blasphemy')", "Blasphemy", "Blasphemy", "Mark article as blasphemy", "");			 addPortletLink("tags", "javascript:tag('Cpcentric')", "Cpcentric", "Cpcentric", "Mark article as Cpcentric", "");			 addPortletLink("tags", "javascript:tag('Sarcasm')", "Sarcasm", "Sarcasm", "Mark article as sarcastic", "");			 addPortletLink("tags", "javascript:tag('Dumb')", "Dumb", "Dumb", "Mark article as dumb", "");			 addPortletLink("tags", "javascript:tag('Drive-by')", "Drive-by", "Drive-by", "Mark article as drive-by spam/vandalism", "");			 addPortletLink("tags", "javascript:tag('CPPOV')", "CPPOV", "CPPOV", "Mark article as liberally POVed", "");			 addPortletLink("tags", "javascript:tag('Jerboa Approved')", "Jerboa Approved", "Jerboa Approved", "Mark article as Jerboa approved", "");			 addPortletLink("tags", "javascript:tag('More vandalism')", "More vandalism", "More vandalism", "Mark article for vandalism", "");			 addPortletLink("tags", "javascript:tag('Needs Vandal')", "Needs Vandal", "Needs Vandal", "Mark article as needing vandalism", "");			 addPortletLink("tags", "javascript:tag('Not science')", "Not science", "Not science", "Mark article subject as not science", "");			 addPortletLink("tags", "javascript:tag('Pseudoscience')", "Pseudoscience", "Pseudoscience", "Mark article subject as pseudoscience", "");			 addPortletLink("tags", "javascript:tag('Bull')", "Wingnuttery", "Bull", "Mark article subject as wingnuttery", "");			 addPortletLink("tags", "javascript:tag('Wp')", "Wp", "Wp", "Add Wikipedia article box", "");			 addPortletLink("tags", "javascript:tag('Cp')", "Cp", "Cp", "Add Conservapedia article box", "");			 addPortletLink("tags", "javascript:tag('ED')", "Ed", "Ed", "Add Encyclopædia Dramatica article box", "");			 addPortletLink("tags", "javascript:tag('No CP')", "No CP", "No CP", "Mark article as lacking a Conservapedia counterpart", "");			 addPortletLink("tags", "javascript:tag('YEC')", "YEC Disclaimer", "YEC", "Mark article as hazardous to YECs", "");			 addPortletLink("tags", "javascript:tag('Women')", "Woman's Touch", "Women", "Mark article as needing a woman", "");			}			if (wgCanonicalNamespace) == "Talk"||"User talk"){			 addPortletLink("tags", "javascript:tag('Talkheader')", "Talkheader", "Talkheader", "Add a talk page header", "");			}			if (wgCanonicalNamespace) == "User talk"){			 addPortletLink("tags", "javascript:tag('Talkheader no user')", "Talkheader no user", "Talkheader no user", "Add a talk page header for a user subpage", "");			}		}	}); // //