mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Convert globalScope
and isNodeJS
to proper modules
Slightly unrelated to the rest of the patch, but this also removes an out-of-place `globals` definition from the `web/viewer.js` file.
This commit is contained in:
parent
c2bd3a0bfb
commit
2817121bc1
20 changed files with 34 additions and 27 deletions
|
@ -12,7 +12,6 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* globals chrome */
|
||||
|
||||
'use strict';
|
||||
|
||||
|
@ -30,6 +29,7 @@ if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('CHROME')) {
|
|||
let humanReadableUrl = '/' + defaultUrl + location.hash;
|
||||
history.replaceState(history.state, '', humanReadableUrl);
|
||||
if (top === window) {
|
||||
// eslint-disable-next-line no-undef
|
||||
chrome.runtime.sendMessage('showPageAction');
|
||||
}
|
||||
})();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue