User:Waldyrious/sinceContribs.js

function addSinceLinks { var ul = document.getElementById("contentSub").nextElementSibling.nextElementSibling.nextElementSibling.nextElementSibling; for(i=0; i<ul.children.length; i++) { h = ul.children[i].children[3].text ? ul.children[i].children[3] : ul.children[i].children[2]; pipe = document.createTextNode("\u00a0| "); cur = ul.children[i].children[1].cloneNode(true); cur.href = cur.href.concat("&diff=cur"); cur.text = "cur"; ul.children[i].insertBefore(cur,h); ul.children[i].insertBefore(pipe,h); } }

if (mw.config.get('wgCanonicalSpecialPageName') == 'Contributions' && mw.config.get('wgAction') == 'view') mw.util.addPortletLink('p-cactions', 'javascript: addSinceLinks', '+cur', 'ca-addcur',                "Add links to see the changes since your laste edit", '');