|
|
@ -48,6 +48,9 @@ ChromeActions.prototype = { |
|
|
|
setDatabase: function(data) { |
|
|
|
setDatabase: function(data) { |
|
|
|
if (this.inPrivateBrowswing) |
|
|
|
if (this.inPrivateBrowswing) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
// Protect against something sending tons of data to setDatabase.
|
|
|
|
|
|
|
|
if (data.length > 4096) |
|
|
|
|
|
|
|
return; |
|
|
|
application.prefs.setValue(EXT_PREFIX + '.database', data); |
|
|
|
application.prefs.setValue(EXT_PREFIX + '.database', data); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getDatabase: function() { |
|
|
|
getDatabase: function() { |
|
|
@ -142,7 +145,7 @@ PdfStreamConverter.prototype = { |
|
|
|
// 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. Code snippet from John Galt.
|
|
|
|
let window = aRequest.loadGroup.groupObserver |
|
|
|
let window = aRequest.loadGroup.groupObserver |
|
|
|
.QueryInterface(Ci.nsIWebProgress) |
|
|
|
.QueryInterface(Ci.nsIWebProgress) |
|
|
|
.DOMWindow; |
|
|
|
.DOMWindow; |
|
|
|