diff options
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/commands.coffee | 4 | ||||
| -rw-r--r-- | background_scripts/completion.coffee | 6 | ||||
| -rw-r--r-- | background_scripts/main.coffee | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 9c958461..db8cc60f 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -1,6 +1,6 @@ Commands = init: -> - for command, description of commandDescriptions + for own command, description of commandDescriptions @addCommand(command, description[0], description[1]) availableCommands: {} @@ -69,7 +69,7 @@ Commands = clearKeyMappingsAndSetDefaults: -> @keyToCommandRegistry = {} - @mapKeyToCommand { key, command } for key, command of defaultKeyMappings + @mapKeyToCommand { key, command } for own key, command of defaultKeyMappings # An ordered listing of all available commands, grouped by type. This is the order they will # be shown in the help page. diff --git a/background_scripts/completion.coffee b/background_scripts/completion.coffee index c880a26c..47cc2a23 100644 --- a/background_scripts/completion.coffee +++ b/background_scripts/completion.coffee @@ -301,7 +301,7 @@ class DomainCompleter performSearch: (queryTerms, onComplete) -> query = queryTerms[0] - domains = (domain for domain of @domains when 0 <= domain.indexOf query) + domains = (domain for own domain of @domains when 0 <= domain.indexOf query) domains = @sortDomainsByRelevancy queryTerms, domains onComplete [ new Suggestion @@ -439,7 +439,7 @@ class SearchEngineCompleter if queryTerms.length == 0 [] else - for _, suggestion of @previousSuggestions[searchUrl] + for own _, suggestion of @previousSuggestions[searchUrl] continue unless RankingUtils.matches queryTerms, suggestion.title # Reset various fields, they may not be correct wrt. the current query. extend suggestion, relevancy: null, html: null, queryTerms: queryTerms @@ -507,7 +507,7 @@ class SearchEngineCompleter postProcessSuggestions: (request, suggestions) -> return unless request.searchEngines - engines = (engine for _, engine of request.searchEngines) + engines = (engine for own _, engine of request.searchEngines) engines.sort (a,b) -> b.searchUrl.length - a.searchUrl.length engines.push keyword: null, description: "search history", searchUrl: Settings.get "searchUrl" for suggestion in suggestions diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index a1311a46..5601b20d 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -140,7 +140,7 @@ chrome.webNavigation.onReferenceFragmentUpdated.addListener onURLChange # Hash c # This is called by options.coffee. root.helpDialogHtml = (showUnboundCommands, showCommandNames, customTitle) -> commandsToKey = {} - for key of Commands.keyToCommandRegistry + for own key of Commands.keyToCommandRegistry command = Commands.keyToCommandRegistry[key].command commandsToKey[command] = (commandsToKey[command] || []).concat(key) @@ -148,7 +148,7 @@ root.helpDialogHtml = (showUnboundCommands, showCommandNames, customTitle) -> version: currentVersion title: customTitle || "Help" - for group of Commands.commandGroups + for own group of Commands.commandGroups replacementStrings[group] = helpDialogHtmlForCommandGroup(group, commandsToKey, Commands.availableCommands, showUnboundCommands, showCommandNames) @@ -446,7 +446,7 @@ chrome.tabs.onRemoved.addListener (tabId) -> # a blacklist in the future. unless chrome.sessions if (/^(chrome|view-source:)[^:]*:\/\/.*/.test(openTabInfo.url)) - for i of tabQueue[openTabInfo.windowId] + for own i of tabQueue[openTabInfo.windowId] if (tabQueue[openTabInfo.windowId][i].positionIndex > openTabInfo.positionIndex) tabQueue[openTabInfo.windowId][i].positionIndex-- return @@ -489,12 +489,12 @@ getActualKeyStrokeLength = (key) -> key.length populateValidFirstKeys = -> - for key of Commands.keyToCommandRegistry + for own key of Commands.keyToCommandRegistry if (getActualKeyStrokeLength(key) == 2) validFirstKeys[splitKeyIntoFirstAndSecond(key).first] = true populateSingleKeyCommands = -> - for key of Commands.keyToCommandRegistry + for own key of Commands.keyToCommandRegistry if (getActualKeyStrokeLength(key) == 1) singleKeyCommands.push(key) @@ -517,7 +517,7 @@ generateCompletionKeys = (keysToCheck) -> completionKeys = singleKeyCommands.slice(0) if (getActualKeyStrokeLength(command) == 1) - for key of Commands.keyToCommandRegistry + for own key of Commands.keyToCommandRegistry splitKey = splitKeyIntoFirstAndSecond(key) if (splitKey.first == command) completionKeys.push(splitKey.second) |
