NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name worldometer-corona-deaths-per-million-added // @namespace http://tampermonkey.net/ // @version 0.1 // @description adds column for deaths per 1 million of population // @author You // @match https://www.worldometers.info/coronavirus/ // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; var spalteNeu = document.createElement('th'); spalteNeu.width = '30;'; spalteNeu.innerHTML = 'Tot Deaths/<br />1M pop'; document.getElementById('main_table_countries_today').getElementsByTagName('thead')[0].getElementsByTagName('tr')[0].appendChild(spalteNeu); var anzahl = document.getElementById('main_table_countries_today').getElementsByTagName('tbody')[0].getElementsByTagName('tr').length; var i = 0; while (i < anzahl) { var cases0 = document.getElementById('main_table_countries_today').getElementsByTagName('tbody')[0].getElementsByTagName('tr')[i].getElementsByTagName('td')[1].innerHTML; var deaths0 = document.getElementById('main_table_countries_today').getElementsByTagName('tbody')[0].getElementsByTagName('tr')[i].getElementsByTagName('td')[3].innerHTML; var casespm0 = document.getElementById('main_table_countries_today').getElementsByTagName('tbody')[0].getElementsByTagName('tr')[i].getElementsByTagName('td')[8].innerHTML; cases0 = cases0. replace(",", ""); deaths0 = deaths0. replace(",", ""); casespm0 = casespm0. replace(",", ""); cases0 = parseInt(cases0); deaths0 = parseInt(deaths0); casespm0 = parseInt(casespm0); var deathspm0 = (casespm0/cases0)*deaths0; deathspm0 = deathspm0.toFixed(2); var eintrag0 = document.createElement('td'); eintrag0.innerHTML = deathspm0; eintrag0.style.fontWeight = "bold"; eintrag0.style.textAlign = "right"; document.getElementById('main_table_countries_today').getElementsByTagName('tbody')[0].getElementsByTagName('tr')[i].appendChild(eintrag0); i++; } })();