@@ -97,7 +97,7 @@ module.exports = exports =
safeRegex: (expr) ->
try
new RegExp(expr)
- catch
+ catch _
# Invalid regexp! Fall back to a regexp that does not match anything.
/(?!)/
@@ -27,7 +27,7 @@ describe 'Profiles', ->
chai.assert.equal(matchResult.source, expected.source)
else
chai.assert.deepEqual(matchResult, expected)
printResult = JSON.stringify(matchResult)
msg = ("expect profile to return #{JSON.stringify(expected)} " +
"instead of #{printResult} for request #{o_request}")
@@ -8,7 +8,7 @@ Log = OmegaTargetCurrent.Log
_writeLogToLocalStorage = (content) ->
localStorage['log'] += content
# Maybe we have reached our limit here. See #1288. Try trimming it.
localStorage['log'] = content
@@ -13,7 +13,7 @@ module.exports = class ChromePort
@postMessage = (args...) =>
@port.postMessage(args...)
return
@onMessage = new TrackedEvent(@port.onMessage)
@@ -46,7 +46,7 @@ module.exports = (details, options, fixedProfileConfig) ->
[profileName, revision] = tokens
profileName = JSON.parse(profileName)
profileName = null
if profileName and revision
profile = OmegaPac.Profiles.byName(profileName, options)
@@ -52,6 +52,6 @@ module.exports = class SwitchySharp
@port?.onMessage.addListener(@_onMessage.bind(this))
@port.postMessage({action: 'disable'})
@port = null
return @port?
@@ -88,7 +88,7 @@ class ChromeTabs
_chromeSetIcon: (params) ->
chrome.browserAction.setIcon?(params, @ignoreError)
# Some legacy Chrome versions will panic if there are other icon sizes.
params.imageData = {19: params.imageData[19], 38: params.imageData[38]}
@@ -248,7 +248,7 @@ class Options
Buffer = require('buffer').Buffer
options = new Buffer(options, 'base64').toString('utf8')
options = null
options = try JSON.parse(options)
if not options
@@ -10,5 +10,5 @@ angular.module('omega').controller 'AboutCtrl', ($scope, $rootScope,
$scope.version = omegaDebug.getProjectVersion()
$scope.version = '?.?.?'
@@ -196,7 +196,7 @@ angular.module('omega').controller 'SwitchProfileCtrl', ($scope, $rootScope,
if condition.conditionType.indexOf('Regex') >= 0
new RegExp(pattern)
return false
return true