diff --git a/extensions/firefox/components/PdfStreamConverter.js b/extensions/firefox/components/PdfStreamConverter.js
index cac5f210f..270a73a38 100644
--- a/extensions/firefox/components/PdfStreamConverter.js
+++ b/extensions/firefox/components/PdfStreamConverter.js
@@ -720,6 +720,15 @@ PdfStreamConverter.prototype = {
// Change the content type so we don't get stuck in a loop.
aRequest.setProperty('contentType', aRequest.contentType);
aRequest.contentType = 'text/html';
+ if (isHttpRequest) {
+ // We trust PDF viewer, using no CSP
+ aRequest.setResponseHeader('Content-Security-Policy', '', false);
+ aRequest.setResponseHeader('Content-Security-Policy-Report-Only', '',
+ false);
+ aRequest.setResponseHeader('X-Content-Security-Policy', '', false);
+ aRequest.setResponseHeader('X-Content-Security-Policy-Report-Only', '',
+ false);
+ }
if (!rangeRequest) {
// Creating storage for PDF data
diff --git a/web/ui_utils.js b/web/ui_utils.js
index 0b2980ffc..69ba8dc78 100644
--- a/web/ui_utils.js
+++ b/web/ui_utils.js
@@ -117,6 +117,13 @@ function scrollIntoView(element, spot) {
parent.scrollTop = offsetY;
}
+/**
+ * Event handler to suppress context menu.
+ */
+function noContextMenuHandler(e) {
+ e.preventDefault();
+}
+
/**
* Returns the filename or guessed filename from the url (see issue 3455).
* url {String} The original PDF location.
diff --git a/web/viewer.html b/web/viewer.html
index 14c54797b..b8a914d92 100644
--- a/web/viewer.html
+++ b/web/viewer.html
@@ -158,8 +158,6 @@ limitations under the License.
-
-
@@ -190,7 +188,7 @@ limitations under the License.
-