您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds magnetic buttons to miniblox.io
// ==UserScript== // @name Magnetic Buttons for miniblox.io // @namespace http://tampermonkey.net/ // @description Adds magnetic buttons to miniblox.io // @author Your Name // @match https://miniblox.io/* // @grant GM_addStyle // @license Redistribution prohibited // @version 0.5 // ==/UserScript== (function() { 'use strict'; GM_addStyle(` .button-animation { transition: transform 0.2s ease-in-out, scale 0.2s ease-in-out; border-radius: 8px; padding: 10px 20px; cursor: pointer; position: relative; } .button-animation:hover { transform: scale(1.1); /* Увеличение кнопки при наведении */ } `); document.addEventListener('mousemove', function(e) { const buttons = document.querySelectorAll('.button-animation'); let closestButton = null; let closestDistance = Infinity; buttons.forEach(button => { const rect = button.getBoundingClientRect(); const distance = Math.sqrt((e.clientX - rect.left - rect.width / 2) ** 2 + (e.clientY - rect.top - rect.height / 2) ** 2); if (distance < 100 && distance < closestDistance) { // Установите радиус притяжения closestDistance = distance; closestButton = button; } }); buttons.forEach(button => { if (button === closestButton) { const rect = button.getBoundingClientRect(); const x = (e.clientX - rect.left - rect.width / 2) * 0.1; // Уменьшите коэффициент для менее сильного притяжения const y = (e.clientY - rect.top - rect.height / 2) * 0.1; button.style.transform = `translate(${x}px, ${y}px)`; } else { button.style.transform = ''; } }); }); const observer = new MutationObserver(() => { const buttons = document.querySelectorAll('button'); buttons.forEach(button => { if (!button.classList.contains('button-animation')) { button.classList.add('button-animation'); } }); }); observer.observe(document.body, { childList: true, subtree: true }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址