Vote Explosion Effect (o_o)

Robi BUUUM.

目前為 2016-02-05 提交的版本,檢視 最新版本

// ==UserScript==
// @name            Vote Explosion Effect (o_o)
// @namespace       voteexplosion
// @description     Robi BUUUM.
// @include         http://*.wykop.pl/*
// @version         0.01
// ==/UserScript==
function bluh(t,s){"use strict";var o=($(window).width(),$(window).height(),t-Math.floor(Math.random()*options.blastRadius+1-options.blastRadius/2)),i=s-Math.floor(Math.random()*options.blastRadius+1-options.blastRadius/2);return[o,i]}var options={blastRadius:200,particles:20};$("body").on("click","a.button.mikro.ajax",function(){"use strict";for(var t=$(this),s=t.offset(),o=s.left,i=s.top,a=$("body"),n=0;n<options.particles;n++){var e=bluh(o,i),r="particle_"+Math.random().toString(36).substring(7),c="particle_"+Math.random().toString(36).substring(3);t.clone().appendTo(a).attr("id",r).attr("class",c).attr("href","").css("position","absolute").css("pointer-events","none").css("transition","1s top cubic-bezier(0.000, 0.895, 0.985, 1.005), 1s left cubic-bezier(0.000, 0.895, 0.985, 1.005)").css("z-index","696969").css("top",i).css("left",o).fadeIn(1,function(){$("#"+r).css("top",e[1]).css("left",e[0]).fadeOut(1e3,function(){$("."+c).each(function(){$(this).remove()})})})}});