Mouse click effects

Mouse click effects.

目前为 2017-07-27 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Mouse click effects
  3. // @auther miraku
  4. // @description Mouse click effects.
  5. // @version 0.0.1.20170727101715
  6. // @namespace https://greasyfork.org/users/144063
  7. // ==/UserScript==
  8. /**
  9. * @name onclick
  10. * @auther miraku
  11. * @description effects of click
  12. */
  13.  
  14. (function() {
  15. var random_num = 0;
  16. var colors = ["#DC9FB4", "#E16BBC", "#F4A7B9", "#F596AA", "#FEDFE1"];
  17. jQuery(document).ready(function($) {
  18. $("html").click(function(nowp) {
  19. var x = nowp.pageX,
  20. y = nowp.pageY;
  21. var fsize = 18;
  22. var $click_dot;
  23. random_num = Math.round(Math.random() * 100);
  24. switch (random_num) {
  25. case 0:
  26. $click_dot = $("<b></b>").text("( ̄▽ ̄)");
  27. // statements_1
  28. break;
  29. case 1:
  30. $click_dot = $("<b></b>").text("(o゚v゚)ノ");
  31. // statements_1
  32. break;
  33. case 2:
  34. $click_dot = $("<b></b>").text("ε=ε=ε=(~ ̄▽ ̄)~");
  35. // statements_1
  36. break;
  37. case 3:
  38. $click_dot = $("<b></b>").text("o((>ω< ))o");
  39. // statements_1
  40. break;
  41. case 4:
  42. $click_dot = $("<b></b>").text("= ̄ω ̄=");
  43. // statements_1
  44. break;
  45. case 5:
  46. $click_dot = $("<b></b>").text("(。>︿<)_θ");
  47. // statements_1
  48. break;
  49. case 6:
  50. $click_dot = $("<b></b>").text("o(* ̄︶ ̄*)o");
  51. // statements_1
  52. break;
  53. case 7:
  54. $click_dot = $("<b></b>").text("(づ ̄3 ̄)づ╭❤~");
  55. // statements_1
  56. break;
  57. case 8:
  58. $click_dot = $("<b></b>").text("(☆▽☆)");
  59. // statements_1
  60. break;
  61. case 9:
  62. $click_dot = $("<b></b>").text("?");
  63. fsize = Math.round(Math.random() * 14 + 6);
  64. break;
  65. default:
  66. $click_dot = $("<b></b>").text("❤");
  67. fsize = Math.round(Math.random() * 14 + 6);
  68. // statements_def
  69. break;
  70. }
  71. $click_dot.css({
  72. "-moz-user-select": "none",
  73. "-webkit-user-select": "none",
  74. "-ms-user-select": "none",
  75. "z-index": 1008,
  76. "top": y - 20,
  77. "left": x,
  78. "position": "absolute",
  79. "color": colors[Math.round(Math.random() * 5)],
  80. "font-size": fsize
  81. });
  82. $("body").append($click_dot);
  83. $click_dot.animate({
  84. "top": y - 200,
  85. "opacity": 0
  86. }, 1500, function() {
  87. $click_dot.remove();
  88. });
  89. });
  90. });
  91. })();