summaryrefslogtreecommitdiffstats
path: root/addon_firefox/whyrejectme/log.js
blob: e3f7d3f0d313425cb426291f8f8e63da55c6a88b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function newrow(w) {
	let tt = document.getElementsByTagName('tbody')[0];
	let tr = tt.insertRow(tt.rows.length);
	tr.innerHTML = w;
}

newrow('<tr><td><b>FQDN</b></td><td><b>Server</b></td><td><b>Code</b></td><td><b>Where</b></td><td><b>When</b></td></tr>');

browser.runtime.sendMessage('get').then(g => {
	for (let k in g) {
		newrow('<tr><td>' + k + '</td><td>' + g[k][1] + '</td><td>' + g[k][2] + '</td><td><a href="' + g[k][0] + '" rel="noreferrer" target="_blank">Link</a></td><td>' + g[k][3] + '</td></tr>');
		document.getElementById('export').innerHTML += k + "\n";
	}
});

document.body.style.display = 'block';

document.getElementById('clear').addEventListener('click', () => {
	browser.runtime.sendMessage('clear').then(() => {
		location.reload(true);
	});
});