Wikipedia:WikiProject User scripts/Scripts/Revert tools: Difference between revisions
Content deleted Content added
Added my tool |
Edited script |
||
Line 12:
|MonoBook
|[[User:Lorian|Lorian]]
|-
|
|1.1
|Edits by [[User:Konman72|Konman72]], see talk page
|MonoBook
|[[User:Konman72|Konman72]]
|}
Line 62 ⟶ 68:
function getMessage (where, user1, user2) {
var message = prompt ('What message
window.___location = 'http://en.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&'+where+'=2&user1='+user1+'&user2='+user2+'&message='+message;
}
Line 73 ⟶ 79:
document.getElementById('contentSub').innerHTML = '(<a href="http://en.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&revert=1&user1='+user1+'&user2='+user2+'">Revert</a> / <a href="javascript:var message = getMessage(\'revert\', \''+user1+'\', \''+user2+'\');">Message</a>) (<a href="http://en.wikipedia.org/w/index.php?title=' + _GET['title'] + '&action=edit&oldid=' + _GET['oldid'] + '&vandalism=1&user1='+user1+'&user2='+user2+'">Vandalism</a> / <a href="javascript:var message = getMessage(\'vandalism\', \''+user1+'\', \''+user2+'\');">Message</a>) (Warn: <a href="http://en.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=1">Test</a> / <a href="http://en.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=2">Blatant</a> / <a href="http://en.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=3">Nonsense</a> / <a href="http://en.wikipedia.org/w/index.php?title=User_talk:'+user2+'&action=edit§ion=new&warn=4">Blanking</a>)';
} else if (___location.href.match(/revert=1/)) {
document.getElementById('wpSummary').value = 'Reverted edits by [[
document.getElementById('editform').submit();
} else if (___location.href.match(/revert=2/)) {
document.getElementById('wpSummary').value = 'Reverted edits by [[
document.getElementById('editform').submit();
} else if (___location.href.match(/vandalism=1/)) {
document.getElementById('wpSummary').value = 'Reverted vandalism by [[
document.getElementById('editform').submit();
} else if (___location.href.match(/vandalism=2/)) {
document.getElementById('wpSummary').value = 'Reverted vandalism by [[
document.getElementById('editform').submit();
} else if (___location.href.match(/warn=1/)) {
|