mirror of
https://git.sdf.org/deCloudflare/cloudflare-tor
synced 2024-12-27 14:52:55 +01:00
log.js
This commit is contained in:
parent
674a8318de
commit
0102823d93
@ -3,16 +3,36 @@ function newrow(w) {
|
|||||||
let tr = tt.insertRow(tt.rows.length);
|
let tr = tt.insertRow(tt.rows.length);
|
||||||
tr.innerHTML = w;
|
tr.innerHTML = w;
|
||||||
}
|
}
|
||||||
newrow('<tr><td><b>FQDN</b></td><td><b>Servilo</b></td><td><b>Stato</b></td><td><b>Kie</b></td><td><b>Kiam</b></td></tr>');
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
chrome.runtime.sendMessage('get', g => {
|
chrome.storage.local.get(['ul'], (r) => {
|
||||||
for (let k in g) {
|
fetch('i18n/' + (r.ul || 'eo') + '.json', {
|
||||||
newrow('<tr><td>' + k + '</td><td>' + g[k][1] + '</td><td>' + g[k][2] + '</td><td><a href="' + g[k][0] + '" rel="noreferrer noopener" target="_blank"> 🔗 </a></td><td>' + g[k][3] + '</td></tr>');
|
method: 'GET'
|
||||||
document.getElementById('export').innerHTML += k + "\n";
|
}).then(j => j.json()).then(j => {
|
||||||
}
|
document.querySelectorAll('span[transk]').forEach(x => {
|
||||||
});
|
x.innerText = j[x.getAttribute('transk')];
|
||||||
document.body.style.display = 'block';
|
});
|
||||||
document.getElementById('clear').addEventListener('click', () => {
|
newrow('<tr><td><b>FQDN</b></td><td><b>' + j['lj1'] + '</b></td><td><b>' + j['lj2'] + '</b></td><td><b>' + j['lj3'] + '</b></td><td><b>' + j['lj4'] + '</b></td></tr>');
|
||||||
chrome.runtime.sendMessage('clear', () => {
|
chrome.runtime.sendMessage('get', g => {
|
||||||
location.reload(true);
|
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 noopener" target="_blank"> 🔗 </a></td><td>' + g[k][3] + '</td></tr>');
|
||||||
|
document.getElementById('export').innerHTML += k + "\n";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
document.body.style.display = 'block';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
document.getElementById('clear').addEventListener('click', () => {
|
||||||
|
chrome.runtime.sendMessage('clear', () => {
|
||||||
|
location.reload(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
document.getElementById('myul').addEventListener('change', () => {
|
||||||
|
if (document.getElementById('myul').value != '') {
|
||||||
|
chrome.storage.local.set({
|
||||||
|
'ul': document.getElementById('myul').value
|
||||||
|
}, () => {
|
||||||
|
location.reload(true);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user