Commit 41875e6f authored by Gergely Ujvari's avatar Gergely Ujvari

Update Annotator Pdf plugin to typed-packaging@95b7a09dd87be2fa637973d0b0cad55a4b345af3

Fix #1661
parent 02ca6c59
// Generated by CoffeeScript 1.6.3 // Generated by CoffeeScript 1.6.3
/* /*
** Annotator 1.2.6-dev-fcdf1ea ** Annotator 1.2.6-dev-95b7a09
** 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-10-25 11:58:09Z ** Built at: 2014-11-26 22:32:31Z
*/ */
...@@ -261,16 +261,24 @@ ...@@ -261,16 +261,24 @@
}; };
PDF.prototype._metadata = function() { PDF.prototype._metadata = function() {
return { var documentURI, metadata;
metadata = {
link: [ link: [
{ {
href: this._getDocumentURI()
}, {
href: this._getFingerPrintURI() href: this._getFingerPrintURI()
} }
], ],
title: this._getTitle() title: this._getTitle()
}; };
documentURI = this._getDocumentURI();
if (documentURI.toLowerCase().indexOf('file://') === 0) {
metadata.filename = new URL(documentURI).pathname.split('/').pop();
} else {
metadata.link.push({
href: documentURI
});
}
return metadata;
}; };
PDF.prototype.getMetaData = function() { PDF.prototype.getMetaData = function() {
......
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