Commit adff063c authored by Randall Leeds's avatar Randall Leeds

Update Annotator libs to typed-packaging@9e0eff3

Incorporates changes to the PDF plugin to support more recent PDF.js.
parent 60b67a8f
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:02Z ** Built at: 2014-09-25 22:40:54Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:03Z ** Built at: 2014-09-25 22:40:55Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:06Z ** Built at: 2014-09-25 22:40:58Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:09Z ** Built at: 2014-09-25 22:41:02Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:00Z ** Built at: 2014-09-25 22:40:52Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:10Z ** Built at: 2014-09-25 22:41:02Z
*/ */
...@@ -193,13 +193,18 @@ ...@@ -193,13 +193,18 @@
})(window.PageTextMapperCore); })(window.PageTextMapperCore);
Annotator.Plugin.PDF = (function(_super) { Annotator.Plugin.PDF = (function(_super) {
var $;
__extends(PDF, _super); __extends(PDF, _super);
function PDF() { function PDF() {
this.beforeAnnotationCreated = __bind(this.beforeAnnotationCreated, this);
_ref = PDF.__super__.constructor.apply(this, arguments); _ref = PDF.__super__.constructor.apply(this, arguments);
return _ref; return _ref;
} }
$ = Annotator.$;
PDF.prototype.pluginInit = function() { PDF.prototype.pluginInit = function() {
if (!this.annotator.plugins.DomTextMapper) { if (!this.annotator.plugins.DomTextMapper) {
console.warn("The PDF Annotator plugin requires the DomTextMapper plugin. Skipping."); console.warn("The PDF Annotator plugin requires the DomTextMapper plugin. Skipping.");
...@@ -211,6 +216,63 @@ ...@@ -211,6 +216,63 @@
}); });
}; };
PDF.prototype._isPDF = function() {
return window.PDFJS;
};
PDF.prototype._getDocumentURI = function() {
var uri, _ref1, _ref2;
uri = window.location.href;
return (_ref1 = (_ref2 = uri.match('chrome-extension://[a-z]{32}/(.*)')) != null ? _ref2[1] : void 0) != null ? _ref1 : uri;
};
PDF.prototype._getFingerPrintURI = function() {
var fingerprint;
fingerprint = PDFView.documentFingerprint;
return "urn:x-pdf:" + fingerprint;
};
PDF.prototype.uri = function() {
if (!this._isPDF()) {
return null;
}
return this._getFingerPrintURI();
};
PDF.prototype._getTitle = function() {
var title, _ref1;
title = (_ref1 = PDFView.documentInfo.Title) != null ? _ref1.trim() : void 0;
if ((title != null) && title !== "") {
return title;
} else {
return $("head title").text().trim();
}
};
PDF.prototype.metadata = function() {
if (!this._isPDF()) {
return null;
}
return {
link: [
{
href: this._getDocumentURI()
}, {
href: this._getFingerPrintURI()
}
],
title: this._getTitle()
};
};
PDF.prototype.events = {
'beforeAnnotationCreated': 'beforeAnnotationCreated'
};
PDF.prototype.beforeAnnotationCreated = function(annotation) {
return annotation.document = this.metadata();
};
return PDF; return PDF;
})(Annotator.Plugin); })(Annotator.Plugin);
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:05Z ** Built at: 2014-09-25 22:40:57Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:05Z ** Built at: 2014-09-25 22:40:57Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:07Z ** Built at: 2014-09-25 22:40:59Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:07Z ** Built at: 2014-09-25 22:40:59Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:08Z ** Built at: 2014-09-25 22:41:01Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:09Z ** Built at: 2014-09-25 22:41:01Z
*/ */
......
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-ce90a27 ** Annotator 1.2.6-dev-9e0eff3
** https://github.com/okfn/annotator/ ** https://github.com/okfn/annotator/
** **
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning. ** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses. ** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE ** https://github.com/okfn/annotator/blob/master/LICENSE
** **
** Built at: 2014-09-25 22:17:08Z ** Built at: 2014-09-25 22:41:00Z
*/ */
......
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