Commit 23ff8624 authored by Ujvari Gergely's avatar Ujvari Gergely

Using broofa/node-uuid uuid library

For better random generation
parent aa3b3a1d
...@@ -16,7 +16,9 @@ class Displayer ...@@ -16,7 +16,9 @@ class Displayer
this.$inject = ['$scope','$element','$timeout','streamfilter'] this.$inject = ['$scope','$element','$timeout','streamfilter']
constructor: ($scope, $element, $timeout, streamfilter) -> constructor: ($scope, $element, $timeout, streamfilter) ->
# Generate client ID # 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.root = document.init_annotation
$scope.annotation = $scope.root.annotation $scope.annotation = $scope.root.annotation
......
...@@ -56,7 +56,9 @@ class Hypothesis extends Annotator ...@@ -56,7 +56,9 @@ class Hypothesis extends Annotator
super ($document.find 'body') super ($document.find 'body')
# Generate client ID # 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 $.ajaxSetup headers: "x-client-id": @clientID
# Load plugins # Load plugins
......
...@@ -27,7 +27,9 @@ class Stream ...@@ -27,7 +27,9 @@ class Stream
filterClause = 'user:i=' + $scope.filterValue filterClause = 'user:i=' + $scope.filterValue
# Generate client ID # Generate client ID
@clientID = UUIDjs.create().toString() buffer = new Array(16)
uuid.v4 null, buffer, 0
@clientID = uuid.unparse buffer
$scope.filter = $scope.filter =
streamfilter streamfilter
......
This diff is collapsed.
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