aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilya2009-12-30 15:52:15 -0800
committerilya2009-12-30 15:52:15 -0800
commit46ffdfde8bcfe6662d65acb3b3126a3748deaefd (patch)
treec7d84153ff6fce39979fb95c546c8ab5c130abf2
parent0140985511931e492ca8778a71bd462bc2f23776 (diff)
downloadvimium-46ffdfde8bcfe6662d65acb3b3126a3748deaefd.tar.bz2
Get rid of chrome.tabs.getSelected in checkKeyQueue.
-rw-r--r--background_page.html9
1 files changed, 4 insertions, 5 deletions
diff --git a/background_page.html b/background_page.html
index 31705964..f5b99ac7 100644
--- a/background_page.html
+++ b/background_page.html
@@ -332,11 +332,10 @@
console.log("command found for [", keysToCheck, "],", registryEntry);
if (typeof(registryEntry) == "string") {
- chrome.tabs.getSelected(null, function(tab) {
- var port = chrome.tabs.connect(tab.id, { name: "executePageCommand" });
- port.postMessage({ command: registryEntry, count: count,
- completionKeys: generateCompletionKeys("") });
- });
+ var port = chrome.tabs.connect(tabId, { name: "executePageCommand" });
+ port.postMessage({ command: registryEntry, count: count,
+ completionKeys: generateCompletionKeys("") });
+
refreshedCompletionKeys = true;
} else {
repeatFunction(registryEntry, count, 0);