mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Start on popup
This commit is contained in:
parent
11efa42e4c
commit
91255463c6
6 changed files with 87 additions and 16 deletions
12
proxy/webext/popup.js
Normal file
12
proxy/webext/popup.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
const port = chrome.runtime.connect({
|
||||
name: "popup"
|
||||
});
|
||||
|
||||
port.onMessage.addListener((m) => {
|
||||
const active = m.active;
|
||||
const div = document.getElementById('active');
|
||||
const img = div.querySelector('img');
|
||||
img.src = `icons/status-${active ? "on" : "off"}.png`;
|
||||
const p = div.querySelector('p');
|
||||
p.innerText = active ? "Connected" : "Offline";
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue