Revision as of 14:51, 3 August 2009 view sourceBetacommand (talk | contribs)86,927 editsNo edit summary← Previous edit | Latest revision as of 15:48, 7 February 2021 view source Amorymeltzer (talk | contribs)Autopatrolled, Interface administrators, Oversighters, Administrators63,403 editsm Remove legacy globals per phab:T72470 (via WP:JWB) | ||
(One intermediate revision by one other user not shown) | |||
Line 15: | Line 15: | ||
} | } | ||
//Check if it's article to add the tab | //Check if it's article to add the tab | ||
if(wgCanonicalNamespace == "") { | if(mw.config.get('wgCanonicalNamespace') == "") { | ||
addOnloadHook(function(){ | addOnloadHook(function(){ | ||
var taburl = "http://en.wikipedia.org/search/?title="+wgPageName+"&action=edit&prodspec=1"; | var taburl = "http://en.wikipedia.org/search/?title="+mw.config.get('wgPageName')+"&action=edit&prodspec=1"; | ||
addTab(taburl, "Prod!", "ca-prodspec", "This PRODs articles"); | addTab(taburl, "Prod!", "ca-prodspec", "This PRODs articles"); | ||
}); | }); |
Latest revision as of 15:48, 7 February 2021
//Written by ], thanks to ] and ] for help with this! //Modified by ] // BEGIN prodspec LINK REMOVAL CODE //check if we are editing and we want to prodspec if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('prodspec=1') != -1) { function prodspec() { document.getElementById('wpSummary').value = "Removing prodspec link as unverifiable and against policy ]"; var reason = prompt("Which warning do you wish to issue?"); document.editform.wpTextbox1.value = '{{subst:' + 'prod|'+ reason + '}}\n' + document.editform.wpTextbox1.value; document.editform.wpSummary.value = 'This page has been proposed for deletion and will be deleted in 5 days if no one objects.'; document.getElementById('wpSave').click(); document.getElementById('wpWatchthis').checked = "true"; } addOnloadHook(function(){ prodspec(); }); } //Check if it's article to add the tab if(mw.config.get('wgCanonicalNamespace') == "") { addOnloadHook(function(){ var taburl = "http://en.wikipedia.org/search/?title="+mw.config.get('wgPageName')+"&action=edit&prodspec=1"; addTab(taburl, "Prod!", "ca-prodspec", "This PRODs articles"); }); }