Vote Explosion Effect (o_o)

Robi BUUUM.

Stan na 05-02-2016. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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()})})})}});