Coronavirus stats: worldwide country position bookmarklet
Janko

Janko @jankoweb

About: Idealist, automatization and productivity lover. Love to teach and improve the World.

Location:
Prague, Czechia
Joined:
Nov 24, 2020

Coronavirus stats: worldwide country position bookmarklet

Publish Date: Jan 6 '21
0 0
javascript:
void( 
document.body.onclick = async function (event) {
 event = event || window.event;
 var element = event.target || event.srcElement;
 await new Promise(resolve => setTimeout(resolve, 10));
 state = 'Czechia'; /* CHANGE THIS TO SEE OTHER STATE */
 index = document.body.innerText.search(state);
 place = document.body.innerText.substring(index - 4,index).match(/\n([0-9]+)/);
 alert(state + ' is #' + place[1] + ' in ' + element.textContent + ' worldwide.')} );
Enter fullscreen mode Exit fullscreen mode

Simply add this code in place of a bookmark URL - Alt Text

Go to https://www.worldometers.info/coronavirus/ and click this bookmark. Then - when you click on the first row of the data table with data
Alt Text
the bookmarklet will show you the position of the selected country (see in code)
Alt Text

Comments 0 total

    Add comment