// ==UserScript== // @name Padaria FC — Automático (SEM refresh) // @namespace http://tampermonkey.net/ // @version 2.3 // @description Automação sem reload da página // @match https://agenda.dn.app.br/* // @run-at document-idle // @grant none // ==/UserScript== (function () { 'use strict'; const INTERVAL_MS = 300; function selecionarHorarios() { const boxes = document.querySelectorAll('input[type="checkbox"], [role="checkbox"]'); boxes.forEach(cb => { try { if (cb.tagName.toLowerCase() === 'input') { if (!cb.checked) cb.click(); } else { cb.click(); } } catch (e) {} }); } function solicitarAgenda() { const elementos = document.querySelectorAll( 'button, a, input[type="button"], input[type="submit"]' ); for (const el of elementos) { const txt = (el.innerText || el.value || '').toLowerCase(); if ( txt.includes('solicitar agenda') || txt.includes('solicitar') || txt.includes('agendar') ) { el.click(); return true; } } return false; } function loop() { selecionarHorarios(); solicitarAgenda(); // ❌ NÃO recarrega mais a página } setInterval(loop, INTERVAL_MS); })();