Skip to content

Instantly share code, notes, and snippets.

@TaylorHo
Created March 19, 2024 01:02
Show Gist options
  • Save TaylorHo/662e05719599ba8a74a0e6a0639f3dc2 to your computer and use it in GitHub Desktop.
Save TaylorHo/662e05719599ba8a74a0e6a0639f3dc2 to your computer and use it in GitHub Desktop.
Speeeed
(()=>{let e=0;const t=document.querySelector("#startStopBtn");let n=setInterval((()=>{if(!t.classList.contains("running")){let o=document.querySelector("#dlText")?.innerText,s=document.querySelector("#ulText")?.innerText,c=document.querySelector("#pingText")?.innerText;if(o&&s){const e=new Date,t=`${e.getHours()<10?"0"+e.getHours():e.getHours()}h${e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes()} aos ${e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds()}s`;console.log(`${t} - Download: ${o} Mbps | Upload: ${s} Mbps | Ping: ${c} ms`)}t.click(),e<100?e++:clearInterval(n)}}),100)})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment