mimicker

alt+click to set point, ctrl+alt+click to cycle through points, click to stop

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         mimicker
// @author       fooksie
// @description  alt+click to set point, ctrl+alt+click to cycle through points, click to stop
// @match        http://cursors.io/
// @version 0.0.1.20141024144148
// @namespace https://greasyfork.org/users/4723
// ==/UserScript==
window.addEventListener("load", function() {
	var	mimic=[],
		index=0,
		lastdate=0,
		playing=true,
		canvas=document.getElementById("canvas");
	Date.prototype.valueOf=function() {
		return lastdate+=101;
		};
	function repeat() {
		if(playing) {
			var	prev=mimic[index++%mimic.length],
				event=document.createEvent("MouseEvents");
			event.initMouseEvent("mousedown", true, true, unsafeWindow, 0, 0, 0, prev[0], prev[1]);
			canvas.dispatchEvent(event);
			requestAnimationFrame(repeat);
			}
		};
	canvas.parentElement.addEventListener("click", function(event) {
		if(playing) {
			mimic=[];
			playing=false;
			}
		if(event.altKey) {
			var	prev=mimic[mimic.length-1];
			if(event.ctrlKey) {
				playing=true;
				requestAnimationFrame(repeat);
				}
			else {
				mimic.push([event.x, event.y]);
				}
			}
		});
	});