@@ -41,7 +41,7 @@ const urlBuilderMap = {
41
41
} ;
42
42
43
43
const openUrl = ( buttonUrl ) => ( ) => {
44
- globalThis . open ( buttonUrl , "_blank" , "noopener,noreferrer" ) ;
44
+ window . open ( buttonUrl , "_blank" , "noopener,noreferrer" ) ;
45
45
} ;
46
46
47
47
const init = ( ) => {
@@ -63,7 +63,7 @@ const init = () => {
63
63
child . addEventListener ( "click" , ( ) => {
64
64
const url = child . dataset . url ||
65
65
container . dataset . url ||
66
- globalThis . location . href ;
66
+ window . location . href ;
67
67
navigator . clipboard . writeText ( url ) ;
68
68
child . classList . add ( "done" ) ;
69
69
setTimeout ( ( ) => {
@@ -75,7 +75,7 @@ const init = () => {
75
75
// if it's "Print"
76
76
if ( cls === "print" ) {
77
77
child . addEventListener ( "click" , ( ) => {
78
- globalThis . print ( ) ;
78
+ window . print ( ) ;
79
79
} ) ;
80
80
}
81
81
@@ -88,7 +88,7 @@ const init = () => {
88
88
text : child . dataset . text || container . dataset . text || "" ,
89
89
url : child . dataset . url ||
90
90
container . dataset . url ||
91
- globalThis . location . href ,
91
+ window . location . href ,
92
92
} ;
93
93
94
94
if ( navigator . canShare && navigator . canShare ( data ) ) {
@@ -106,7 +106,7 @@ const init = () => {
106
106
url : encodeURIComponent (
107
107
child . dataset . url ||
108
108
container . dataset . url ||
109
- globalThis . location . href ,
109
+ window . location . href ,
110
110
) ,
111
111
title : encodeURIComponent (
112
112
child . dataset . title ||
0 commit comments