User:Colin M/scripts/HideZeroSumEdits.js

/* Mark watchlist entries with garish teal bg if: - their net delta is 0 - they involve at least one edit tagged undo or rollback

Can also hide the entries entirely if desired (I'm using the colored bg for now for debugging) if (mw.config.values.wgCanonicalSpecialPageName === 'Watchlist') { const watchlist_container = document.querySelector('.mw-changeslist'); const nulls = watchlist_container.querySelectorAll('tbody > tr.mw-tag-mw-undo:first-child .mw-plusminus-null,tbody > tr.mw-tag-mw-rollback:first-child .mw-plusminus-null'); nulls.forEach(span => {		const row = span.closest('table'); // neat		row.style.backgroundColor = '#99ffee';		// Alternatives...		// Faded out		//row.style.opacity = 0.5;		// Hidden entirely		//row.style.display = 'none';	}); console.log('Marked ', nulls.length, ' watchlist entries as zero-sum'); }