This file contains hidden or 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 hidden or 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 <[email protected]> | |
| 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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' |
This file contains hidden or 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 to check whether an anchor is currently attached to the document. | |
| function isAttached(anchor) { | |
| // If there are no highlights it is not attached at all. | |
| if (anchor.highlights == null) { | |
| return false; | |
| } | |
| // Check if any of highlights have since been removed from the document. | |
| for (var i = 0 ; i < anchor.highlights.length ; i++) { | |
| if (!document.contains(anchor.highlights[i])) { |
This file contains hidden or 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 962fe64b4dd5b0a4b02fda6f08a7c81d0e40d961 | |
| Merge: 367c72c 595968e | |
| Author: Randall Leeds <[email protected]> | |
| Date: Mon Feb 9 14:47:14 2015 -0800 | |
| WIP on master: 367c72c Remove selenium test requirement | |
| diff --cc h/static/scripts/annotation-mapper-service.coffee | |
| index 62d2c08,62d2c08..d95fed1 | |
| --- a/h/static/scripts/annotation-mapper-service.coffee |