Loading proxy/init.coffee +2 −0 Original line number Original line Diff line number Diff line Loading @@ -58,6 +58,8 @@ init = () -> ui = new BadgeUI() ui = new BadgeUI() else if (document.getElementById('status') != null) else if (document.getElementById('status') != null) ui = new DebugUI() ui = new DebugUI() else if (document.getElementById('webext') != null) ui = new WebExtUI() else else ui = new UI() ui = new UI() Loading proxy/shims.coffee +3 −1 Original line number Original line Diff line number Diff line Loading @@ -5,7 +5,8 @@ WebRTC shims for multiple browsers. if module?.exports if module?.exports window = {} window = {} document = document = getElementById: () -> null, getElementById: () -> null chrome = {} location = '' location = '' if not TESTING? or not TESTING if not TESTING? or not TESTING Loading @@ -23,6 +24,7 @@ if module?.exports else else window = this window = this document = window.document document = window.document chrome = window.chrome location = window.location.search.substr(1) location = window.location.search.substr(1) PeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || PeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || Loading proxy/ui.coffee +9 −0 Original line number Original line Diff line number Diff line Loading @@ -42,3 +42,12 @@ class DebugUI extends UI # Scroll to latest # Scroll to latest @$msglog.value += msg + '\n' @$msglog.value += msg + '\n' @$msglog.scrollTop = @$msglog.scrollHeight @$msglog.scrollTop = @$msglog.scrollHeight class WebExtUI extends UI setActive: (connected) => chrome.browserAction.setIcon { "path": { "32": "icons/status-" + (if connected then "on" else "off") + ".png" } } proxy/webext/manifest.json +3 −3 Original line number Original line Diff line number Diff line Loading @@ -9,8 +9,8 @@ }, }, "browser_action": { "browser_action": { "default_icon": { "default_icon": { "16": "icons/status-off.png", "32": "icons/status-off.png" "32": "icons/status-off@2x.png" }, } "default_title": "Snowflake" } } } } proxy/webext/snowflake.html +1 −4 Original line number Original line Diff line number Diff line Loading @@ -8,9 +8,6 @@ </head> </head> <body> <body> <!-- FIXME: Refactor snowflake.js to eliminate the need for this --> <!-- FIXME: Refactor snowflake.js to eliminate the need for this --> <div> <div id="webext" /> <div id="status"></div> <textarea id="msglog" readonly></textarea> </div> </body> </body> </html> </html> Loading
proxy/init.coffee +2 −0 Original line number Original line Diff line number Diff line Loading @@ -58,6 +58,8 @@ init = () -> ui = new BadgeUI() ui = new BadgeUI() else if (document.getElementById('status') != null) else if (document.getElementById('status') != null) ui = new DebugUI() ui = new DebugUI() else if (document.getElementById('webext') != null) ui = new WebExtUI() else else ui = new UI() ui = new UI() Loading
proxy/shims.coffee +3 −1 Original line number Original line Diff line number Diff line Loading @@ -5,7 +5,8 @@ WebRTC shims for multiple browsers. if module?.exports if module?.exports window = {} window = {} document = document = getElementById: () -> null, getElementById: () -> null chrome = {} location = '' location = '' if not TESTING? or not TESTING if not TESTING? or not TESTING Loading @@ -23,6 +24,7 @@ if module?.exports else else window = this window = this document = window.document document = window.document chrome = window.chrome location = window.location.search.substr(1) location = window.location.search.substr(1) PeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || PeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || Loading
proxy/ui.coffee +9 −0 Original line number Original line Diff line number Diff line Loading @@ -42,3 +42,12 @@ class DebugUI extends UI # Scroll to latest # Scroll to latest @$msglog.value += msg + '\n' @$msglog.value += msg + '\n' @$msglog.scrollTop = @$msglog.scrollHeight @$msglog.scrollTop = @$msglog.scrollHeight class WebExtUI extends UI setActive: (connected) => chrome.browserAction.setIcon { "path": { "32": "icons/status-" + (if connected then "on" else "off") + ".png" } }
proxy/webext/manifest.json +3 −3 Original line number Original line Diff line number Diff line Loading @@ -9,8 +9,8 @@ }, }, "browser_action": { "browser_action": { "default_icon": { "default_icon": { "16": "icons/status-off.png", "32": "icons/status-off.png" "32": "icons/status-off@2x.png" }, } "default_title": "Snowflake" } } } }
proxy/webext/snowflake.html +1 −4 Original line number Original line Diff line number Diff line Loading @@ -8,9 +8,6 @@ </head> </head> <body> <body> <!-- FIXME: Refactor snowflake.js to eliminate the need for this --> <!-- FIXME: Refactor snowflake.js to eliminate the need for this --> <div> <div id="webext" /> <div id="status"></div> <textarea id="msglog" readonly></textarea> </div> </body> </body> </html> </html>