diff options
| author | Phil Crosby | 2011-02-09 23:05:40 -0800 |
|---|---|---|
| committer | Phil Crosby | 2011-02-09 23:05:40 -0800 |
| commit | 1edb16a47eb8a35fc3ea7991bfdfc8434d1d3bff (patch) | |
| tree | 3d0275940d6b35a6b9da4accf12e013901c713e4 | |
| parent | 7d5f9b138f77db9a62f2d2847fd182372afdd9b3 (diff) | |
| download | vimium-1edb16a47eb8a35fc3ea7991bfdfc8434d1d3bff.tar.bz2 | |
Style
| -rw-r--r-- | background_page.html | 8 | ||||
| -rw-r--r-- | vimiumFrontend.js | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/background_page.html b/background_page.html index d98967b4..77150244 100644 --- a/background_page.html +++ b/background_page.html @@ -18,8 +18,9 @@ var focusedFrame = null; var framesForTab = {}; - // Keys are either literal characters, or "named" - for example <a-b> (alt+b), <left> (the left arrow) or <f12> - // This regular expression captures two groups, the first is a named key, the second is the remainder of the string. + // Keys are either literal characters, or "named" - for example <a-b> (alt+b), <left> (left arrow) or <f12> + // This regular expression captures two groups: the first is a named key, the second is the remainder of + // the string. var namedKeyRegex = /^(<(?:[amc]-.|(?:[amc]-)?[a-z0-9]{2,5})>)(.*)$/; var defaultSettings = { @@ -164,7 +165,8 @@ function showHelp(callback, frameId) { chrome.tabs.getSelected(null, function(tab) { - chrome.tabs.sendRequest(tab.id, { name: "showHelpDialog", dialogHtml: helpDialogHtml(), frameId:frameId }); + chrome.tabs.sendRequest(tab.id, + { name: "showHelpDialog", dialogHtml: helpDialogHtml(), frameId:frameId }); }); } diff --git a/vimiumFrontend.js b/vimiumFrontend.js index 6ddc15c3..b7f9308f 100644 --- a/vimiumFrontend.js +++ b/vimiumFrontend.js @@ -153,8 +153,8 @@ function initializeWhenEnabled() { /* * The backend needs to know which frame has focus. */ -window.addEventListener("focus", function(e){ - chrome.extension.sendRequest({handler: "frameFocused", frameId: frameId}); +window.addEventListener("focus", function(e) { + chrome.extension.sendRequest({ handler: "frameFocused", frameId: frameId }); }); /* @@ -185,7 +185,8 @@ function initializeOnDomReady() { // This is a little hacky but sometimes the size wasn't available on domReady? function registerFrameIfSizeAvailable (top) { if (innerWidth != undefined && innerWidth != 0 && innerHeight != undefined && innerHeight != 0) - chrome.extension.sendRequest({ handler: "registerFrame", frameId: frameId, area: innerWidth * innerHeight, top: top, total: frames.length + 1 }); + chrome.extension.sendRequest({ handler: "registerFrame", frameId: frameId, + area: innerWidth * innerHeight, top: top, total: frames.length + 1 }); else setTimeout(function () { registerFrameIfSizeAvailable(top); }, 100); } |
