Commit 2e36d1f1 authored by Robert Knight's avatar Robert Knight

Whitelist and document the 'services' config param

Document the 'services' config param which the host page may provide to
the client.
parent c604c0c3
......@@ -34,3 +34,10 @@ _Boolean_. Controls whether the sidebar opens automatically on startup.
_Boolean_. Controls whether the in-document highlights are shown by default.
(Default: _true_.)
### `services`
_Array_. A list of annotation services which the client should retrieve
annotations from, optionally including information about the identity of the
user on that service. When omitted, the client will default to connecting to
the public [Hypothesis](https://hypothes.is/) service.
......@@ -26,6 +26,7 @@ function hostPageConfig(window) {
'openLoginForm',
'openSidebar',
'showHighlights',
'services',
];
return Object.keys(config).reduce(function (result, key) {
......
......@@ -18,6 +18,9 @@ describe('hostPageConfig', function () {
openSidebar: true,
openLoginForm: true,
showHighlights: true,
services: [{
authority: 'hypothes.is',
}],
});
assert.deepEqual(hostPageConfig(window_), {
......@@ -26,6 +29,9 @@ describe('hostPageConfig', function () {
openSidebar: true,
openLoginForm: true,
showHighlights: true,
services: [{
authority: 'hypothes.is',
}],
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment