From 447ad917da78126acab9b529fe7254074336aa72 Mon Sep 17 00:00:00 2001 From: pacien Date: Wed, 18 Jul 2018 21:57:35 +0200 Subject: First working prototype --- pointless/viewer/viewer.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 pointless/viewer/viewer.js (limited to 'pointless/viewer/viewer.js') diff --git a/pointless/viewer/viewer.js b/pointless/viewer/viewer.js new file mode 100644 index 0000000..00c6f76 --- /dev/null +++ b/pointless/viewer/viewer.js @@ -0,0 +1,23 @@ +/* + * viewer.js + * Part of Pointless Viewer, a Beamer presentation viewer + * Copyright 2018 Pacien TRAN-GIRARD + * License: GNU GPL v3 + */ + +"use strict"; + +var params = function() { + var queryDict = {}; + location.search.substr(1).split("&").forEach(function(item) { + var pair = item.split("="); + queryDict[pair[0]] = pair[1]; + }); + return queryDict; +}(); + +if (window.opener == null) { + pdfjsLib.getDocument(params["file"]).then(function(pdf) { + var presentation = new Presentation(pdf); + }); +} -- cgit v1.2.3