Jump to content

User:Ais523/filternewpage.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
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";
    }
  }
}