Vote Explosion Effect (o_o)

Robi BUUUM.

Tính đến 05-02-2016. Xem phiên bản mới nhất.

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.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

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            Vote Explosion Effect (o_o)
// @namespace       voteexplosion
// @description     Robi BUUUM.
// @include         http://*.wykop.pl/*
// @version         1.1
// ==/UserScript==
var options={blastRadius:150,particles:20};function getParticlePosition(x,y){'use strict';var a=$(window).width(),browserHeight=$(window).height(),randomX=x-Math.floor((Math.random()*options.blastRadius)+1-(options.blastRadius/2)),randomY=y-Math.floor((Math.random()*options.blastRadius)+1-(options.blastRadius/2));return[randomX,randomY]}$('head').append('<style type="text/css">.particlegreen{text-shadow: 0 0 10px #3b915f;color: #3b915f}.particlered{text-shadow: 0 0 10px #c0392b;color: #c0392b}.particle{will-change: top left text-shadow;transition: 1s all cubic-bezier(0.000, 0.895, 0.985, 1.005);position: absolute;pointer-events: none;z-index: 696969;}</style>');$('body').on('click','a.button.mikro.ajax',function(){'use strict';var a=$(this),pos=a.offset(),posX=pos.left,posY=pos.top,body=$('body'),d,plusglow;var b='particle_'+Math.random().toString(36).substring(3);var c='particle '+b;if(a.find('.affect').length){var d=' particlered';var e='<i class="fa fa-minus"></i>'}else{var d=' particlegreen';var e='<i class="fa fa-plus lcontrast affect"></i>'}for(var i=0;i<options.particles;i++){var f=getParticlePosition(posX,posY);var g='particle_'+Math.random().toString(36).substring(7);a.html(e).clone().appendTo(body).attr('id',g).attr('class',c+d).attr('href','').css('top',posY).css('left',posX).fadeIn(1,function(){$('#'+g).css('top',f[1]).css('left',f[0]).fadeOut(1000,function(){$('.'+b).each(function(){$(this).remove()})})})}});