File tree Expand file tree Collapse file tree 2 files changed +4
-22
lines changed Expand file tree Collapse file tree 2 files changed +4
-22
lines changed Original file line number Diff line number Diff line change @@ -991,7 +991,7 @@ interface GmailCache {
991
991
////////////////////////////////////////////////////////////////////////////////
992
992
993
993
declare class Gmail {
994
- constructor ( localJQuery ?: JQueryStatic ) ;
994
+ constructor ( ) ;
995
995
996
996
version : string ;
997
997
/**
Original file line number Diff line number Diff line change 6
6
7
7
/*eslint-env es6*/
8
8
9
- var Gmail = function ( localJQuery ) {
9
+ import $ from "jquery" ;
10
10
11
- /*
12
- Use the provided "jQuery" if possible, in order to avoid conflicts with
13
- other extensions that use $ for other purposes.
14
- */
15
- var $ ;
16
- if ( typeof localJQuery !== "undefined" ) {
17
- $ = localJQuery ;
18
- } else if ( typeof jQuery !== "undefined" ) {
19
- $ = jQuery ;
20
- } else {
21
- // try load jQuery through node.
22
- try {
23
- $ = require ( "jquery" ) ;
24
- }
25
- catch ( err ) {
26
- // else leave $ undefined, which may be fine for some purposes.
27
- }
28
- }
29
-
30
- var window_opener = typeof ( window ) !== "undefined" ? window . opener : null ;
11
+ const Gmail = function ( ) {
12
+ let window_opener = typeof ( window ) !== "undefined" ? window . opener : null ;
31
13
if ( window_opener ) {
32
14
try {
33
15
// access to window.opener domain will fail in case of cross-origin access
You can’t perform that action at this time.
0 commit comments