mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -04:00
Control statusimg using CSS, rather than setting an img src.
This commit is contained in:
parent
8f885c7557
commit
990047b2f5
5 changed files with 29 additions and 9 deletions
|
@ -9,7 +9,8 @@ port.onMessage.addListener((m) => {
|
|||
const popup = new Popup();
|
||||
|
||||
if (missingFeature) {
|
||||
popup.setImgSrc('off');
|
||||
popup.setEnabled(false);
|
||||
popup.setActive(false);
|
||||
popup.setStatusText("Snowflake is off");
|
||||
popup.setStatusDesc("WebRTC feature is not detected.", true);
|
||||
popup.hideButton();
|
||||
|
@ -29,8 +30,8 @@ port.onMessage.addListener((m) => {
|
|||
popup.setStatusText("Snowflake is off");
|
||||
popup.setStatusDesc("");
|
||||
}
|
||||
|
||||
popup.setImgSrc(active ? "running" : enabled ? "on" : "off");
|
||||
popup.setEnabled(enabled);
|
||||
popup.setActive(active);
|
||||
});
|
||||
|
||||
document.addEventListener('change', (event) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue