Puzzle Auto Solver

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

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

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

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

})();