- 14 Jun, 2017 11 commits
-
-
Sean Hammond authored
Fixing js error on :3000 page
-
Sean Roberts authored
-
Sean Hammond authored
Add Symbol polyfill
-
Robert Knight authored
(config 3/n): Turn the settings obj into a settingsFrom function
-
Sean Hammond authored
annotator.config.settings currently exports an object containing individual standalone functions for returning different settings' values: module.exports = { app: appFunction, annotations: annotationsFunction, ... }; Change it to export just a single constructor function - settingsFrom() - that returns an object containing the previously-exported functions as methods: function settingsFrom(window_) { ... return { get app() { return app(); }, get annotations() { return annotations(); }, ... }; } module.exports = settingsFrom; Note that ES5 getters are used so that, even though app() and annotations() are methods rather than simple properties now, they can still be accessed as properties - settings.app not settings.app(). This makes the code that uses this object slightly simpler, and makes mocking this object in unit tests simpler. The diff of this commit looks big, because the indentation of a lot of code is changed, but it really is just changing functions into methods and not actually changing the code of any of those functions. The reason for turning functions into an object with methods is so that the object that settingsFrom() returns can have state (by having closure variables inside the settingsFrom() function). We don't make any use of this state yet but future commits will do.
-
Robert Knight authored
(config 2/n): Move configFuncSettingsFrom() into its own file
-
Robert Knight authored
This is needed for various ES6 language constructs, such as `for ... of` loops, to work because the transpiled code depends on references to properties of the `Symbol` object (eg. Symbol.iterator).
-
Sean Hammond authored
Cut-paste the configFuncSettingsFrom() function and its unit tests out of settings.js and into its own config-func-settings-from.js file. This is because in a future refactoring index.js isn't going to call configFuncSettingsFrom() anymore, only settings.js will call it, which would make configFuncSettingsFrom() a private helper function of settings.js, but I don't want to lose configFuncSettingsFrom()'s unit tests so I'm moving it into its own file from where settings.js (in the future, index.js currently) can import and use it. This way configFuncSettingsFrom() remains part of the public API of its containing module and can have unit tests.
-
Robert Knight authored
(config 1/n): Move isBrowserExtension() into own file
-
Sean Hammond authored
Upgrade gulp-sass
-
Sean Hammond authored
Convert tags service to JS
-
- 13 Jun, 2017 5 commits
-
-
Robert Knight authored
This fixes a build error with Node v8.
-
Robert Knight authored
-
Robert Knight authored
-
Sean Roberts authored
Multiple frame detection and injection
-
Sean Roberts authored
Enable ES2015 transpilation in the client
-
- 12 Jun, 2017 14 commits
-
-
Juan Corona authored
-
Juan Corona authored
-
Juan Corona authored
-
Juan Corona authored
-
Juan Corona authored
-
Juan Corona authored
-
Juan Corona authored
(was testing `srcdoc` and forgot to remove this before pushing)
-
Juan Corona authored
-
Juan Corona authored
-
Juan Corona authored
-
Juan Corona authored
-
Juan Corona authored
-
Sean Hammond authored
Tweak `isBrowserExtension()` to take just the `config.app` string that it needs and not the entire `config` object as argument. This is necessary for `isBrowserExtension()` to be called by `settings.js` instead of `index.js` (as I want it to be in the future) - when it's called by `settings.js` the `config` object as a whole won't be available (and hasn't been constructed yet).
-
Sean Hammond authored
Cut-paste the `isBrowserExtension()` function and its unit tests out of `settings.js` and into its own `is-browser-extension.js` file. This is because in a future refactoring `index.js` isn't going to call `isBrowserExtension()` anymore, only `settings.js` will call it, which would make `isBrowserExtension()` a private helper function of `settings.js`, but I don't want to lose `isBrowserExtension()`'s unit tests so I'm moving it into its own file from where `settings.js` (in the future, `index.js` currently) can import and use it. This way `isBrowserExtension()` remains part of the public API of its containing module and can have unit tests.
-
- 08 Jun, 2017 10 commits
-
-
Robert Knight authored
Extract isBrowserExtension() into a separate settings function
-
Sean Hammond authored
-
Sean Hammond authored
-
Sean Hammond authored
-
Sean Hammond authored
-
Sean Hammond authored
If the host page contains a service setting then the client should de…
-
Robert Knight authored
Don't throw if hypothesisConfig() isn't a function
-
Robert Knight authored
Don't throw on invalid JSON
-
Robert Knight authored
Simplify reading query and annotations
-
Sheetal Umesh Kumar authored
We need to be able to support the client to work with different annotation services, other than just `https://hypothes.is/api`. If the settings from the host doesn't specify a service, the client should fall back to using the default apiUrl which would be `https://hypothes.is/api`. https://github.com/hypothesis/product-backlog/issues/278
-