Revision as of 17:57, 10 September 2006 view sourceBetacommand (talk | contribs)86,927 editsNo edit summary← Previous edit |
Revision as of 18:27, 10 September 2006 view source Betacommand (talk | contribs)86,927 edits finished Myspace removal codeNext edit → |
Line 1: |
Line 1: |
|
//Written by ], thanks to ] and ] for help with this! |
|
//Written by ], thanks to ] and ] for help with this! |
|
|
//Modified by ] with help from ] |
|
// BEGIN STUBREMOVE CODE |
|
// BEGIN MYSPACE LINK REMOVAL CODE |
|
//check if we are editing and we want to stubfix |
|
//check if we are editing and we want to myspace |
|
if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('stubfix=1') != -1) { |
|
if (window.location.href.indexOf('action=edit') != -1 && window.location.href.indexOf('myspace=1') != -1) { |
|
function stubfix() { |
|
function myspace() { |
|
document.getElementById('wpSummary').value = "Removing Myspace link as unverifiable"; |
|
document.getElementById('wpSummary').value = "Removing Myspace link as unverifiable"; |
|
var contents = document.getElementById('wpTextbox1').value; |
|
var contents = document.getElementById('wpTextbox1').value; |
Line 11: |
Line 12: |
|
document.getElementById('wpWatchthis').checked = ""; |
|
document.getElementById('wpWatchthis').checked = ""; |
|
} |
|
} |
|
addOnloadHook(function(){ stubfix(); }); |
|
addOnloadHook(function(){ myspace(); }); |
|
} |
|
} |
|
//Check if it's article to add the tab |
|
//Check if it's article to add the tab |
|
if(wgCanonicalNamespace == "") { |
|
if(wgCanonicalNamespace == "") { |
|
addOnloadHook(function(){ |
|
addOnloadHook(function(){ |
|
var taburl = "http://en.wikipedia.org/search/?title="+wgPageName+"&action=edit&stubfix=1"; |
|
var taburl = "http://en.wikipedia.org/search/?title="+wgPageName+"&action=edit&myspace=1"; |
|
addTab(taburl, "Remove Myspace!", "ca-stubfix", "This is to kill Myspace Links"); |
|
addTab(taburl, "Remove Myspace!", "ca-myspace", "This is to kill Myspace Links"); |
|
}); |
|
}); |
|
} |
|
} |
|
//END STUBREMOVE CODE |
|
//END MYSPACE LINK REMOVAL CODE |