Puzzle Auto Solver

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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("✅ 拼图完成");

})();