Mouse Circle Drawer

Draw circles with the mouse to prevent idle detection

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Mouse Circle Drawer
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Draw circles with the mouse to prevent idle detection
// @author       Your Name
// @match        *://*/*   // 可以根据需要修改匹配的网页
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // 配置画圈的参数
    const radius = 50; // 圆圈半径
    const interval = 1000; // 每次画圈的间隔(毫秒)
    
    // 创建一个画圈的函数
    function drawCircle() {
        const mouseX = Math.random() * window.innerWidth;
        const mouseY = Math.random() * window.innerHeight;

        const circle = document.createElement('div');
        circle.style.position = 'absolute';
        circle.style.width = `${radius * 2}px`;
        circle.style.height = `${radius * 2}px`;
        circle.style.borderRadius = '50%';
        circle.style.border = '2px solid transparent';
        circle.style.borderColor = 'rgba(0, 0, 255, 0.5)'; // 圆圈颜色
        circle.style.left = `${mouseX - radius}px`;
        circle.style.top = `${mouseY - radius}px`;
        circle.style.pointerEvents = 'none';
        document.body.appendChild(circle);

        // 在一定时间后移除圆圈
        setTimeout(() => {
            circle.remove();
        }, 1000);
    }

    // 定时调用画圈函数
    setInterval(drawCircle, interval);
})();