Skip to content

Commit 82c42b8

Browse files
Add files via upload
1 parent 3854b09 commit 82c42b8

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

WebServerAI/assets/AI/js/webserverai.min.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff 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'))

WebServerAI/build/clock/info.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ fr-fr:
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"

WebServerAI/build/tables/info.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ fr-fr:
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"

WebServerAI/build/video-player/info.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ fr-fr:
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"

WebServerAI/data/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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":[]

WebServerAI/index.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@
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>

0 commit comments

Comments
 (0)