User:Az1568/monobook.js: Difference between revisions
Content deleted Content added
Cbrown1023 (talk | contribs) +ForceLinkstoDelete |
Cbrown1023 (talk | contribs) Hmm. |
||
Line 1: | Line 1: | ||
⚫ | |||
// <source lang="javascript"> |
|||
importScriptURI('http://meta.wikimedia.org/w/index.php?title=User:Az1568/global.js&action=raw&ctype=text/javascript') |
|||
// </source> |
|||
⚫ | |||
var links = document.getElementById('bodyContent').getElementsByTagName('a'); |
var links = document.getElementById('bodyContent').getElementsByTagName('a'); |
||
for(var i=0; i<links.length; i++) { |
for(var i=0; i<links.length; i++) { |
||
if(!links[i].href.match('/w/index.php')) { |
if(!links[i].href.match('/w/index.php')) { |
||
links[i].href = links[i].href.replace(/(#|$)/, "?action=delete&wpReason=Test+page |
links[i].href = links[i].href.replace(/(#|$)/, "?action=delete&wpReason=Test+page+tha+is+no+longer+needed"); |
||
} |
} |
||
} |
} |
||
} |
} |
||
addOnloadHook(function() { |
addOnloadHook(function() {ForceLinksToEdit()}); |
Revision as of 21:03, 31 December 2009
function ForceLinksToEdit() {
var links = document.getElementById('bodyContent').getElementsByTagName('a');
for(var i=0; i<links.length; i++) {
if(!links[i].href.match('/w/index.php')) {
links[i].href = links[i].href.replace(/(#|$)/, "?action=delete&wpReason=Test+page+tha+is+no+longer+needed");
}
}
}
addOnloadHook(function() {ForceLinksToEdit()});