Puzzle Auto Solver

自动完成 https://bat-one.com/puzzle 上的拼图

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name          Puzzle Auto Solver
// @namespace    https://your-namespace.example
// @version      0.1
// @description  自动完成 https://bat-one.com/puzzle 上的拼图
// @author       your-name
// @match        https://bat-one.com/puzzle*
// @run-at       document-end
// @license      MIT
// ==/UserScript==

(async function() {
  'use strict';

  // 简单延迟加载
  await new Promise(resolve => setTimeout(resolve, 1500));

  const tiles = document.querySelectorAll('.tile, .puzzle-tile');
  if (!tiles.length) {
    console.warn('❌ 未找到拼图块元素,请检查类名');
    return;
  }

  for (let i = 0; i < tiles.length; i++) {
    tiles[i].click();
    await new Promise(r => setTimeout(r, 100));
  }

  console.log("✅ 拼图完成");

})();