2013-10-03 14:19:40 +02:00
--- viewer/viewer.html.orig 2013-10-03 14:06:24.000000000 +0200
+++ viewer/viewer.html 2013-10-03 13:53:17.000000000 +0200
@@ -31,7 +31,7 @@
2013-01-24 14:03:12 +01:00
<!-- This snippet is used in production, see Makefile -->
<link rel="resource" type="application/l10n" href="locale/locale.properties"/>
<script type="text/javascript" src="l10n.js"></script>
-<script type="text/javascript" src="../build/pdf.js"></script>
+<script type="text/javascript" src="pdf.js"></script>
2013-10-03 14:19:40 +02:00
@@ -88,18 +88,10 @@
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
- <button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="19" data-l10n-id="open_file">
- <span data-l10n-id="open_file_label">Open</span>
- </button>
-
<button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="20" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
- <button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="21" data-l10n-id="download">
- <span data-l10n-id="download_label">Download</span>
- </button>
-
<div class="horizontalToolbarSeparator visibleLargeView"></div>
<button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="22" data-l10n-id="first_page">
@@ -150,20 +142,10 @@
2013-01-24 14:03:12 +01:00
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
2013-10-03 14:19:40 +02:00
- <button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="13" data-l10n-id="open_file">
- <span data-l10n-id="open_file_label">Open</span>
2013-01-24 14:03:12 +01:00
- </button>
-
2013-10-03 14:19:40 +02:00
<button id="print" class="toolbarButton print hiddenMediumView" title="Print" tabindex="14" data-l10n-id="print">
2013-01-24 14:03:12 +01:00
<span data-l10n-id="print_label">Print</span>
</button>
2013-10-03 14:19:40 +02:00
- <button id="download" class="toolbarButton download hiddenMediumView" title="Download" tabindex="15" data-l10n-id="download">
2013-01-24 14:03:12 +01:00
- <span data-l10n-id="download_label">Download</span>
- </button>
- <!-- <div class="toolbarButtonSpacer"></div> -->
2013-10-03 14:19:40 +02:00
- <a href="#" id="viewBookmark" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="16" data-l10n-id="bookmark"><span data-l10n-id="bookmark_label">Current View</span></a>
-
<div class="verticalToolbarSeparator hiddenSmallView"></div>
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="17" data-l10n-id="tools">
--- viewer/viewer.js.orig 2013-10-03 14:06:30.000000000 +0200
+++ viewer/viewer.js 2013-10-03 14:06:00.000000000 +0200
@@ -22,7 +22,7 @@
2013-01-24 14:03:12 +01:00
'use strict';
-var DEFAULT_URL = 'compressed.tracemonkey-pldi-09.pdf';
+var DEFAULT_URL = null;
var DEFAULT_SCALE = 'auto';
var DEFAULT_SCALE_DELTA = 1.1;
var UNKNOWN_SCALE = 0;
2013-10-03 14:19:40 +02:00
@@ -49,7 +49,7 @@
2013-01-24 14:03:12 +01:00
};
2013-10-03 14:19:40 +02:00
PDFJS.imageResourcesPath = './images/';
- PDFJS.workerSrc = '../build/pdf.worker.js';
+ PDFJS.workerSrc = 'pdf.worker.js';
2013-01-24 14:03:12 +01:00
var mozL10n = document.mozL10n || document.webL10n;
2013-10-03 14:19:40 +02:00
@@ -1313,9 +1313,9 @@
this.presentationMode.addEventListener('click',
this.presentationModeClick.bind(this));
- this.openFile.addEventListener('click', this.openFileClick.bind(this));
+ //this.openFile.addEventListener('click', this.openFileClick.bind(this));
this.print.addEventListener('click', this.printClick.bind(this));
- this.download.addEventListener('click', this.downloadClick.bind(this));
+ //this.download.addEventListener('click', this.downloadClick.bind(this));
this.firstPage.addEventListener('click', this.firstPageClick.bind(this));
this.lastPage.addEventListener('click', this.lastPageClick.bind(this));
@@ -3991,8 +3991,8 @@
document.body.appendChild(fileInput);
2013-01-24 14:03:12 +01:00
if (!window.File || !window.FileReader || !window.FileList || !window.Blob) {
- document.getElementById('openFile').setAttribute('hidden', 'true');
2013-10-03 14:19:40 +02:00
- document.getElementById('secondaryOpenFile').setAttribute('hidden', 'true');
+ //document.getElementById('openFile').setAttribute('hidden', 'true');
+ //document.getElementById('secondaryOpenFile').setAttribute('hidden', 'true');
2013-01-24 14:03:12 +01:00
} else {
document.getElementById('fileInput').value = null;
}
2013-10-03 14:19:40 +02:00
@@ -4147,14 +4147,14 @@
document.getElementById('presentationMode').addEventListener('click',
SecondaryToolbar.presentationModeClick.bind(SecondaryToolbar));
2013-01-24 14:03:12 +01:00
- document.getElementById('openFile').addEventListener('click',
2013-10-03 14:19:40 +02:00
- SecondaryToolbar.openFileClick.bind(SecondaryToolbar));
+// document.getElementById('openFile').addEventListener('click',
+// SecondaryToolbar.openFileClick.bind(SecondaryToolbar));
2013-01-24 14:03:12 +01:00
document.getElementById('print').addEventListener('click',
2013-10-03 14:19:40 +02:00
SecondaryToolbar.printClick.bind(SecondaryToolbar));
2013-01-24 14:03:12 +01:00
- document.getElementById('download').addEventListener('click',
2013-10-03 14:19:40 +02:00
- SecondaryToolbar.downloadClick.bind(SecondaryToolbar));
+// document.getElementById('download').addEventListener('click',
+// SecondaryToolbar.downloadClick.bind(SecondaryToolbar));
document.getElementById('contextFirstPage').addEventListener('click',
SecondaryToolbar.firstPageClick.bind(SecondaryToolbar));
@@ -4229,8 +4229,8 @@
store.set('scrollLeft', Math.round(topLeft[0]));
2013-01-24 14:03:12 +01:00
store.set('scrollTop', Math.round(topLeft[1]));
});
2013-10-03 14:19:40 +02:00
- var href = PDFView.getAnchorUrl(pdfOpenParams);
2013-01-24 14:03:12 +01:00
- document.getElementById('viewBookmark').href = href;
2013-10-03 14:19:40 +02:00
+ //var href = PDFView.getAnchorUrl(pdfOpenParams);
+ //document.getElementById('viewBookmark').href = href;
2013-01-24 14:03:12 +01:00
2013-10-03 14:19:40 +02:00
// Update the current bookmark in the browsing history.
PDFHistory.updateCurrentBookmark(pdfOpenParams, pageNumber);
@@ -4273,9 +4273,9 @@
2013-01-24 14:03:12 +01:00
PDFView.setTitleUsingUrl(file.name);
// URL does not reflect proper document location - hiding some icons.
- document.getElementById('viewBookmark').setAttribute('hidden', 'true');
- document.getElementById('download').setAttribute('hidden', 'true');
2013-10-03 14:19:40 +02:00
- document.getElementById('secondaryDownload').setAttribute('hidden', 'true');
+ //document.getElementById('viewBookmark').setAttribute('hidden', 'true');
+ //document.getElementById('download').setAttribute('hidden', 'true');
+ //document.getElementById('secondaryDownload').setAttribute('hidden', 'true');
2013-01-24 14:03:12 +01:00
}, true);
function selectScaleOption(value) {