This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
selectorExtension = require('./selectorExtension') | |
CustomAnnotator = Annotator.extend(selectorExtension) | |
annotator = new CustomAnnotator(...) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is our interaction point | |
position = null; | |
$(document.body).on('mouseup', function (event) { | |
}); | |
var annotator = Annotator.create({ | |
onSelection: function (event) { | |
// We have to trigger this event ourselves. | |
// Could be as simple as: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Util = require('../src/util') | |
$ = Util.$ | |
Adder = require('../src/plugin/adder') | |
Viewer = require('../src/plugin/viewer') | |
Editor = require('../src/plugin/editor') | |
TextSelector = require('../src/plugin/textselector') | |
Highlighter = require('../src/plugin/highlighter') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 318158cf7ee82797969e5ab2fa559ca6ab4dfa6a | |
Merge: 0610025 a17f146 | |
Author: Randall Leeds <tilgovi@hypothes.is> | |
Date: Mon Jul 28 22:29:32 2014 -0700 | |
WIP on master: 0610025 Bump annotator-store version for security fix | |
diff --cc h/static/scripts/app_directives.coffee | |
index 7bac3cc,7bac3cc..4e03cca | |
diff --cc h/static/scripts/controllers.coffee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Log localhost port 8000 in the background | |
sudo tcpdump -i lo tcp port 8000 > log.txt & | |
# Send 5 megabytes upload | |
head -c5M /dev/urandom | curl -v -XPOST -d@- localhost:8000 | |
# End the tcpdump and cat the log file | |
fg | |
^C | |
cat log.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('h.history', [ | |
'h.settings' | |
], | |
[ | |
'$provide', 'settings' | |
($provide, settings) -> | |
if settings.framed | |
$provide.decorator '$window', captureHistory | |
$provide.decorator '$sniffer', forceHistory | |
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Annotator = require('annotator'); | |
function dump(data) { | |
var result = {}; | |
result['@context'] = 'http://www.w3.org/ns/oa-context-20130208.json'; | |
if (typeof(data.id) !== 'undefined') { | |
result['@id'] = data.id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function MyPlugin(element, options) { | |
Annotator.Plugin.call(this, element, options); | |
// At this point, `this.element` will be a jQuery-wrapped reference to | |
// the element argument and `this.options` will be a copy of the options | |
// object (if any) that you define on the prototype with overrides specified | |
// by the argument to this function. See below for more. | |
this.options.someObject = {}; // See below. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/h/static/scripts/annotator/monkey.coffee b/h/static/scripts/annotator/monkey.coffee | |
index da800da..51c8561 100644 | |
--- a/h/static/scripts/annotator/monkey.coffee | |
+++ b/h/static/scripts/annotator/monkey.coffee | |
@@ -9,6 +9,12 @@ Util = Annotator.Util | |
delete Annotator.prototype.events[".annotator-hl mouseover"] | |
delete Annotator.prototype.events[".annotator-hl mouseout"] | |
+# Add createHighlight | |
+Annotator.prototype.createHighlight = -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/h/static/scripts/stream-controller.coffee b/h/static/scripts/stream-controller.coffee | |
index 1a275a1..ccb4575 100644 | |
--- a/h/static/scripts/stream-controller.coffee | |
+++ b/h/static/scripts/stream-controller.coffee | |
@@ -5,26 +5,32 @@ module.exports = class StreamController | |
this.inject = [ | |
'$scope', '$rootScope', '$routeParams', | |
'auth', 'queryParser', 'searchFilter', 'store', | |
- 'streamer', 'streamFilter', 'annotationMapper' | |
+ 'streamer', 'streamFilter', 'threading', 'annotationMapper' |
OlderNewer