Wikipedia:WikiProject User scripts/Scripts/Revert tools: Difference between revisions

Content deleted Content added
Usage: (Fixed spelling of vandalism)
Miketm (talk | contribs)
move to talk
Line 1:
/*<pre>*/
On diff pages this script replaces ''(Difference between revisions)'' with different tools for reverting the edit and warning the user that made the edit.
//On diff pages this script replaces ''(Difference between revisions)''with
{|border="1" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; font-size: 95%;"
On diff pages this script replaces ''(Difference between revisions)'' with //different tools for reverting the edit and warning the user that made the edit.
!Name
//For instructions see talk page.
!Version
!Description
!Skins
!Author
|-
|'''Revert tools'''
|1.0
|Displays links to revert an edit when viewing a diff page
|MonoBook
|[[User:Lorian|Lorian]]
|-
|
|1.1
|Edits by [[User:Konman72|Konman72]], see talk page
|MonoBook
|[[User:Konman72|Konman72]]
|}
 
==Installation instructions==
 
To install the script:
 
* Go to [[Special:Mypage/monobook.js]] and click on edit.
* Copy/Paste the following script into the edit box, and save. Follow the displayed instruction to bypass your browser cache.
 
==Code==
 
===JavaScript===
 
<pre>
// Revert tools by Lorian
function getElementsByClass(searchClass,node,tag) {
Line 108 ⟶ 79:
}
});
/*</pre>*/
 
==Usage==
 
Go to any diff page and these links will be placed at the top under "From Wikipedia, the free encyclopedia".
:(Revert / Message) (Vandalism / Message) (Warn: Test / Blatant / Nonsense / Blanking)
 
* '''Revert:''' Will revert the edit and put this in the edit summary: Reverted edits by [user] to version [version] by [user].
* '''Message:''' Displays a dialogue box for you to enter a message (Ie. Why you reverted it) and will put it in backets after the "Reverted edits..." bit.
 
* '''Vandalism/Message:''' Does the same as above but displays "Reverted vandalism" instead of "Reverted edits".
 
* '''Warnings:''' Will subst the relevant warnings on the editors talk page.