1
- "use strict" ; function e ( e ) { if ( chrome . runtime . lastError && console . log ( "Error while sending message=" + chrome . runtime . lastError . message ) , ! e ) return void window . close ( ) ; const n = e . raiseHandEnabled , a = e . isHandRaised , i = e . canStartChat , s = e . isSharingScreen ; var d ; console . log ( "Hand Raise " + ( n ?"allowed" :"not allowed" ) + ". Hand " + ( a ?"is raised" :"isn't raised" ) + " Student " + ( i ?"can" :"cannot" ) + " start a chat" ) , function ( e ) { e ?( document . getElementById ( "handRaiseButtonContainer" ) . setAttribute ( "class" , "btn-container" ) , document . getElementById ( "handRaiseAlert" ) . style . display = "none" ) :( document . getElementById ( "handRaiseButtonContainer" ) . setAttribute ( "class" , "btn-container disabled" ) , document . getElementById ( "handRaiseAlert" ) . style . display = "block" ) ; document . getElementById ( "tpRaiseHandButton" ) . innerHTML = "Raise hand" } ( n ) , void 0 !== i && function ( e ) { e ?document . getElementById ( "chatButtonContainer" ) . setAttribute ( "class" , "btn-container" ) :document . getElementById ( "chatButtonContainer" ) . setAttribute ( "class" , "btn-container disabled" ) } ( i ) , t ( ! 0 === n && a ) , d = s , document . getElementById ( "screenShareStatus" ) . style . display = d ?"block" :"none" } function t ( e ) { if ( e ) document . getElementById ( "tpRaiseHandButton" ) . innerHTML = "Cancel hand raise" ; else { let e = "btn-container" ; document . getElementById ( "handRaiseButtonContainer" ) . className . split ( " " ) . indexOf ( "disabled" ) >= 0 && ( e += " disabled" ) , document . getElementById ( "handRaiseButtonContainer" ) . setAttribute ( "class" , e ) , document . getElementById ( "tpRaiseHandButton" ) . innerHTML = "Raise hand" } } window . addEventListener ( "load" , function ( ) { const t = document . getElementById ( "handRaiseButtonContainer" ) . childNodes [ 1 ] ; t . addEventListener ( "click" , function ( ) { t . parentElement . className . split ( " " ) . indexOf ( "disabled" ) >= 0 || chrome . runtime . sendMessage ( { action :"popup" , popup :"handRaiseClick" } , e ) } ) ; const n = document . getElementById ( "chatButtonContainer" ) . childNodes [ 1 ] ; n . addEventListener ( "click" , function ( ) { n . parentElement . className . split ( " " ) . indexOf ( "disabled" ) >= 0 || chrome . runtime . sendMessage ( { action :"popup" , popup :"startChatClick" } , e ) } ) , chrome . runtime . sendMessage ( { action :"popup" , popup :"hello" } , e ) } ) ;
1
+ "use strict" ;
2
+ function e ( e ) {
3
+ if (
4
+ ( chrome . runtime . lastError &&
5
+ console . log (
6
+ "Error while sending message=" + chrome . runtime . lastError . message ,
7
+ ) ,
8
+ ! e )
9
+ )
10
+ return void window . close ( ) ;
11
+ const n = e . raiseHandEnabled ,
12
+ a = e . isHandRaised ,
13
+ i = e . canStartChat ,
14
+ s = e . isSharingScreen ;
15
+ var d ;
16
+ console . log (
17
+ "Hand Raise " +
18
+ ( n ? "allowed" : "not allowed" ) +
19
+ ". Hand " +
20
+ ( a ? "is raised" : "isn't raised" ) +
21
+ " Student " +
22
+ ( i ? "can" : "cannot" ) +
23
+ " start a chat" ,
24
+ ) ,
25
+ ( function ( e ) {
26
+ e
27
+ ? ( document
28
+ . getElementById ( "handRaiseButtonContainer" )
29
+ . setAttribute ( "class" , "btn-container" ) ,
30
+ ( document . getElementById ( "handRaiseAlert" ) . style . display = "none" ) )
31
+ : ( document
32
+ . getElementById ( "handRaiseButtonContainer" )
33
+ . setAttribute ( "class" , "btn-container disabled" ) ,
34
+ ( document . getElementById ( "handRaiseAlert" ) . style . display = "block" ) ) ;
35
+ document . getElementById ( "tpRaiseHandButton" ) . innerHTML = "Raise hand" ;
36
+ } ) ( n ) ,
37
+ void 0 !== i &&
38
+ ( function ( e ) {
39
+ e
40
+ ? document
41
+ . getElementById ( "chatButtonContainer" )
42
+ . setAttribute ( "class" , "btn-container" )
43
+ : document
44
+ . getElementById ( "chatButtonContainer" )
45
+ . setAttribute ( "class" , "btn-container disabled" ) ;
46
+ } ) ( i ) ,
47
+ t ( ! 0 === n && a ) ,
48
+ ( d = s ) ,
49
+ ( document . getElementById ( "screenShareStatus" ) . style . display = d
50
+ ? "block"
51
+ : "none" ) ;
52
+ }
53
+ function t ( e ) {
54
+ if ( e )
55
+ document . getElementById ( "tpRaiseHandButton" ) . innerHTML =
56
+ "Cancel hand raise" ;
57
+ else {
58
+ let e = "btn-container" ;
59
+ document
60
+ . getElementById ( "handRaiseButtonContainer" )
61
+ . className . split ( " " )
62
+ . indexOf ( "disabled" ) >= 0 && ( e += " disabled" ) ,
63
+ document
64
+ . getElementById ( "handRaiseButtonContainer" )
65
+ . setAttribute ( "class" , e ) ,
66
+ ( document . getElementById ( "tpRaiseHandButton" ) . innerHTML = "Raise hand" ) ;
67
+ }
68
+ }
69
+ window . addEventListener ( "load" , function ( ) {
70
+ const t = document . getElementById ( "handRaiseButtonContainer" ) . childNodes [ 1 ] ;
71
+ t . addEventListener ( "click" , function ( ) {
72
+ t . parentElement . className . split ( " " ) . indexOf ( "disabled" ) >= 0 ||
73
+ chrome . runtime . sendMessage (
74
+ { action : "popup" , popup : "handRaiseClick" } ,
75
+ e ,
76
+ ) ;
77
+ } ) ;
78
+ const n = document . getElementById ( "chatButtonContainer" ) . childNodes [ 1 ] ;
79
+ n . addEventListener ( "click" , function ( ) {
80
+ n . parentElement . className . split ( " " ) . indexOf ( "disabled" ) >= 0 ||
81
+ chrome . runtime . sendMessage (
82
+ { action : "popup" , popup : "startChatClick" } ,
83
+ e ,
84
+ ) ;
85
+ } ) ,
86
+ chrome . runtime . sendMessage ( { action : "popup" , popup : "hello" } , e ) ;
87
+ } ) ;
0 commit comments