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
983d75cd
Unverified
Commit
983d75cd
authored
Jun 07, 2017
by
Sean Hammond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small formatting improvement
parent
3a234d07
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
index.js
src/annotator/config/index.js
+11
-11
No files found.
src/annotator/config/index.js
View file @
983d75cd
...
@@ -11,22 +11,22 @@ var sharedSettings = require('../../shared/settings');
...
@@ -11,22 +11,22 @@ var sharedSettings = require('../../shared/settings');
function
configFrom
(
window_
)
{
function
configFrom
(
window_
)
{
var
config
=
{
var
config
=
{
app
:
settings
.
app
(
window_
.
document
),
app
:
settings
.
app
(
window_
.
document
),
};
var
chromeExt
=
'chrome-extension://'
;
var
mozExt
=
'moz-extension://'
;
var
edgeExt
=
'ms-browser-extension://'
;
// Extract the default annotation ID or query from the URL.
// Extract the default annotation ID or query from the URL.
//
//
// The Chrome extension or proxy may already have provided this config
// The Chrome extension or proxy may already have provided this config via
// via
a tag injected into the DOM, which avoids the problem where the page's
//
a tag injected into the DOM, which avoids the problem where the page's
// JS rewrites the URL before Hypothesis loads.
// JS rewrites the URL before Hypothesis loads.
//
//
// In environments where the config has not been injected into the DOM,
// In environments where the config has not been injected into the DOM,
// we try to retrieve it from the URL here.
// we try to retrieve it from the URL here.
config
.
query
=
settings
.
query
(
window_
.
location
.
href
);
query
:
settings
.
query
(
window_
.
location
.
href
),
config
.
annotations
=
settings
.
annotations
(
window_
.
location
.
href
);
annotations
:
settings
.
annotations
(
window_
.
location
.
href
),
};
var
chromeExt
=
'chrome-extension://'
;
var
mozExt
=
'moz-extension://'
;
var
edgeExt
=
'ms-browser-extension://'
;
// If the client is injected by the browser extension, ignore
// If the client is injected by the browser extension, ignore
// the rest of the host page config.
// the rest of the host page config.
...
...
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