Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
trietphm committed Nov 3, 2018
1 parent 7d5acfa commit bc886a8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ app.on('ready', function() {
mainWindow = null;
});
});

app.on('window-all-closed', () => {
app.quit();
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pv",
"version": "1.0.0",
"version": "1.1.1",
"description": "",
"main": "main.js",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions pdfjs/build/pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
"use strict";


var pdfjsVersion = '2.1.4';
var pdfjsBuild = 'c76c9878';
var pdfjsVersion = '2.1.6';
var pdfjsBuild = 'f803318b';
var pdfjsSharedUtil = __w_pdfjs_require__(1);
var pdfjsDisplayAPI = __w_pdfjs_require__(129);
var pdfjsDisplayTextLayer = __w_pdfjs_require__(145);
Expand Down Expand Up @@ -8039,7 +8039,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
}
return worker.messageHandler.sendWithPromise('GetDocRequest', {
docId: docId,
apiVersion: '2.1.4',
apiVersion: '2.1.6',
source: {
data: source.data,
url: source.url,
Expand Down Expand Up @@ -9663,8 +9663,8 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
}();
var version, build;
{
exports.version = version = '2.1.4';
exports.build = build = 'c76c9878';
exports.version = version = '2.1.6';
exports.build = build = 'f803318b';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
Expand Down
6 changes: 3 additions & 3 deletions pdfjs/build/pdf.worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ return /******/ (function(modules) { // webpackBootstrap
"use strict";


var pdfjsVersion = '2.1.4';
var pdfjsBuild = 'c76c9878';
var pdfjsVersion = '2.1.6';
var pdfjsBuild = 'f803318b';
var pdfjsCoreWorker = __w_pdfjs_require__(1);
exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;

Expand Down Expand Up @@ -339,7 +339,7 @@ var WorkerMessageHandler = {
var cancelXHRs = null;
var WorkerTasks = [];
var apiVersion = docParams.apiVersion;
var workerVersion = '2.1.4';
var workerVersion = '2.1.6';
if (apiVersion !== workerVersion) {
throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".'));
}
Expand Down
3 changes: 3 additions & 0 deletions pdfjs/web/viewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,9 @@ html[dir='rtl'] .findbar {
#findInput::-webkit-input-placeholder {
color: hsl(0, 0%, 75%);
}
#findInput:-ms-input-placeholder {
font-style: italic;
}
#findInput::-ms-input-placeholder {
font-style: italic;
}
Expand Down
7 changes: 4 additions & 3 deletions pdfjs/web/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<script src="viewer.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.6.2/mousetrap.min.js"></script>
<script src="../node_modules/mousetrap/mousetrap.min.js"></script>
</head>

<body tabindex="1" class="loadingInProgress">
Expand Down Expand Up @@ -392,11 +392,12 @@
<div id="printContainer"></div>
</body>
<script>
const e = document.getElementById('viewerContainer');
Mousetrap.bind('j', function() {
document.getElementById('viewerContainer').scrollTop += 50;
e.scrollTop += 50;
});
Mousetrap.bind('k', function() {
document.getElementById('viewerContainer').scrollTop -= 50;
e.scrollTop -= 50;
});
</script>
</html>
Expand Down

0 comments on commit bc886a8

Please sign in to comment.