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
23ff8624
Commit
23ff8624
authored
Aug 29, 2013
by
Ujvari Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using broofa/node-uuid uuid library
For better random generation
parent
aa3b3a1d
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
239 additions
and
221 deletions
+239
-221
displayer.coffee
h/js/displayer.coffee
+3
-1
services.coffee
h/js/services.coffee
+3
-1
stream.coffee
h/js/stream.coffee
+3
-1
uuid.js
h/lib/uuid.js
+230
-218
No files found.
h/js/displayer.coffee
View file @
23ff8624
...
...
@@ -16,7 +16,9 @@ class Displayer
this
.
$inject
=
[
'$scope'
,
'$element'
,
'$timeout'
,
'streamfilter'
]
constructor
:
(
$scope
,
$element
,
$timeout
,
streamfilter
)
->
# Generate client ID
@
clientID
=
UUIDjs
.
create
().
toString
()
buffer
=
new
Array
(
16
)
uuid
.
v4
null
,
buffer
,
0
@
clientID
=
uuid
.
unparse
buffer
$scope
.
root
=
document
.
init_annotation
$scope
.
annotation
=
$scope
.
root
.
annotation
...
...
h/js/services.coffee
View file @
23ff8624
...
...
@@ -56,7 +56,9 @@ class Hypothesis extends Annotator
super
(
$document
.
find
'body'
)
# Generate client ID
@
clientID
=
UUIDjs
.
create
().
toString
()
buffer
=
new
Array
(
16
)
uuid
.
v4
null
,
buffer
,
0
@
clientID
=
uuid
.
unparse
buffer
$
.
ajaxSetup
headers
:
"x-client-id"
:
@
clientID
# Load plugins
...
...
h/js/stream.coffee
View file @
23ff8624
...
...
@@ -27,7 +27,9 @@ class Stream
filterClause
=
'user:i='
+
$scope
.
filterValue
# Generate client ID
@
clientID
=
UUIDjs
.
create
().
toString
()
buffer
=
new
Array
(
16
)
uuid
.
v4
null
,
buffer
,
0
@
clientID
=
uuid
.
unparse
buffer
$scope
.
filter
=
streamfilter
...
...
h/lib/uuid.js
View file @
23ff8624
This diff is collapsed.
Click to expand it.
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