forked from imkrishnasarathi/PleasantWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
14 lines (13 loc) · 672 Bytes
/
script.js
File metadata and controls
14 lines (13 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// It will update the extension dashboard
document.addEventListener("DOMContentLoaded", function() {
chrome.runtime.sendMessage({ target: "getStorageData" }, response => {
console.log('Script.js: ', response);
if (response.length > 0) {
let strHtml = "";
response.forEach(data => {
strHtml += `<tr><td>${data.date}</td><td>${data.score !== null?data.score:"There was some problem getting the score"}</td><td style="text-align: center">${data.status==="Inappropriate"?"⚠️":"✅"}</td><td>${(data.url).trim()}</td></tr>`;
});
document.getElementById("storeDataBody").innerHTML = strHtml;
}
});
});