I'm trying to click on chat items on the web telegram page. The thing is it used to work perfectly fine last week, today I wanted to edit some other section of the code when I discovered that the click() function doesn't work anymore. in my content.js I have :
function scrapChannelOnnewMSG(titleChannel,accountslist){
const element = document.getElementsByClassName("chat-list custom-scroll");
var scrollelem = element[0].children[0];
// for all chat channels, do
for (var i = 0; i < scrollelem.children.length; i++) {
scrollelem.children[i].children[0].click();
console.log("just clicked");
// do stuff with the resulting elemnts
Any idea why this is happening? I stress that it was working just fine before today.