diff options
| author | Max Cantor | 2011-05-06 11:47:20 -0400 |
|---|---|---|
| committer | Max Cantor | 2011-05-06 11:47:20 -0400 |
| commit | 870183f4b2e755a9e4ae58194d1cd5d03579980b (patch) | |
| tree | 6d3b50850bb0e0a3401ec0a7f2d0e2994c7a9474 | |
| parent | c5ad2a1642d14c23483fc3ebb6b5d1059116e9ea (diff) | |
| download | vimium-870183f4b2e755a9e4ae58194d1cd5d03579980b.tar.bz2 | |
implementing ilya's suggestion for incrementing the frame
| -rw-r--r-- | background_page.html | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/background_page.html b/background_page.html index eca7271c..5849bde3 100644 --- a/background_page.html +++ b/background_page.html @@ -690,15 +690,10 @@ chrome.tabs.getSelected(null, function(tab) { var frames = framesForTab[tab.id].frames; var curr_index = getCurrFrameIndex(frames); - var new_index = curr_index; // TODO: Skip the "top" frame (which doesn't actually have a <frame> tag), // since it exists only to contain the other frames. - for (var i=0; i < count; i++) { - new_index++; - if (new_index >= frames.length) - new_index = 0; - } + var new_index = (curr_index + count) % frames.length; chrome.tabs.sendRequest(tab.id, { name: "focusFrame", frameId: frames[new_index].id, highlight: true }); }); |
