From d10229e391c6b8c938da4ac71fe1ac968e21c5a0 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 23 Nov 2014 16:05:01 +0000 Subject: Frames; just add new frames to the end. We don't need to worry where frames are added, nextFrame will find the right frame to start from anyway. --- background_scripts/main.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'background_scripts/main.coffee') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 27800ce6..722091a4 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -600,9 +600,9 @@ openOptionsPageInNewTab = -> chrome.tabs.create({ url: chrome.runtime.getURL("pages/options.html"), index: tab.index + 1 })) registerFrame = (request, sender) -> - frames = frameIdsForTab[sender.tab.id] ?= [] - unless request.is_frameset # Don't store frameset containers; focusing them is no use. - if request.is_top then frames.unshift request.frameId else frames.push request.frameId + frameIdsForTab[sender.tab.id] ?= [] + # Don't store frameset containers; focusing them is no use. + frameIdsForTab[sender.tab.id].push request.frameId unless request.is_frameset unregisterFrame = (request, sender) -> tabId = sender.tab.id -- cgit v1.2.3