-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcovid.js
28 lines (28 loc) · 947 Bytes
/
covid.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
chrome.runtime.sendMessage({ type: "covid" }, function (response) {
$(
"body > div.d2l-page-main.d2l-max-width.d2l-min-width.d2l-home > div.d2l-page-main-padding > div.d2l-homepage > div > div.homepage-row > div > div.homepage-col-4"
).prepend(`
<div class="mcp-covid d2l-widget d2l-tile">
<h2>COVID-19</h2>
<p>${response.level}</p>
<table>
<tr>
<th></th>
<th>14 Days</th>
<th>Total</th>
</tr>
<tr>
<td>Students</td>
<td>${response.recentStudent}</td>
<td>${response.totalStudent}</td>
</tr>
<tr>
<td>Staff</td>
<td>${response.recentStaff}</td>
<td>${response.totalStaff}</td>
</tr>
</table>
<div class="mcp-covid-reminder">Remember to take your <a href="https://dailyhealth.rit.edu/?login=true" target="_blank">daily health screening</a>.</div>
</div>
`);
});