(ghosts)
| 78 | } |
| 79 | |
| 80 | function monitorInGameStatus(ghosts) { |
| 81 | var currentArea = null; |
| 82 | var monitor = setInterval(() => { |
| 83 | GM.xmlHttpRequest({ |
| 84 | method: "GET", |
| 85 | url: "https://steamcommunity.com/miniprofile/" + STEAMID3 + "?t=" + Date.now(), |
| 86 | onload: (response) => { |
| 87 | var html = response.responseText; |
| 88 | var parser = new DOMParser(); |
| 89 | var doc = parser.parseFromString(html, "text/html") |
| 90 | var area = getD2Area(doc); |
| 91 | if (!area || currentArea === area) { return; } |
| 92 | |
| 93 | console.log(area); |
| 94 | currentArea = area; |
| 95 | pickGhost(ghosts, area); |
| 96 | } |
| 97 | }); |
| 98 | }, INTERVAL * 1000); |
| 99 | } |
| 100 | |
| 101 | function doubleClick(elem) { |
| 102 | var event = new MouseEvent("dblclick", { |
no test coverage detected