User:Msh210/diffonly.js

Hello, you have come here looking for the meaning of the word User:Msh210/diffonly.js. In DICTIOUS you will not only get to know all the dictionary meanings for the word User:Msh210/diffonly.js, but we will also tell you about its etymology, its characteristics and you will know how to say User:Msh210/diffonly.js in singular and plural. Everything you need to know about the word User:Msh210/diffonly.js you have here. The definition of the word User:Msh210/diffonly.js will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofUser:Msh210/diffonly.js, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
//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<links.length;i+2) {
   link=links;
   nextnode=link.nextSibling;
   linkurl=link.getAttribute('href');
   if (linkurl) {
    if (linkurl.indexOf('&diff=')>-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);