-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add [restore this version] link when viewing old revisions #131
Comments
It's so good to have TW compiled with MediaWiki. |
It would be nice to have:
However, I am hesitant to implement the first one. At the moment you are forced to look at the diff, to check the contents of the edit, before rolling it back. This is probably a good thing. When a user is experienced enough to not need to check the diff, they should request "real" rollback. |
Atlight - I agree, though unfortunately rollback isn't always given out so easily, I find that user rights on at least the english wikipedia are given out after a very ridiculously large amount of work. And anyway, if an edit is clearly vandalism without needing to look at the diff page (for example - section/article blanking is always evident on the edit explanation), it would be good to have rollbacks on history pages. |
Closes wikimedia-gadgets#131 Checking for wgDiffOldId and wgDiffNewId excludes Special:Undelete, and so should be sufficient to avoid problematic diffs. Some of the logic/checks may be a tad confusing since wgDiffNewId and wgDiffOldId have different behaviors (see [[phab:T214985]]). One advantage of the restructuring is that [restore this revision] will now appear when viewing the first revision as a diff with diff=prev, as may sometimes happen. One thing to note is that when viewing old revisions, checking for div#mw-revision-info sufficiently prevents the link from appearing on the most recent revision, since div#mw-revision-info-current is used instead. However, that is only the case if there is anything present at [[MediaWiki:Revision-info-current]], elsewise the fallback is to use div#mw-revision-info; this may have issues for other wikis if that page doesn't exist. Moreover, unlike revisionasof, [$3 in revision-info](https://translatewiki.net/wiki/MediaWiki:Revision-info/qqq) doesn't expose a link we can capture, hence the imperfect Morebits.query('oldid') is the best we can do.
Closes wikimedia-gadgets#131 Checking for wgDiffOldId and wgDiffNewId excludes Special:Undelete, and so should be sufficient to avoid problematic diffs. Some of the logic/checks may be a tad confusing since wgDiffNewId and wgDiffOldId have different behaviors (see [[phab:T214985]]). One advantage of the restructuring is that [restore this revision] will now appear when viewing the first revision as a diff with diff=prev, as may sometimes happen. One thing to note is that when viewing old revisions, checking for div#mw-revision-info sufficiently prevents the link from appearing on the most recent revision, since div#mw-revision-info-current is used instead. However, that is only the case if there is anything present at [[MediaWiki:Revision-info-current]], elsewise the fallback is to use div#mw-revision-info; this may have issues for other wikis if that page doesn't exist. Moreover, unlike revisionasof, [$3 in revision-info](https://translatewiki.net/wiki/MediaWiki:Revision-info/qqq) doesn't expose a link we can capture, hence the imperfect Morebits.query('oldid') is the best we can do.
Closes wikimedia-gadgets#131 Checking for wgDiffOldId and wgDiffNewId excludes Special:Undelete, and so should be sufficient to avoid problematic diffs. Some of the logic/checks may be a tad confusing since wgDiffNewId and wgDiffOldId have different behaviors (see [[phab:T214985]]). One advantage of the restructuring is that [restore this revision] will now appear when viewing the first revision as a diff with diff=prev, as may sometimes happen. One thing to note is that when viewing old revisions, checking for div#mw-revision-info sufficiently prevents the link from appearing on the most recent revision, since div#mw-revision-info-current is used instead. However, that is only the case if there is anything present at [[MediaWiki:Revision-info-current]], elsewise the fallback is to use div#mw-revision-info; this may have issues for other wikis if that page doesn't exist. Moreover, unlike revisionasof, [$3 in revision-info](https://translatewiki.net/wiki/MediaWiki:Revision-info/qqq) doesn't expose a link we can capture, hence the imperfect Morebits.query('oldid') is the best we can do.
Closes wikimedia-gadgets#131 Checking for wgDiffOldId and wgDiffNewId excludes Special:Undelete (where they are each 0), and so should be sufficient to avoid problematic diffs. One advantage of the restructuring is that [restore this revision] will now appear when viewing the first revision as a diff with diff=prev and will not appear on the left-hand revision when viewing the latest revision with diff=cur, as may sometimes happen. Similarly, revert or restore links should no longer appear on single-revision pages. This makes some of the logic/checks a tad involved, as well as the fact that wgDiffNewId and wgDiffOldId have unbalanced behavior (see [[phab:T214985]]).
Closes wikimedia-gadgets#131 Checking for wgDiffOldId and wgDiffNewId excludes Special:Undelete (where they are each 0), and so should be sufficient to avoid problematic diffs. One advantage of the restructuring is that [restore this revision] will now appear when viewing the first revision as a diff with diff=prev and will not appear on the left-hand revision when viewing the latest revision with diff=cur, as may sometimes happen. Similarly, revert or restore links should no longer appear on single-revision pages. This makes some of the logic/checks a tad involved, as well as the fact that wgDiffNewId and wgDiffOldId have unbalanced behavior (see [[phab:T214985]]).
For wikipedia, twinkle only shows rollback options on select diff pages and contributions pages. Is there a way to have the 3 rollback buttons in other locations, such as the 'revision history/view history' section of an article? That would be very handy. Not sure if the coding makes this possible or if this all has been done before as I remember something like this in the past, though I'm not sure. Thanks anyway.
The text was updated successfully, but these errors were encountered: