File tree Expand file tree Collapse file tree 6 files changed +19
-6
lines changed
Expand file tree Collapse file tree 6 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ window.WebServerAI = class {
8989 this . history = ( this . getHistory ? this . getHistory . split ( ',' ) : [ ] ) ;
9090 this . listen = new Listener ( ) ;
9191 this . checked = false ;
92+ this . responces = '' ;
9293 }
9394
9495 /**
@@ -660,6 +661,13 @@ window.WebServerAI = class {
660661 } ) ;
661662 }
662663 }
664+ /**
665+ * Returns the information
666+ * @param {Function } callback Get the results after submit
667+ */
668+ results ( callback ) {
669+ callback ( this . responces ) ;
670+ }
663671 /**
664672 * Filters out special characters
665673 * @param {String } str String to filter
@@ -773,7 +781,7 @@ window.WebServerAI = class {
773781 msg = filter ( msg , filterWords ) ;
774782 let rsp = this . request ( this . origin + '/WebServerAI/libs/ai_sender.php?wsaai=' + encodeURIComponent ( msg ) ) ,
775783 res = this . listen . render ( rsp , this . output ) ;
776- console . log ( res ) ;
784+ this . responces = res ;
777785 if ( res ) {
778786 setTimeout ( ( ) => {
779787 this . createCmd ( this . botName , this . lang [ 'dictionary' ] . ai . success , 'success' ) ;
@@ -819,6 +827,7 @@ window.WebServerAI = class {
819827 this . #getElemName( ) ;
820828 } , 100 ) ;
821829 }
830+
822831 copyToClip ( e ) {
823832 navigator . clipboard . writeText ( e . parentElement . querySelector ( '.wsa-txt' ) . innerText )
824833 . then ( ( ) => alert ( 'Copied to clipboard' ) )
Original file line number Diff line number Diff line change 1010 name : Horloge
1111 updated : 6/11/24
1212 version : 0.0.1
13- ai_version : " 0.0.3 - Beta"
13+ ai_version : " 0.0.4 - Beta"
Original file line number Diff line number Diff line change 1616 version : 0.0.1
1717 tableInvalidInfo : ' Le tableau ne contient pas d`informations valides!'
1818 tableMismatch : ' Les en-têtes et les cellules du tableau ne correspondent pas'
19- ai_version : " 0.0.3 - Beta"
19+ ai_version : " 0.0.4 - Beta"
Original file line number Diff line number Diff line change 1616 version : 0.0.1
1717 play : ' Jouer'
1818 pause : ' Pause'
19- ai_version : " 0.0.3 - Beta"
19+ ai_version : " 0.0.4 - Beta"
Original file line number Diff line number Diff line change 11{
22 "AI" :{
33 "Name" : " WebServerAI" ,
4- "Version" : " 0.0.3 - Beta" ,
5- "Updated" : " 07/15 /2024" ,
4+ "Version" : " 0.0.4 - Beta" ,
5+ "Updated" : " 07/16 /2024" ,
66 "ResponceTime" : 1000 ,
77 "blockWords" :[],
88 "blockDomains" :[]
Original file line number Diff line number Diff line change 8080 if ($input ){
8181 wsc . addCmd ($input );
8282 wsc . send ($input , true );
83+ wsc . results (($o )=> {
84+ console . log ($o );
85+ });
8386 }
8487 });
88+
8589 }
8690 </script >
8791 </body >
You can’t perform that action at this time.
0 commit comments