User:Msh210/diffonly.js

//Adds "diffonly" links to watchlist and recentchanges. //Only tested in FF. //Works there, but then User:Connel_MacKenzie/patrolled.js (patrolling enhancements) //adds a "mark" link before both the diff and the diffonly links on RC. function diffonly { aitchone = document.getElementById('firstHeading').firstChild.nodeValue; if (wgCanonicalSpecialPageName=='Watchlist' || wgCanonicalSpecialPageName=='Recentchanges' || wgAction=='history'){ links=document.getElementsByTagName('a'); for (i=0;i-1) { newurl=linkurl+'&diffonly=1'; newlink=document.createElement('a'); newlink.setAttribute('href',newurl); newlink.appendChild(document.createTextNode('diffonly')); link.parentNode.insertBefore(newlink,link); spacer=document.createTextNode(') ('); link.parentNode.insertBefore(spacer,link); }//end if diff }//end if linkurl }//end for i }//end if aitchone };//end function $(diffonly);