User:Erutuon/scripts/oldRevisionClass.js

/*	Adds a class to the body tag when we are viewing an old revision. Created after discussion at Beer parlour/2017/May.



var latestRevision = mw.config.values.wgCurRevisionId; var viewedRevision = mw.config.values.wgRevisionId; var namespaceNumber = mw.config.values.wgNamespaceNumber;

if ( namespaceNumber > -1 && latestRevision !== viewedRevision ) $("body").addClass("old-revision");