diff options
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/main.coffee | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 5818df48..72c65264 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -60,6 +60,12 @@ chrome.extension.onRequest.addListener((request, sender, sendResponse) -> # Ensure the sendResponse callback is freed. return false) +chrome.extension.onMessage.addListener((request, sender, sendResponse) -> + if (sendRequestHandlers[request.handler]) + sendResponse(sendRequestHandlers[request.handler](request, sender)) + # Ensure the sendResponse callback is freed. + return false) + # # Used by the content scripts to get their full URL. This is needed for URLs like "view-source:http:# .." # because window.location doesn't know anything about the Chrome-specific "view-source:". @@ -460,8 +466,6 @@ checkKeyQueue = (keysToCheck, tabId, frameId) -> command = splitHash.command count = splitHash.count - console.log 'Command:', command - return keysToCheck if command.length == 0 count = 1 if isNaN(count) |
