File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import './bootstrap' ;
22
33import jQuery from '$' ;
4- window . $ = jQuery ;
5-
64import 'flowbite' ;
75
86import '@fortawesome/fontawesome-free/scss/fontawesome.scss' ;
@@ -18,6 +16,8 @@ import Alpine from 'alpinejs'
1816import FormsAlpinePlugin from '../../vendor/filament/forms/dist/module.esm'
1917import NotificationsAlpinePlugin from '../../vendor/filament/notifications/dist/module.esm'
2018
19+ window . $ = jQuery ;
20+
2121Alpine . plugin ( FormsAlpinePlugin )
2222Alpine . plugin ( NotificationsAlpinePlugin )
2323
@@ -48,3 +48,18 @@ if ($('.magnificpopup-container').length) {
4848 }
4949 } ) ;
5050}
51+
52+ // Copy text to clipboard
53+ window . unsecuredCopyToClipboard = function ( text ) {
54+ const textArea = document . createElement ( "textarea" ) ;
55+ textArea . value = text ;
56+ document . body . appendChild ( textArea ) ;
57+ textArea . focus ( ) ;
58+ textArea . select ( ) ;
59+ try {
60+ document . execCommand ( 'copy' ) ;
61+ } catch ( err ) {
62+ console . error ( 'Unable to copy to clipboard' , err ) ;
63+ }
64+ document . body . removeChild ( textArea ) ;
65+ }
Original file line number Diff line number Diff line change 8383 @push (' scripts' )
8484 <script >
8585 window .addEventListener (' ticketUrlCopied' , (event ) => {
86- navigator . clipboard . writeText (event .detail .url );
86+ window . unsecuredCopyToClipboard (event .detail .url );
8787 });
8888 </script >
8989 @endpush
Original file line number Diff line number Diff line change 153153 });
154154
155155 window .addEventListener (' ticketUrlCopied' , (event ) => {
156- navigator . clipboard . writeText (event .detail .url );
156+ window . unsecuredCopyToClipboard (event .detail .url );
157157 });
158158 </script >
159159 @endpush
You can’t perform that action at this time.
0 commit comments