User:Stewy5714/monobook.js

importScript('User:AzaToth/twinkle.js'); TwinkleConfig = { revertMaxRevisions             :       50, userTalkPageMode               :       'window', showSharedIPNotice             :       false, openTalkPage                   :       [ 'agf', 'norm', 'vand' ], openTalkPageOnAutoRevert       :       false, summaryAd                      :       " using TW", deletionSummaryAd              :       " using TW", protectionSummaryAd            :       " using TW", watchSpeedyPages               :       [ 'g3', 'g5', 'g10', 'g11', 'g12' ], watchProdPages                 :       true, openUserTalkPageOnSpeedyDelete :       [ 'g1', 'g2', 'g10', 'g11', 'g12', 'a1', 'a7', 'i3', 'i4', 'i5', 'i6', 'i7', 'u3', 't1' ], watchRevertedPages             :       [ 'agf', 'norm', 'vand', 'torev' ], markRevertedPagesAsMinor       :       [ 'agf', 'norm', 'vand', 'torev' ], deleteTalkPageOnDelete         :       false, watchWarnings                  :       true, markAIVReportAsMinor           :       true, markSpeedyPagesAsMinor         :       true, offerReasonOnNormalRevert      :       true, orphanBacklinksOnSpeedyDelete  :       {orphan:true, exclude:['g6']} }; importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu'); importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css'); // // // // heavily based on tags.js by user:S // My thanks and major props go to AzaToth and S //requires: //importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu'); //importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css'); if(typeof(autosubmit) == 'undefined') { var autosubmit = 'false'; } if(typeof(minoredit) == 'undefined') { var minoredit = 'true'; } if(typeof(show_cwli) == 'undefined') { var showcwli = '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 doCleanup(n) { text = document.editform.wpTextbox1.value; date = new Date; switch(n) { case 'refimprove': text = '{' + '{' + 'refimprove' + '}}\n\n' + text; summary = 'Marked article as needing more references'; break; case 'nofootnotes': text = '{' + '{' + 'nofootnotes' + '}}\n\n' + text; summary = 'Marked article as lacking in-text citation'; break; case 'onesource': text = '{' + '{' + 'onesource' + '}}\n\n' + text; summary = 'Marked article as only having one source'; break; case 'expand': text = '{' + '{' + 'expand' + '}}\n\n' + text; summary = 'The article needs to be expanded'; break; case 'confusing': text = '{' + '{' + 'confusing|' + date.getUTCMonthName + ' ' + date.getUTCFullYear + '}}\n\n' + text; summary = 'Marked article as confusing'; break; case 'copyedit': text = '{' + '{' + 'copyedit|' + date.getUTCMonthName + ' ' + date.getUTCFullYear + '}}\n\n' + text; summary = 'Marked article as requiring some copyediting'; break; case 'cleanup': text = '{' + '{' + 'Cleanup|' + date.getUTCMonthName + ' ' + date.getUTCFullYear + '}}\n\n' + text; summary = 'Marked article as requiring cleanup'; break; case 'orphan': text = '{' + '{' + 'orphan|' + date.getUTCMonthName + ' ' + date.getUTCFullYear + '}}\n\n' + text; summary = 'Marked article as being orphaned'; break; case 'subsections': text = '{' + '{' + 'Subsections' + '}' + '}\n\n' + text; summary = 'Marked article as needing subsections'; break; case 'trivia': text = '{' + '{' + 'Trivia' + '}' + '}\n\n' + text; summary = 'Marked article as containing an inappropriate trivia section'; break; case 'unreferenced': text = '{' + '{' + 'Unreferenced|date=' + date.getUTCMonthName + ' ' + date.getUTCFullYear + '}}\n\n' + text; summary = 'Marked article as not properly citing its sources'; break; case 'wikify': text = '{' + '{' + 'wikify|' + date.getUTCMonthName + ' ' + date.getUTCFullYear + '}}\n\n' + text; summary = 'Marked article as needing wikification'; break; case 'can we link it': window.location = "http://can-we-link-it.nickj.org/suggest-links/suggester.php?page=" + encodeURIComponent( wgPageName ); break; }	document.editform.wpSummary.value = summary; document.editform.wpTextbox1.value = text; if (minoredit == true) { document.editform.wpMinoredit.checked = true; }	document.editform.submit; } $(function {		if ( wgCanonicalNamespace in { "User":, "User_talk": } ) {			return;		}		if ( document.editform ) {			var tabs = document.getElementById( 'p-cactions' ).getElementsByTagName( 'ul' )[0];			addlimenu(tabs, "tags", "tags" );			mw.util.addPortletLink("tags", "javascript:doCleanup('confusing')", "confusing", "confusing", "Add confusing template", "");			mw.util.addPortletLink("tags", "javascript:doCleanup('copyedit')", "copyedit", "copyedit", "Add Copyedit template", "");			mw.util.addPortletLink("tags", "javascript:doCleanup('cleanup')", "cleanup", "cleanup", "Add cleanup template", "");			mw.util.addPortletLink("tags", "javascript:doCleanup('orphan')", "orphan", "orphan", "Add orphan template", "");			mw.util.addPortletLink("tags", "javascript:doCleanup('subsections')", "subsections", "subsections", "Add Subsections template", "");			mw.util.addPortletLink("tags", "javascript:doCleanup('trivia')", "trivia", "trivia", "Add Trivia template", ""); mw.util.addPortletLink("tags", "javascript:doCleanup('unreferenced')", "unreferenced", "unreferenced", "Add unreferenced template", ""); mw.util.addPortletLink("tags", "javascript:doCleanup('wikify')", "wikify", "wikify", "Add wikify template", ""); mw.util.addPortletLink("tags", "javascript:doCleanup('onesource')", "onesource", "onesource", "Add onesource template", ""); mw.util.addPortletLink("tags", "javascript:doCleanup('expand')", "expand", "expand", "Add expand template", ""); mw.util.addPortletLink("tags", "javascript:doCleanup('nofootnotes')", "nofootnotes", "nofootnotes", "Add nofootnotes template", ""); mw.util.addPortletLink("tags", "javascript:doCleanup('refimprove')", "refimprove", "refimprove", "Add refimprove template", ""); if ( show_cwli == true ) { mw.util.addPortletLink("tags", "javascript:doCleanup('can we link it')", "can we link it", "can we link it", "Can we link it", ""); }		}	}); // //