better typing

This commit is contained in:
sose 2021-04-06 01:44:38 +00:00
parent d1757f48bf
commit bea705dda9
1 changed files with 5 additions and 5 deletions

10
sk0r.js
View File

@ -30,7 +30,7 @@ function update_scores(hltv_url) {
var event_name;
var start_time;
var link;
var link = "";
var stars;
var lan;
var team_names = [];
@ -52,14 +52,14 @@ function update_scores(hltv_url) {
}
if (grandparent.className.includes("hotmatch-box")) {
stars = parent.getAttribute("stars");
lan = parent.getAttribute("lan");
stars = Number(parent.getAttribute("stars"));
lan = Boolean(parent.getAttribute("lan"));
link = grandparent.getAttribute("href");
event_name = grandparent.getAttribute("title")
start_time = "LIVE"
} else if (grandparent.className.includes("col-box-con result-box")) {
stars = grandparent.getAttribute("stars");
lan = grandparent.getAttribute("lan");
stars = Number(grandparent.getAttribute("stars"));
lan = Boolean(grandparent.getAttribute("lan"));
link = grandparent.getAttribute("href");
event_name = parent.previousElementSibling.getAttribute("title");
start_time = "OVER"