Fix HTTP redirection for the extension
This commit is contained in:
parent
6e0891d1f4
commit
84f69eb27f
@ -127,14 +127,14 @@ PdfStreamConverter.prototype = {
|
|||||||
'resource://pdf.js/web/viewer.html', null, null);
|
'resource://pdf.js/web/viewer.html', null, null);
|
||||||
|
|
||||||
// Keep the URL the same so the browser sees it as the same.
|
// Keep the URL the same so the browser sees it as the same.
|
||||||
channel.originalURI = aRequest.originalURI;
|
channel.originalURI = aRequest.URI;
|
||||||
channel.asyncOpen(this.listener, aContext);
|
channel.asyncOpen(this.listener, aContext);
|
||||||
|
|
||||||
// Setup a global listener waiting for the next DOM to be created and verfiy
|
// Setup a global listener waiting for the next DOM to be created and verfiy
|
||||||
// that its the one we want by its URL. When the correct DOM is found create
|
// that its the one we want by its URL. When the correct DOM is found create
|
||||||
// an event listener on that window for the pdf.js events that require
|
// an event listener on that window for the pdf.js events that require
|
||||||
// chrome priviledges.
|
// chrome priviledges.
|
||||||
var url = aRequest.originalURI.spec;
|
var url = aRequest.URI.spec;
|
||||||
var gb = Services.wm.getMostRecentWindow('navigator:browser');
|
var gb = Services.wm.getMostRecentWindow('navigator:browser');
|
||||||
var domListener = function domListener(event) {
|
var domListener = function domListener(event) {
|
||||||
var doc = event.originalTarget;
|
var doc = event.originalTarget;
|
||||||
|
Loading…
Reference in New Issue
Block a user