I tried applying this using ChatGPT, but it didn't work for me. Can you tell me where to put this code to make my code work?
// Функция для эмуляции нажатия мыши внутри элемента <canvas data-sentry-element="Stage"> function simulateMouseClickInCanvas() { const canvas = document.querySelector('canvas[data-sentry-element="Stage"]'); if (!canvas) { console.error("Элемент <canvas> не найден."); return; } const rect = canvas.getBoundingClientRect(); // Выбираем случайные координаты внутри элемента <canvas> const randomX = Math.random() * rect.width + rect.left; const randomY = Math.random() * rect.height + rect.top; // Создаём события мыши const mouseDownEvent = new MouseEvent("mousedown", { bubbles: true, cancelable: true, clientX: randomX, clientY: randomY, }); const mouseUpEvent = new MouseEvent("mouseup", { bubbles: true, cancelable: true, clientX: randomX, clientY: randomY, }); const clickEvent = new MouseEvent("click", { bubbles: true, cancelable: true, clientX: randomX, clientY: randomY, }); // Эмулируем события canvas.dispatchEvent(mouseDownEvent); canvas.dispatchEvent(mouseUpEvent); canvas.dispatchEvent(clickEvent); } // Функция для выполнения кликов с рандомной задержкой function performRandomClicksInCanvas(maxClicks) { let clicksCount = 0; function clickWithRandomDelay() { if (clicksCount >= maxClicks) { console.log("Все клики выполнены"); return; } const delay = Math.random() * (2000 - 100) + 100; // Рандомная задержка от 0.1 до 2 секунд setTimeout(() => { simulateMouseClickInCanvas(); clicksCount++; console.log(`Клик ${clicksCount} выполнен (задержка: ${Math.round(delay)} мс)`); clickWithRandomDelay(); // Рекурсивный вызов для следующего клика }, delay); } clickWithRandomDelay(); } // Запуск выполнения 10 кликов performRandomClicksInCanvas(10);Adblocker extension that will work in BAS chrome ?
-
-
@niceusername said in Adblocker extension that will work in BAS chrome ?:
Hi
I want to block youtube ads, is there any adblocker chrome extension that works in BAS chrome ? I tried AdBlock but it didn't worked. Or if there are ads domains hosts which i can use to deny request ? Please let me know thanks. @support @Fox
Thanksno
-
@niceusername said in Adblocker extension that will work in BAS chrome ?:
Thank you very much :)))))))
Try to identify ad requests, if you find them, they can be blocked in BAS.
-
Hook up the browser to a proxy intercepter such as Burpsuite.
If you dont want to install it, you can use the "HTTP Recorder" option from the top left bar.
Find every domain or locate the script file for ads placements.Then use "Request mask deny" from Network tab (NOT Cache Mask Deny thats another thing)
For every ads network domain, add it on Request Mask Deny option like this*doubleclick.net
*taboola.com
*googlesyndication.comNote that * is wildcard option.
This will block all requests to any subdomain of the URLs.Or if the ad function is from external js file add "*adfile.js" as deny
-
@a-milanov said in Adblocker extension that will work in BAS chrome ?:
Adgouard for PC and you only need to filter BAS files with it ;)
awesome mate