[CRX] Remove redundant location.origin check
The PDF Viewer will always be rendered directly from the extension,
so checking "origin == chrome-extension:/.." is not needed any more.
( since edd4bae903
)
This commit is contained in:
parent
aeaf11ca43
commit
b0e18a0703
@ -1564,9 +1564,6 @@ var DocumentOutlineView = function documentOutlineView(outline) {
|
|||||||
//(function rewriteUrlClosure() {
|
//(function rewriteUrlClosure() {
|
||||||
// // Run this code outside DOMContentLoaded to make sure that the URL
|
// // Run this code outside DOMContentLoaded to make sure that the URL
|
||||||
// // is rewritten as soon as possible.
|
// // is rewritten as soon as possible.
|
||||||
// if (location.origin + '/' !== chrome.extension.getURL('/')) {
|
|
||||||
// DEFAULT_URL = window.location.href.split('#')[0];
|
|
||||||
// } else {
|
|
||||||
// var params = PDFView.parseQueryString(document.location.search.slice(1));
|
// var params = PDFView.parseQueryString(document.location.search.slice(1));
|
||||||
// DEFAULT_URL = params.file || DEFAULT_URL;
|
// DEFAULT_URL = params.file || DEFAULT_URL;
|
||||||
//
|
//
|
||||||
@ -1576,7 +1573,6 @@ var DocumentOutlineView = function documentOutlineView(outline) {
|
|||||||
// if (top === window) {
|
// if (top === window) {
|
||||||
// chrome.runtime.sendMessage('showPageAction');
|
// chrome.runtime.sendMessage('showPageAction');
|
||||||
// }
|
// }
|
||||||
// }
|
|
||||||
//})();
|
//})();
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
@ -1594,12 +1590,6 @@ document.addEventListener('DOMContentLoaded', function webViewerLoad(evt) {
|
|||||||
//var file = DEFAULT_URL;
|
//var file = DEFAULT_URL;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if CHROME
|
|
||||||
//if (location.protocol !== 'chrome-extension:') {
|
|
||||||
// file = location.href.split('#')[0];
|
|
||||||
//}
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
//#if !(FIREFOX || MOZCENTRAL || CHROME || B2G)
|
//#if !(FIREFOX || MOZCENTRAL || CHROME || B2G)
|
||||||
var fileInput = document.createElement('input');
|
var fileInput = document.createElement('input');
|
||||||
fileInput.id = 'fileInput';
|
fileInput.id = 'fileInput';
|
||||||
|
Loading…
Reference in New Issue
Block a user