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
90738870
Commit
90738870
authored
Jul 15, 2015
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polyfill Promise properly
parent
1a069f6a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
4 deletions
+3
-4
guest.coffee
h/static/scripts/annotator/guest.coffee
+0
-1
main.js
h/static/scripts/annotator/main.js
+2
-0
pdf.coffee
h/static/scripts/annotator/plugin/pdf.coffee
+0
-1
guest-test.coffee
h/static/scripts/annotator/test/guest-test.coffee
+0
-1
karma.config.js
h/static/scripts/karma.config.js
+1
-0
annotation-mapper-test.coffee
h/static/scripts/test/annotation-mapper-test.coffee
+0
-1
No files found.
h/static/scripts/annotator/guest.coffee
View file @
90738870
raf
=
require
(
'raf'
)
raf
=
require
(
'raf'
)
Promise
=
global
.
Promise
?
require
(
'es6-promise'
).
Promise
Annotator
=
require
(
'annotator'
)
Annotator
=
require
(
'annotator'
)
$
=
Annotator
.
$
$
=
Annotator
.
$
...
...
h/static/scripts/annotator/main.js
View file @
90738870
...
@@ -8,6 +8,8 @@ require('jquery-scrollintoview')
...
@@ -8,6 +8,8 @@ require('jquery-scrollintoview')
var
g
=
Annotator
.
Util
.
getGlobal
();
var
g
=
Annotator
.
Util
.
getGlobal
();
if
(
g
.
wgxpath
)
g
.
wgxpath
.
install
();
if
(
g
.
wgxpath
)
g
.
wgxpath
.
install
();
require
(
'es6-promise'
)
var
nodeIteratorShim
=
require
(
'node-iterator-shim'
)
var
nodeIteratorShim
=
require
(
'node-iterator-shim'
)
nodeIteratorShim
();
nodeIteratorShim
();
...
...
h/static/scripts/annotator/plugin/pdf.coffee
View file @
90738870
extend
=
require
(
'extend'
)
extend
=
require
(
'extend'
)
Promise
=
global
.
Promise
?
require
(
'es6-promise'
).
Promise
Annotator
=
require
(
'annotator'
)
Annotator
=
require
(
'annotator'
)
...
...
h/static/scripts/annotator/test/guest-test.coffee
View file @
90738870
raf
=
require
(
'raf'
)
raf
=
require
(
'raf'
)
Promise
=
global
.
Promise
?
require
(
'es6-promise'
).
Promise
Annotator
=
require
(
'annotator'
)
Annotator
=
require
(
'annotator'
)
Guest
=
require
(
'../guest'
)
Guest
=
require
(
'../guest'
)
anchoring
=
require
(
'../anchoring/html'
)
anchoring
=
require
(
'../anchoring/html'
)
...
...
h/static/scripts/karma.config.js
View file @
90738870
...
@@ -36,6 +36,7 @@ module.exports = function(config) {
...
@@ -36,6 +36,7 @@ module.exports = function(config) {
'vendor/moment-timezone.js'
,
'vendor/moment-timezone.js'
,
'vendor/moment-timezone-data.js'
,
'vendor/moment-timezone-data.js'
,
'vendor/polyfills/url.js'
,
'vendor/polyfills/url.js'
,
'../../../node_modules/es6-promise/dist/es6-promise.js'
,
// Test deps
// Test deps
'vendor/angular-mocks.js'
,
'vendor/angular-mocks.js'
,
...
...
h/static/scripts/test/annotation-mapper-test.coffee
View file @
90738870
Promise
=
global
.
Promise
?
require
(
'es6-promise'
).
Promise
{
module
,
inject
}
=
require
(
'angular-mock'
)
{
module
,
inject
}
=
require
(
'angular-mock'
)
assert
=
chai
.
assert
assert
=
chai
.
assert
...
...
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