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

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

当前为 2025-05-02 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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);
    }
  });
})();