-
Notifications
You must be signed in to change notification settings - Fork 5
/
popup.js
35 lines (25 loc) · 871 Bytes
/
popup.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
29
30
31
32
33
34
document.addEventListener("DOMContentLoaded", function () {
let template = '';
chrome.runtime.sendMessage("hello!", function ({patternObject,defaultOperator,errors}) {
// alert(JSON.stringify(errors))
template += `
<tr>
<td>${defaultOperator}r</td>
<td>null</td>
<td style="max-width: 20px;">null</td>
<td>*special* resets all parameters</td>
</tr>
`
for (line in patternObject) {
template += `
<tr>
<td>${defaultOperator}${patternObject[line].operator}</td>
<td>${patternObject[line].query}</td>
<td style="max-width: 20px;">${patternObject[line].param}</td>
<td>${patternObject[line].info}</td>
</tr>
`
}
document.getElementById("tdata").innerHTML = template
});
});