User:Js/markZeroEdits

markZeroEdits
Browsers .
Skins *
Code markZeroEdits.js
Released April 8, 2008; 18 years ago (2008-04-08)
Updated May 8, 2022; 4 years ago (2022-05-08)
Developer   AlexSm

Script marks zero size collapsed edits (usually simple vandalism reversions) in Watchlist and Recent Changes.

   21:35 Article1 (3 changes) . . (+750) . . (Page history) [UserA‎; UserB‎; UserC]
   21:35 Article2 (2 changes) . . (0) . . (Page history) [10.1.2.3‎; ClueBot‎]
21:34 Article3 (diff; hist . . (-91) . . UserD (Talk I contribs)


Script only works on the above shown kind of watchlist/RC, which requires «Enhanced Recent Changes» and «Expand Watchlist» Preferences options.

How it works

  1. It finds all zero size collapsed edits and looks at the single edits inside.
  2. If edit(s) from one user are followed by one edit from another user with "revert/undo" edit summary, the collapsed edit is marked with revert-edit class, otherwise with zero-edit class.
  3. CSS code highlights these collapsed edits.

Installation

Add this to your monobook.js:

//[[user:js/markZeroEdits]]: highlight zero size collapsed edits
if ((mw.config.get('wgCanonicalSpecialPageName')=='Watchlist') || (mw.config.get('wgCanonicalSpecialPageName')=='Recentchanges'))
 importScript('user:js/markZeroEdits.js')

Optional parameters

mzTrustUnregRv = true //trust that undo edits made by IP users are reverts
mzTrustSelfRv = true  //trust that self-undo edits are reverts
mzMoveReverts = true  //move reverts to the bottom of the day
mzRevertRegExp //RegExp for proper undo/revert edit summary
 // default is /^(BOT[ -]*)?Reverted|^Reverting|^Undid revision /
mzCSS //CSS code to highlight edits according to classes above

//By default CSS is
mzCSS = 
'table.revert-edit * {color:#777799}' //mark reverts with blue-gray color
+'table.revert-edit td {text-decoration: line-through}' //and strike-through
+'table.zero-edit * {color:#777799}' //mark other zero edits with blue-gray color

If you use FireFox or Opera, you might want to use opacity instead of the grayish color, e.g. table.revert-edit * {opacity: 0.3}

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.