From b1f850addfc2f310b7123493e382c418cc8ec355 Mon Sep 17 00:00:00 2001 From: Phil Crosby Date: Wed, 30 Dec 2009 11:52:16 -0500 Subject: Remove some unnecessary indentation --- background_page.html | 52 ++++++++++++++++++++++++---------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/background_page.html b/background_page.html index 6b957864..a388cd27 100644 --- a/background_page.html +++ b/background_page.html @@ -5,15 +5,17 @@ var keyQueue = ""; // Queue of keys typed var validFirstKeys = {}; - var defaultSettings = { "scrollStepSize": 60 }; + var defaultSettings = { scrollStepSize: 60 }; // Port handler mapping - var portHandlers = { "keyDown": handleKeyDown, - "returnScrollPosition": handleReturnScrollPosition, - "getCurrentTabUrl": getCurrentTabUrl, - "getZoomLevel": getZoomLevel, - "saveZoomLevel": saveZoomLevel, - "getSetting": getSetting}; + var portHandlers = { + keyDown: handleKeyDown, + returnScrollPosition: handleReturnScrollPosition, + getCurrentTabUrl: getCurrentTabUrl, + getZoomLevel: getZoomLevel, + saveZoomLevel: saveZoomLevel, + getSetting: getSetting + }; // Event handlers var selectionChangedHandlers = []; @@ -137,20 +139,20 @@ function removeTab(callback) { getCurrentTabWithScrollPosition(function(tab, scrollX, scrollY) { - var tabQueueEntry = { tabUrl: tab.url, - scrollX: scrollX, - scrollY: scrollY }; - - if (tabQueue[tab.windowId]) - tabQueue[tab.windowId].push(tabQueueEntry); - else - tabQueue[tab.windowId] = [tabQueueEntry]; - - chrome.tabs.remove(tab.id); - // We can't just call the callback here because we actually need to wait - // for the selection to change to consider this action done. - selectionChangedHandlers.push(callback); - }); + var tabQueueEntry = { tabUrl: tab.url, + scrollX: scrollX, + scrollY: scrollY }; + + if (tabQueue[tab.windowId]) + tabQueue[tab.windowId].push(tabQueueEntry); + else + tabQueue[tab.windowId] = [tabQueueEntry]; + + chrome.tabs.remove(tab.id); + // We can't just call the callback here because we actually need to wait + // for the selection to change to consider this action done. + selectionChangedHandlers.push(callback); + }); } function restoreTab(callback) { @@ -271,11 +273,5 @@ init(); - - - - howdy - - - + \ No newline at end of file -- cgit v1.2.3