Mouse click effects (hits)

10086hits

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.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

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         Mouse click effects (hits)
// @version      0.1
// @description  10086hits
// @author       miraku
// @namespace    https://greatest.deepsurf.us/zh-CN/users/144063-miraku
// @include      *
// ==/UserScript==

(function() {
	var click_cnt = 0;
	jQuery(document).ready(function($) {
		$("html").click(function(nowp) {
			var x = nowp.pageX,
				y = nowp.pageY;
			var $click_dot;
			click_cnt++;
			$click_dot = $("<b></b>").text("?" + click_cnt + "hits");
			$click_dot.css({
				"-moz-user-select": "none",
				"-webkit-user-select": "none",
				"-ms-user-select": "none",
				"z-index": 1008,
				"top": y - 20,
				"left": x,
				"position": "absolute",
				"color": "#F00",
				"font-size": 18
			});
			$("body").append($click_dot);
			$click_dot.animate({
				"top": y - 200,
				"opacity": 0,
				"font-size": 36
			}, 1500, function() {
				$click_dot.remove();
			});
		});
	});
})();