CCCPaste

99ee0b21ee6ba

setInterval(() => {
  const btn = document.querySelector(
    "body > div.h-screen.w-screen.flex.items-center.justify-center.bg-surface-z-0-GD " +
    "> div > main > div > div.p-6.w-full.flex.\\[\\&\\>\\*\\]\\:flex-1.gap-2.border-t.border-gray-200 " +
    "> div > button"
  );

  if (
    btn &&                                   // button exists
    btn.textContent.trim() === "Start session" &&  // exact text
    !btn.disabled &&                        // not disabled (property)
    !btn.hasAttribute("disabled")           // no disabled attribute
  ) {
    console.log(`[${new Date().toLocaleTimeString()}] Clicking "Start session"`);
    btn.click();   // ← exactly the way you showed
  } else {
    // optional debug – remove if you don’t want logs
    console.log(`[${new Date().toLocaleTimeString()}] Not clicking →`, {
      exists: !!btn,
      text: btn?.textContent?.trim(),
      disabled: btn?.disabled
    });
  }
}, 60_000);   // 60 000 ms = 1 minute

// ---- click immediately on page load (in case it’s already there) ----
(() => {
  const btn = document.querySelector(
    "body > div.h-screen.w-screen.flex.items-center.justify-center.bg-surface-z-0-GD " +
    "> div > main > div > div.p-6.w-full.flex.\\[\\&\\>\\*\\]\\:flex-1.gap-2.border-t.border-gray-200 " +
    "> div > button"
  );
  if (btn && btn.textContent.trim() === "Start session" && !btn.disabled) {
    btn.click();
  }
})();