Wikipedia talk:WikiProject User scripts/Scripts/Revert tools: Difference between revisions
Content deleted Content added
No edit summary |
Fix for ''undo'' |
||
Line 120:
:Thanks for your contribution. :) --'''[[User:Lorian|Lorian]]'''<sup>[[User_talk:Lorian|T]]</sup><sub>[[Special:Contributions/Lorian|C]]</sub> 10:14, 5 August 2006 (UTC)
::Glad I could help, thanks for writing this thing in the first place ;) [[User:Konman72|Konman72]] 10:15, 5 August 2006 (UTC)
== Fix for ''undo'' ==
When reverting beyond the newest revision, the new undo option messes up the reported username. To fix, replace this line:
var user2 = getElementsByClass('diff-ntitle',null,'td'); user2 = user2[0].getElementsByTagName('a')[2].innerHTML;
with:
var user2 = getElementsByClass('diff-ntitle',null,'td');
if (user2[0].getElementsByTagName('a')[2].innerHTML == 'undo')
user2 = user2[0].getElementsByTagName('a')[3].innerHTML;
else
user2 = user2[0].getElementsByTagName('a')[2].innerHTML;
I will leave it to someone to double check this and/or improve it before modifying the code on the project page. Seems to work for me. Thanks for the script, working nicely -- will add my own auto-messages shortly ;). '''∴''' [[user:here|here]]…[[user_talk:here|♠]] 05:31, 8 December 2006 (UTC)
|