Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
e4d696a0
Commit
e4d696a0
authored
Jan 22, 2021
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Jan 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move `host-config` to `config`
parent
3bcb6981
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
fetch-config.js
src/sidebar/config/fetch-config.js
+1
-1
host-config.js
src/sidebar/config/host-config.js
+2
-2
fetch-config-test.js
src/sidebar/config/test/fetch-config-test.js
+1
-1
host-config-test.js
src/sidebar/config/test/host-config-test.js
+1
-1
No files found.
src/sidebar/config/fetch-config.js
View file @
e4d696a0
import
getApiUrl
from
'./get-api-url'
;
import
hostConfig
from
'.
.
/host-config'
;
import
hostConfig
from
'./host-config'
;
import
*
as
postMessageJsonRpc
from
'../util/postmessage-json-rpc'
;
/**
...
...
src/sidebar/host-config.js
→
src/sidebar/
config/
host-config.js
View file @
e4d696a0
...
...
@@ -4,9 +4,9 @@ import {
toInteger
,
toObject
,
toString
,
}
from
'../shared/type-coercions'
;
}
from
'../
../
shared/type-coercions'
;
/** @typedef {import('../types/config').HostConfig} HostConfig */
/** @typedef {import('../
../
types/config').HostConfig} HostConfig */
/**
* Return the app configuration specified by the frame embedding the Hypothesis
...
...
src/sidebar/config/test/fetch-config-test.js
View file @
e4d696a0
...
...
@@ -14,7 +14,7 @@ describe('sidebar/config/fetch-config', () => {
};
fakeApiUrl
=
sinon
.
stub
().
returns
(
'https://dev.hypothes.is/api/'
);
$imports
.
$mock
({
'.
.
/host-config'
:
fakeHostConfig
,
'./host-config'
:
fakeHostConfig
,
'../util/postmessage-json-rpc'
:
fakeJsonRpc
,
'./get-api-url'
:
fakeApiUrl
,
});
...
...
src/sidebar/test/host-config-test.js
→
src/sidebar/
config/
test/host-config-test.js
View file @
e4d696a0
...
...
@@ -8,7 +8,7 @@ function fakeWindow(config) {
};
}
describe
(
'sidebar/host-config'
,
function
()
{
describe
(
'sidebar/
config/
host-config'
,
function
()
{
it
(
'parses config from location string and returns whitelisted params'
,
function
()
{
const
window_
=
fakeWindow
({
annotations
:
'1234'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment