-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlist-tlds-fav.js
1 lines (1 loc) · 1.15 KB
/
list-tlds-fav.js
1
javascript: (async function(){let e=[],t=!1,a=0;for(;!t;){const n=await fetch("https://www.namebase.io/api/user/domains/not-listed/"+a+"?sortKey=acquiredAt&sortDirection=desc&limit=100",{credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"max-age=0"},referrer:"https://www.namebase.io/manage/owned?page=1",method:"GET",mode:"cors"}),o=(await n.json()).domains.map(e=>e.name);e=e.concat(o),0===o.length?t=!0:(a+=o.length,await new Promise(e=>setTimeout(()=>e(),1250)))}for(await new Promise(e=>setTimeout(()=>e(),1250)),t=!1,a=0;!t;){const n=await fetch("https://www.namebase.io/api/user/domains/listed/"+a+"?limit=100",{credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json","Cache-Control":"max-age=0"},referrer:"https://www.namebase.io/manage/owned?page=1",method:"GET",mode:"cors"}),o=(await n.json()).domains.map(e=>e.name);e=e.concat(o),0===o.length?t=!0:(a+=o.length,await new Promise(e=>setTimeout(()=>e(),1250)))}const n=document.createElement("a");n.href="data:text/txt;charset=utf-8,"+encodeURI(e.join("\n")),n.target="_blank",n.download="domains.txt",n.click(),n.remove()})()