diff --git a/proxy/ui.coffee b/proxy/ui.coffee index e316e54..f9361ea 100644 --- a/proxy/ui.coffee +++ b/proxy/ui.coffee @@ -98,3 +98,7 @@ class WebExtUI extends UI super connected if connected then @stats[0] += 1 @postActive() + if @active + chrome.browserAction.setIcon + path: + 32: "icons/status-running.png" diff --git a/proxy/webext/icons/status-running.png b/proxy/webext/icons/status-running.png new file mode 100644 index 0000000..96ff7b2 Binary files /dev/null and b/proxy/webext/icons/status-running.png differ diff --git a/proxy/webext/icons/status-running.svg b/proxy/webext/icons/status-running.svg new file mode 100644 index 0000000..4cc9602 --- /dev/null +++ b/proxy/webext/icons/status-running.svg @@ -0,0 +1,11 @@ + + + + status-on + Created with Sketch. + + + + + + diff --git a/proxy/webext/popup.js b/proxy/webext/popup.js index c447b86..977f6a2 100644 --- a/proxy/webext/popup.js +++ b/proxy/webext/popup.js @@ -16,6 +16,9 @@ port.onMessage.addListener((m) => { enabledText.innerText = 'Turn Off'; ps[0].innerText = `${clients} client${(clients !== 1) ? 's' : ''} connected.`; ps[1].innerText = `Your snowflake has helped ${m.total} user${(m.total !== 1) ? 's' : ''} circumvent censorship in the last 24 hours.`; + if (active) { + img.src = `icons/status-running.png`; + } } else { ps[0].innerText = "Snowflake is off"; ps[1].innerText = "";