aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
AgeCommit message (Collapse)Author
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-25Set the parent tab when creating tabs.Stephen Blott
If the tab is subsequently deleted, then we return to the original tab (as opposed to the one on its right).
2015-06-22fix a bug that `pasteFromClipboard` does not return text from clipboardgdh1995
2015-06-10Refactor moveTab for clarity...Stephen Blott
... as suggested by @mrmr1993 in #1728.
2015-06-10Do not try to move a tab to the left of pinned tabs.Stephen Blott
2015-06-10Re-work tabMoveLeft/Right.Stephen Blott
Note. This does not allow tabs to rotate from the left around to the right, or vice versa. Which means "999<<" moves the current tab all the way to the left (and similarly to the right). Fixes #1727 (kind of).
2015-06-07Speed up vomnibar load.Stephen Blott
With #1697, the vomnibar used with a custom-search keyword is not initially empty (it shows the primary suggestion for the custom search engine, even if the query is empty). The way things were structured previously, the user nevertheless had to wait until the history cache (which was not actually required) had been fetched before the vomnibar was updated. This commit just flips things around a bit such that, - onComplete() is called immediately if the history is not actually required, and - the history cache is primed before it is needed, so it will (hopefully) be available before the user's next keystroke. This avoids a noticable delay, particularly on start up and with a large history. (This is part of a sequence of vomnibar UX tweaks.)
2015-06-06Merge branch 'rework-completions'Stephen Blott
Conflicts: background_scripts/completion.coffee background_scripts/completion_engines.coffee
2015-06-06Merge pull request #1715 from smblott-github/help-page-long-bindingsStephen Blott
On the help page, use separate row for very-long bindings.
2015-06-06Re-work completions: only offer actual search URL matches.Stephen Blott
When filter suggestions from other completers, most notably the history completer, we only keep suggestions which match the current searchUrl and completer. Here, we also *replace* the URL of the suggestion. With duplicate elimination, multiple history entries (e.g. those generated with various "Search Tools" settings on Google) will be collapsed to one. This matters because, with custom search engines, we don't show the URL, so the user can't see differences in the URL. Without this, the user can be presented with a list of apparently identical completions.
2015-06-06Re-work completions: extend engine wrapper to handle prefixes.Stephen Blott
This commit contains the bulk og the material changes for which the previous commits established the basis. 1) Add a general framework for detecting query prefixes in search URLs, adding them to query sent to the completion engine, and stripping them from the resulting suggestions. This allows the user to have a search engine... j: http://www.google.com/search?q=javascript+%s Javascript and have the prefix "javascript" included (automatically) in queries sent to completion engines, which results in substantially better suggestions. 2) Re-work completion for Google Maps in a simpler form.
2015-06-06Re-work completions: add engine wrapper.Stephen Blott
2015-06-06Re-work completions: initial refactor.Stephen Blott
The original completion-engine interface was based on three functions. With some experience, it seems there is a pattern involving explicit regular expressions which is used by all actual engine implementations. This is a refactoring to make those regular expressions explicit (and required), and is a first step towards adding additional fucntionality. This also simplifies the completion cache key (use JSON instead of some weird hash).
2015-06-05Merge pull request #1716 from smblott-github/global-marksStephen Blott
Improved global marks
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-04Fix issue with Google-Maps completion failing.Stephen Blott
2015-06-04Unwind passing key and registry entry for marks.Stephen Blott
As suggested by @mrmr1993 in #1716.
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-04Help page, use separate row for long bindings.Stephen Blott
If there are many bindings for a command, then the column layout on the help page can become out of whack. This commit puts such bindings on a separate table row which spans all three columns. (Many bindings for a single command are more likely in light of #1697.)
2015-06-03Re-implement Marks, incl `` binding.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).
2015-06-03Completion page; add example DECLARATIONS to page.Stephen Blott
Instead of just giving an example search URL, we can give the actual declaration (which the user can copy, paste and tweak).
2015-06-03Completion page; make examples data (not comments).Stephen Blott
For each completion engine, this adds an @example properties (not comments)
2015-06-03Only offer suggestions from the current custom search engine.Stephen Blott
When the user changes custom search engine during a single vomnibar activation, we should only offer suggestions which match the current search engine (not the previous one). We now do this not just by checking that the suggestion is a custom search suggestion, but by checking that the actual search URL matches.
2015-06-02De-duplicate Google Maps URLs in vomnibar.Stephen Blott
In Google Maps, we get a new history entry for every pan and every zoom. This removes such duplicates.
2015-06-01Re-work unified settings.Stephen Blott
This is a minor re-working of #1705 from @mrmr1993. The main changes are: - Simplify initialisation logic. - Always initialise Settings immediately and automatically (ie. don't initialise Settings separately and manually in the background, content scripts, options and tests). - Get rid of addEventListener (it's only being used for on "load"). - Add Settings.use() in its place.
2015-05-31Remove code supporting the former settings port from the frontendmrmr1993
2015-05-31Re-write class with inheritence.Stephen Blott
2015-05-31Tweak Google Maps URL.Stephen Blott
Conflicts: misc/completion_engines/completion_engines.md
2015-05-31Fix completion engine regular expressions.Stephen Blott
We need to use "\\." to get a literal ".".
2015-05-31Merge pull request #1675 from smblott-github/map-space-keyStephen Blott
Allowing mapping <space>.
2015-05-31Merge pull request #1700 from smblott-github/help-page-vomnibar-commandsStephen Blott
Move Vomnibar commands to own category on help page.
2015-05-31Merge pull request #1697 from smblott-github/vomnibar-map-with-prepopulated-textStephen Blott
Direct keyboard access to custom-search engines via keyword flag
2015-05-30Search completion; refactor regexp parsing (simplification).Stephen Blott
2015-05-30Search completion; simplify completion-engine definitions.Stephen Blott
2015-05-30Search completion; remove unused code.Stephen Blott
This removes a couple of lines which should have been removed previously.
2015-05-30Search completion; add support for Google Maps completion.Stephen Blott
2015-05-30Move Vomnibar commands to own category on help page.Stephen Blott
The help page gets pretty lopsided when advanced commands are shown. This balances things out a bit by creating a new category for Vomnibar commands in the right-hand column.
2015-05-30Use the term "options" instead of "flags" for command options.Stephen Blott
"Flags" implies binary toggles. The term "options" seems more consistent with what's actually going on here.
2015-05-29Move search-engine parsing to Utils.Stephen Blott
This will allow us to use the same search-engine parsing code in the background page and in content scripts.
2015-05-29Move settings.coffee from background_scripts/ to lib/mrmr1993
2015-05-29Only perform settings migration in the background pagemrmr1993