User:Cizagna/forumtools.js

//See user page for more info. if(wgCanonicalNamespace=='Forum') addOnloadHook(forumTools) function forumTools { var titles = getElementsByClassName(document, 'td', 'forum_title'); if(titles.length==0) return; addTabForXSkin('ca-frune','javascript:forumPrune','show just forum topic links','F-only') }

function forumPrune { var ftable = getElementsByClassName(document, 'table', 'forumlist'); var links = ftable[0].getElementsByTagName('a'); for(var i=0;i < links.length;i++) { if(links[i].parentNode.className!='forum_title') { links[i].parentNode.removeChild(links[i]); }	} }