InscriptionConnexion
BorneSTEIN
:benzemonster:
il y a un an
AYAAAAAA Borne respire vite elle stress ayaaaaaaaaaaaaaaaa
il y a un an
Vivement un jvchat pour ici
:sans:
ceci
il y a un an
Macron
Macron
1 an
Installe toi et profite khey
Je suis comfy dans mon lit khey, bonne soirée en perspective
il y a un an
Vivement un jvchat pour ici
:sans:
On'chat
il y a un an
On va faire la chenille autour d'un rond point
il y a un an
:angry:
il y a un an
J'espère que cette vieille va degager bordel
:chat_lunettes:
Image
il y a un an
Borne qui en est déjà à deux paquets de clope depuis ce matin.
il y a un an
33kbps
33kbps
1 an
On'chat
T'as un lien khey ?
il y a un an-PEMT
One more STEIN
:benzemonster:
il y a un an-PEMT
Jolie mascarade Image
il y a un an
je minstalle
:journal:
je m'installe aussi
:je_m-installe:
NNN régiment rien du tout Matricule 007
:nnn:
il y a un an
Il y a quand même des sièges vides
:risitas_ahi:
protection du covid
:onche:
il y a un an
Nique tes morts borne
il y a un an-PEMT
Vivement un jvchat pour ici
:sans:
Y a AntoineForum qu'a fait un script, je l'utilise sur TamperMonkey


// ==UserScript==

// @name On'Chat


// @version 0.2

// @description Ajoute un LiveChat sur onche.org comme sur JVChat




// @grant none

// ==/UserScript==

(function() {

'use strict';

// CONFIGURATION

const MESSAGES_PER_PAGES = 20;

// Variables for the keyboard event

const textarea = document.querySelector(".textarea");

const button = document.querySelector("input.button");

textarea.addEventListener("keydown", (event) => {

// Check if the pressed key is Enter and the Shift key isn't pressed

if (event.key === "Enter" && !event.shiftKey ) {

// Prevent the default behavior of the Enter key (i.e., inserting a newline)

event.preventDefault();

// Trigger the button click


}

});

const fullUrlString = document.querySelector("div.pagination a.active").getAttribute('href');

// The

const rawUrlString = fullUrlString.split('\/').slice(0, -1).join('\/');

let activePage = parseInt(document.querySelector('.active').text, 10);

const allPagesElements = document.querySelectorAll("div.content.pagination div.pagination")[0].querySelectorAll('a');

let currentMessageCount = document.querySelectorAll("div.messages div.message:not(.answer)").length;

let initialMaxPage = parseInt(allPagesElements[allPagesElements.length - 1].text, 10);

console.log("Script is on")

console.log(rawUrlString)

function callMakeRequest() {

makeRequest(rawUrlString + "/" + activePage)

}

function isElementVisible(el) {

const rect = el.getBoundingClientRect();

return (

rect.top >= 0 &&

rect.left >= 0 &&

rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&

rect.right <= (window.innerWidth || document.documentElement.clientWidth)

);

}

function makeRequest(url) {

// Create a new XMLHttpRequest object

const xhr = new XMLHttpRequest();

// Define the URL and method of the request

const method = "GET";

// Open the request with the URL and method

xhr.open(method, url);

// Define the callback function to read the response

xhr.onload = function() {

if (xhr.status === 200) {

const response = xhr.responseText;

// console.log(response)

const parser = new DOMParser();

const htmlDocument = parser.parseFromString(response, "text/html"); // Parse the HTML response

let messageCount = htmlDocument.querySelectorAll("div.messages div.message:not(.answer)").length

console.log(htmlDocument.querySelectorAll("div.messages div.message:not(.answer)"))

console.log("Number of text messages:", messageCount);

if (messageCount > currentMessageCount) {

console.log("New message")

let numberOfMessagesToAdd = messageCount - currentMessageCount;

let nodeArray = htmlDocument.querySelectorAll("div.messages div.message:not(.answer)")

let substring = Array.from(nodeArray).slice(messageCount - numberOfMessagesToAdd, messageCount);

// For each elements that we received. We apppend it to the messages

substring.forEach(element => {

document.querySelector('.messages').appendChild(element);

});

currentMessageCount = messageCount;

// If the textarea is visible we scroll

if (isElementVisible(textarea)) {

// execute the action if the element is visible

document.querySelector(".textarea").scrollIntoView({

block: "center",

inline: "nearest",

behavior: "smooth"

});

}

if (currentMessageCount === MESSAGES_PER_PAGES) {

activePage += 1

currentMessageCount = 0

}

}


// Replace this with your actual response handling code

}

};

// Send the request

xhr.send();

}

console.log()

if (activePage !== initialMaxPage) { return }

setInterval(callMakeRequest, 2000);

})();// ==UserScript==

// @name New Userscript


// @version 0.1

// @description try to take over the world!

// @author You



// @grant none

// ==/UserScript==

(function() {

'use strict';

// Your code here...

})();



il y a un an-PEMT
One more STEIN
:benzemonster:
:DanceParty:
il y a un an
C'est qui ce random par contre
il y a un an
Borne cette vieille lesbienne psycho rigide fumeuse de clope déclarée sur le tard.
il y a un an-PEMT
On'chat c'est de la merde, il faut scroller pour voir les nouveaux message
:malade:
il y a un an-PEMT