let create= (x)=> document.createElement(x),
select= (x,y=document)=> y.querySelector(x),
selectAll= (x,y=document)=> y.querySelectorAll(x);


let old= /(ak-radio|creative-radio|radio-ishara|rasonic-radio|apintie|anda-suriname|abcsuriname|immanuel|suriname-bollywood-radio|tzgospel-swahilir7kghb24kfhvv|doublebradio-boeskondee-media|assalaam-radio|sam-taki-radio|asosye-media|djbadjho-radio|fandaaki-paanzu-radio|koyeba-media|RadioFanDaLibi|radio-makandi|avs-radio|radio-totness|lime-radio|radio-bollywood-suriname|radiosrs|afonsoewa-famii-gospel-radio|abc-live-stream|asosye-radio|dc-suriradio|doubleb-radio2|radio-shruti|joyce-the-voice|djregi|asosye|olilies-online-radio|radio-sargam|tamanredjo-talents-radio-jawa|lime-radio-suriname|color-radio-suriname|radio-804|suri-lite-radio|govradio-suriname|lil-b-media|dtvexpress|avs-radio-classic|Paw-matu-radio)\/$/;

let error= /(bombelman|creative-radio|famii-gospel-radio|jesherun-radio|pararadio|ria-fm|radio-boskopu-93-5-fm|red-shiloh-music-suriname|smk-tv-saamaka-tv|stichting-radio-boskopu-suriname-93-5-fm|blackboyzmusicradio|jongeren-van-kracht|avs-radio-bollywood)\/$/;



let links= selectAll("a[itemprop='url']");
links= [...links].map(i=>{
let a= create("a");
if(old.test(i.href)){
a.className="old";
}
else if(error.test(i.href)){
a.className="error";
}
else a.className="new";

a.href= i.href;
a.text= i.href;
return a.outerHTML;
});



function newTab(txt,div){
let a= div ? create("div") : create("textarea");
a.innerHTML= txt;
//a.contentEditable= true;
a.id= "newtab";
let b= create("style");
b.innerHTML=`#newtab{
overflow: auto;
width:98vw; height: 150vw;
border: 2px solid black; margin: 0;
padding: 10px; font: 14px Arial
}

a{
text-decoration: none;
margin-bottom: 20px;
}

a:visited{
color: blue;
}

.error{
background: pink;
}
.new{
background: yellow;
}`;

window.open().document.body.append(a,b);
}



newTab(links.join("<br>"),"div");
