Revoltzik 0 Opublikowano 23 sierpnia 2018 Udostępnij Opublikowano 23 sierpnia 2018 (edytowane) Jak połączyć te dwa skrypty? var msg = ""; var rep = "Witam"; function Und() { var messages = document.querySelectorAll(".msg-body"); var newest = messages[messages.length-1].innerHTML; if(newest == msg) { return; } msg = newest; if(msg.includes("cześć") | msg.includes("Cześć") | msg.includes("Witam") | msg.includes("hej") | msg.includes("elo")) { document.querySelector(".chat-input").value = rep; document.querySelector(".chatInputSend").click(); } } setInterval(Und, 100); var msg = ""; var rep = "ŻEGNAJ"; function Und() { var messages = document.querySelectorAll(".msg-body"); var newest = messages[messages.length-1].innerHTML; if(newest == msg) { return; } msg = newest; if(msg.includes("SPADAM") | msg.includes("narazie") | msg.includes("trzymaj się") | msg.includes("papa") | msg.includes("pa")) { document.querySelector(".chat-input").value = rep; document.querySelector(".chatInputSend").click(); } } setInterval(Und, 100); Edytowane 23 sierpnia 2018 przez LjayPL789 Poprawiam czytelność tematu; poprawiam również ortografię i wstawiam w code. Notatka dodana przez bludis Odnośnik do komentarza https://skript.pl/temat/29138-jak-po%C5%82%C4%85czy%C4%87-te-dwa-skrypty/ Udostępnij na innych stronach Więcej opcji udostępniania...
0 bludis 418 Opublikowano 23 sierpnia 2018 Udostępnij Opublikowano 23 sierpnia 2018 Ten temat został przeniesiony. Odnośnik do komentarza https://skript.pl/temat/29138-jak-po%C5%82%C4%85czy%C4%87-te-dwa-skrypty/#findComment-192236 Udostępnij na innych stronach Więcej opcji udostępniania...
Pytanie
Revoltzik 0
Jak połączyć te dwa skrypty?
var msg = ""; var rep = "Witam"; function Und() { var messages = document.querySelectorAll(".msg-body"); var newest = messages[messages.length-1].innerHTML; if(newest == msg) { return; } msg = newest; if(msg.includes("cześć") | msg.includes("Cześć") | msg.includes("Witam") | msg.includes("hej") | msg.includes("elo")) { document.querySelector(".chat-input").value = rep; document.querySelector(".chatInputSend").click(); } } setInterval(Und, 100); var msg = ""; var rep = "ŻEGNAJ"; function Und() { var messages = document.querySelectorAll(".msg-body"); var newest = messages[messages.length-1].innerHTML; if(newest == msg) { return; } msg = newest; if(msg.includes("SPADAM") | msg.includes("narazie") | msg.includes("trzymaj się") | msg.includes("papa") | msg.includes("pa")) { document.querySelector(".chat-input").value = rep; document.querySelector(".chatInputSend").click(); } } setInterval(Und, 100);
Edytowane przez LjayPL789Poprawiam czytelność tematu; poprawiam również ortografię i wstawiam w code.
Notatka dodana przez bludis
Odnośnik do komentarza
https://skript.pl/temat/29138-jak-po%C5%82%C4%85czy%C4%87-te-dwa-skrypty/Udostępnij na innych stronach
1 odpowiedź na to pytanie
Rekomendowane odpowiedzi