User:Ais523/filternewpage.js

From Wikipedia, the free encyclopedia

Note: After saving, you have to bypass your browser's cache to see the changes. Mozilla/Safari: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Internet Explorer: press Ctrl-F5, Opera/Konqueror: press F5.

addOnloadHook(function(){
  if(wgPageName=="Special:Newpages") addTab("javascript:filternewpages()","filter >=3000","ca-fnp","filter >=3000","");
});

function filternewpages()
{
  var a=document.body.getElementsByTagName("LI");
  var i,j;
  i=a.length;
  while(i--)
  {
    if(a[i].innerHTML.indexOf(" bytes]")!=-1)
    {
      j=a[i].innerHTML.split(" bytes]")[0].split("[")[1];
      if(new Number(j.split(",").join(""))<3000) a[i].style.display="none";
    }
  }
}