Do not try to connect to SwitchySharp when running under moz-. Fix #1503.

This commit is contained in:
FelisCatus 2018-06-12 12:23:30 -07:00
parent d20be4fd1b
commit 7c271f13e4

View File

@ -8,7 +8,8 @@ module.exports = class SwitchySharp
port: null
monitor: (action) ->
if not port? and not @_monitorTimerId
return if location.href.substr(4) == 'moz-'
if not port? and not @_monitorTimerId?
@_monitorTimerId = setInterval @_connect.bind(this), 5000
if action != 'reconnect'
@_connect()