aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/marks.coffee
AgeCommit message (Collapse)Author
2016-09-17Tweaks to comments.Stephen Blott
2016-09-14Fix omission from 722cd3c40f89d93682f08e88b6d4cb46ca70991e.Stephen Blott
2016-09-14Require exact match when we will be scrolling.Stephen Blott
If the user is jumping to a scroll position within a tab, then we need an exact match on the URL (because otherwise the scroll position doesn't really have a meaning). Otherwise we only require a prefix match, a la #2250.
2016-09-14Match globa-mark URLs by length.Stephen Blott
This changes the logic for selecting an existing tab when using global marks. Previously, an exact RUL match was required. Here, we only require a prefix match. For example, if the global-mark URL is: https://inbox.google.com/u/0/ Then a tab with the URL https://inbox.google.com/u/0/sent will be selected. This is a more usable approach when the user uses global marks to visit important sites like gmail, Facebook or Twitter. On these sites, the URL changes, but the user still thinks of the tab as their "gmail tab", for example. Also, when choosing between multiple candidate tabs: - If there is at least one candidate in the current window, then only consider candidates in the current window. - If there are more than one candidates, then don't select the current tab. - Finally, select the remaining candidate with the shortest URL. Closes #2248.
2016-03-26Rework global mark activation.Stephen Blott
There were two problems, both stemming from the fact that the notification was being displayed in the top frame, even if the mark was triggered in another frame: 1. That looks odd, because we close the HUD in one frame then open it in another. 2. As a side effect, we were moving the focus to the top frame. Here, we work out what's going to happen before sending the message to the background page. This allows us to display the message in the HUD in the frame which generated it.
2016-03-26Uniform treatment of request for all background commands.Stephen Blott
2015-06-25Make global marks consistent with other tab creation operations.Stephen Blott
This makes global marks use the same code for opening new tabs as other operations. Thus, the new tab appears in the same position as it would if it were created, for example, via the vomnibar. To do this properly, we move the three tab-creating functions into an object which can be (and is) exported (TabOperations). Also fixes these three operations such that they all take the same arguments; that is (request, callback). Not all of these callbacks are being used. But we should be consistent.
2015-06-05Global marks; global marks are always recorded for the top frame only.Stephen Blott
With global marks, we may later create a new tab when the mark is used. When doing so, we should always be using the URL and scroll position of the top frame within the tab. For example, if a global mark is created from within the Hangouts frame of Google's Inbox and the mark is later used, then we should create a new tab for Inbox's URL and scroll position, not for the Hangout's URL and scroll position.
2015-06-04Global marks; focus and only scroll in the main frame.Stephen Blott
2015-06-04Global marks; prefer to re-use a tab in the current window.Stephen Blott
2015-06-04Global marks; use chrome.tabs.query.Stephen Blott
(As suggested by @mrmr1993 in #1716.)
2015-06-04Global marks; better comments and fix typo.Stephen Blott
2015-06-04Global marks; move marks to chrome.storage.sync.Stephen Blott
2015-06-04Global marks; better comments and minor refactoring.Stephen Blott
2015-06-04Global marks; create a new tab, if necessary.Stephen Blott
2015-06-04Global marks; find another (existing) tab if tabId has been removed.Stephen Blott
2015-06-04Global marks; move marks to chrome.storage.Stephen Blott
2015-06-03Fix marks (incl. global marks)...Stephen Blott
Fixes #1712: - Make global marks work. - Add mode indicator. - Don't fail for global marks on background page if mark is not set. - Give HUD warning for global marks if global mark is not set. (The diff is big but, which the exception of infrastructure refactoring, the main change is to not exit on <Shift>, thereby fixing #1712).
2013-05-25Replace `sendRequest()` calls with `sendMessage()` ones in marks.coffeesainaen
Fixing incomplete commit 9403692e51, replacing old API calls with the new ones in two more files: `background/marks.coffee` and `content_scripts/marks.coffee`.
2012-10-29Implement marks.Jez Ng