elucidation.github.io 클리커 매크로 & 클리커

https://elucidation.github.io/ClickerJs/ 자동 클릭

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name          elucidation.github.io 클리커 매크로 & 클리커
// @namespace     elucidation.github.io 클리커 매크로 & 클리커
// @match         *://elucidation.github.io/ClickerJs/
// @version       0.1
// @description   https://elucidation.github.io/ClickerJs/ 자동 클릭
// @author        mickey90427 <[email protected]>
// @license       MIT
// ==/UserScript==

(function() {
  'use strict';

  let clicking = false;
  let frameId = null;

  // 왼쪽 하단 토글 버튼 생성
  const btn = document.createElement('button');
  btn.innerText = '오토클릭 OFF';
  btn.style.position = 'fixed';
  btn.style.left = '10px';
  btn.style.bottom = '10px';
  btn.style.zIndex = 9999;
  btn.style.padding = '10px';
  btn.style.backgroundColor = '#800';
  btn.style.color = '#fff';
  btn.style.border = 'none';
  btn.style.borderRadius = '5px';
  btn.style.cursor = 'pointer';
  document.body.appendChild(btn);

  function clickLoop() {
    if (!clicking) return;

    // 메인 버튼 클릭
    const mainBtn = document.querySelector('button[data-reactid=".0.2"]');
    if (mainBtn) mainBtn.click();

    // 업그레이드 버튼들 모두 클릭
    const upgradeButtons = document.querySelectorAll('ul[data-reactid=".0.3.0"] button');
    upgradeButtons.forEach(btn => btn.click());

    frameId = requestAnimationFrame(clickLoop);
  }

  btn.addEventListener('click', () => {
    clicking = !clicking;
    btn.innerText = clicking ? '오토클릭 ON' : '오토클릭 OFF';
    btn.style.backgroundColor = clicking ? '#080' : '#800';

    if (clicking) {
      clickLoop();
    } else {
      cancelAnimationFrame(frameId);
    }
  });
})();