您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
let your pvp better--jk:D||press "F" when pvp||copy by Advanced zoom->https://update.gf.qytechs.cn/scripts/493029/Advanced%20zoom.user.js
- // ==UserScript==
- // @name pvp master
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description let your pvp better--jk:D||press "F" when pvp||copy by Advanced zoom->https://update.gf.qytechs.cn/scripts/493029/Advanced%20zoom.user.js
- // @author You
- // @match https://bloxd.io/
- // @icon https://www.google.com/s2/favicons?sz=64&domain=bloxd.io
- // @grant none
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- // Define constants for zoom levels and increment
- const minZoom = -100; // 100%
- const maxZoom = -100; // 500% (adjusted maximum zoom)
- const zoomIncrement = 20; // 20% (increased for faster zooming)
- // Initial zoom level
- let zoomLevel = -100; // 100%
- // Function to smoothly zoom the canvas
- function zoomCanvas(zoom) {
- const canvas = document.querySelector('canvas');
- if (!canvas) {
- console.error('Canvas not found.');
- return;
- }
- // Calculate the new zoom level within the allowed range
- zoomLevel = Math.min(Math.max(zoomLevel + zoom, minZoom), maxZoom);
- // Apply the zoom transformation with a smooth transition
- canvas.style.transition = 'transform 0.5s ease';
- canvas.style.transform = `scale(${zoomLevel / 100})`;
- }
- // Function to handle zooming when 'F' key is pressed
- function handleZoom(event) {
- if (event.key === 'f' || event.key === 'F') {
- if (event.type === 'keydown') {
- // Zoom in when 'F' key is pressed
- zoomCanvas(zoomIncrement);
- } else if (event.type === 'keyup') {
- // Reset zoom to 100% when 'F' key is released
- zoomCanvas(100 - zoomLevel);
- }
- }
- }
- // Add event listeners for keydown and keyup events to handle zooming with 'F' key
- window.addEventListener('keydown', handleZoom);
- window.addEventListener('keyup', handleZoom);
- // Event listener for zooming with mouse wheel
- document.addEventListener('wheel', function(event) {
- // Prevent the default scroll behavior
- event.preventDefault();
- // Determine the direction of the scroll
- const direction = event.deltaY > 0 ? -1 : 1;
- // Zoom the canvas if zooming is active
- if (event.key === 'f' || event.key === 'F') {
- if (document.hasFocus()) {
- zoomCanvas(zoomIncrement * direction);
- }
- }
- })
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址