aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2015-09-07Traverse shadow DOMs when looking for scrollable elementsmrmr1993
2015-09-06Merge pull request #1798 from gdh1995/run-on-xml-pagesStephen Blott
Run on XML pages (version 2)
2015-08-29Minor tweaks (clipboard).Stephen Blott
1. We're not using Clipboard in the the content scripts, so don't import it. 2. Use consistent syntax for method calls. This commit is a no-op.
2015-08-28a better way to detect document typesgdh1995
On a XML view page, createElement will create an "Element" object Otherwise, createElement('div') will get an object : HTMLDivElement >> HTMLElement >> Element
2015-08-28fix a new typogdh1995
oh my god
2015-08-28remove `.bind` imported in da8653f because dom tests fail if bind existsgdh1995
2015-08-28fix a typo in PR #1798gdh1995
2015-08-28clean codegdh1995
2015-08-28fix a bug that Clipboard fails without DomUtilsgdh1995
2015-08-28fix a bug that Utils using DomUtilsgdh1995
remove Utils.createElementFromHtml since it's not in use
2015-08-26Use createElementNS for XML documents and remove XML specific codepathsmrmr1993
This implements @gdh1995's idea from #1796.
2015-07-20Treat links with fixed position children like absolutely positionedmrmr1993
This fixes #1770.
2015-06-25Merge branch 'hud-iframe-input-with-store-all-settings'Stephen Blott
2015-06-25Merge branch 'store-all-settings' into hud-iframe-input-with-store-all-settingsStephen Blott
2015-06-20The second part of b09822eb349ec88a573d4f450e9b57e8fa3c6473 is incorrect.Stephen Blott
Revert it.
2015-06-20Fix SimpleCache bugs.Stephen Blott
This fixes two bugs in SimpleCache. 1. Rotate the cache on the next tick. There is a marginally small chance that the cache will rotate between calls to .has() and .get(). So, we do the rotation ansynchronously. This guarantees that these two functions will always see the same cache state. 2. The implementation of .clear() (which is unused, I think) has at some point become out of date (and incorrect) w.r.t. the implementation of .rotate().
2015-06-20Adding debugging infrastructure for settings.Stephen Blott
2015-06-20Document options/settings data model.Stephen Blott
2015-06-20Document options/settings data model.Stephen Blott
2015-06-17Reinstate unintentionally deleted code.Stephen Blott
2015-06-17Fix non-default front-end settings.Stephen Blott
(@mrmr1993: This is yet another approach to the Settings problem.) With the new Settings implemetation, settings which have a non-default value and which are not in synced storage (that is, they have not been changed since synced storage was introduced) are not currently accessible to content scripts. This commit makes such settings accessible via chrome.storage.local. Important: - There's a change to the established settings data model here. Previously, settings with default values were not stored; here, they are. This eliminates a considerable amount logic from Settings, but means that migrations will be required if default values are changed in future. (Other than type changes, have we ever changed a default value?) - There's also a change (bug fix?) to the behaviour when an affected setting is reset to its default value. Previously, the change would *not* have been synced (whereas all other changes are). Here, such changes *are* synced. The previous behaviour was inconsistent with the syncing behaviour of all other options changes. Note: - This isn't particularly well tested. It's being committed mainly just for consideration of the approach, initially.
2015-06-16Make "Show Advanced Options" state persistent.Stephen Blott
2015-06-14Add default value for regexFindMode setting.Stephen Blott
Because we haven't had a default value for this setting, we never sync it, which means -- when its not at its default value -- it isn't picked up in content scripts by the new settings system. Fixes #1731.
2015-06-10Move finding the element at a selection's focus to a library functionmrmr1993
2015-06-10Guard against chrome being undefined in the HUD iframemrmr1993
2015-06-10Move FindModeHistory to its own file to be used by the HUD iframe toomrmr1993
2015-06-01Use JSON.stringify to compare setting values everywheremrmr1993
2015-06-01Always call performPostUpdateHook after Setting updates (.set/.clear)mrmr1993
2015-06-01Simplify searchEngines default value.Stephen Blott
2015-06-01Note bug in settings.Stephen Blott
(This bug has been around for quite some time. I just noticed it now.)
2015-06-01Fix error reading settings from chrome.storage.sync.Stephen Blott
2015-06-01Refactor and eliminate Sync object.Stephen Blott
2015-06-01Only propagate changes from chrome.storage.sync.Stephen Blott
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-31Add a default value for helpDialog_showAdvancedCommandsmrmr1993
We need this because Settings rejects key/value pairs from chrome.storage for which there were no default values. Previously, this only meant that the setting would not sync; now it meant that the setting wasn't ever made available to the frontend. This commit fixes it, and now the setting will sync.
2015-05-31Rewrite settings as a tight wrapper around Settings, tweaks for testsmrmr1993
2015-05-31Add event listeners to settings, support load eventsmrmr1993
2015-05-31Add Settings.isLoaded to the unified settings implementationmrmr1993
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-29Verify keyword for custom search-engine activation.Stephen Blott
For ... map s Vomnibar.activate keyword=g ... we verify that "g" is indeed a custom search-engine keyword before setting it. If it is not, we output a console.log message and launch a vanilla vomnibar. (An alternative would be to bail.)
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-29Make a check more coffeescript-ymrmr1993
2015-05-29Make Settings explicitly use a cachemrmr1993
The Settings object used by the background page now uses 1 of 3 caches, depending on the context it is available in: * localStorage - in the background page * a copy of localStorage - in non-background extension pages (options.html, popup.html, etc.) * an empty object - in all other pages (where localStorage doesn't point to the extension's localStorage object). For any extension page which is *not* the background page, a copy of localStorage is used instead of true localStorage: * Once localStorage is updated by one background page, the others can only see the updated copy. - Pages with an updated cache can't tell which changes are new, and so don't know which postUpdateHooks to run. * By copying localStorage's contents into a new object, extension pages can still access settings synchronously. - This is especially important to options.html and popup.html; they will not work without it.
2015-05-29Move settings.coffee from background_scripts/ to lib/mrmr1993
2015-05-29Only perform settings migration in the background pagemrmr1993
2015-05-27Merge pull request #1616 from mrmr1993/detect-inline-inline-fontSize-elementsStephen Blott
Fix for #1554.
2015-05-18Merge branch 'vomnibar-insert-history-with-tab'Stephen Blott
Conflicts: background_scripts/completion.coffee
2015-05-17use a less brittle approach to decoding URIs.Stephen Blott
2015-05-17TabToOpen: respect trailing options when extracting query terms.Stephen Blott
A custom search engine like this... i: https://www.google.ie/search?q=%s&num=30&newwindow=1&biw=1918&bih=1015&tbm=isch Google image search Should not match a URL like this... https://www.google.ie/search?q=bbc+sport
2015-05-17TabToOpen: more tidy up pre-PR.Stephen Blott