您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Robi BUUUM.
当前为
// ==UserScript== // @name Vote Explosion Effect (o_o) // @namespace voteexplosion // @description Robi BUUUM. // @include http://*.wykop.pl/* // @version 1.5 // ==/UserScript== /*global $, console */ function getParticlePosition(t,e,a){"use strict";var i=($(window).width(),$(window).height(),t-Math.floor(Math.random()*options.blastRadius+1-options.blastRadius/2)),s=e-Math.floor(Math.random()*options.blastRadius+1-options.blastRadius/2);return" particlered"==a?s+=100:s-=100,[i,s]}function randomRotate(){return Math.floor(1600*Math.random()+1)}function microtime(t){"use strict";var e=(new Date).getTime()/1e3,a=parseInt(e,10);return t?e:Math.round(1e3*(e-a))/1e3+" "+a}var options={blastRadius:200,particles:20,subparticles:10};$("head").append('<style type="text/css">.particlegreen { text-shadow: 0 0 10px #3b915f;color: #3b915f;transition: 1s all cubic-bezier(0.000, 0.895, 0.985, 1.005);}.particlered{text-shadow: 0 0 10px #c0392b;color: #c0392b;transition: 2s all cubic-bezier(0.000, 0.895, 0.985, 1.005);}.particle {position: absolute;pointer-events: none;z-index: 696969;-webkit-transform: translate3d(0, 0, 10px);-webkit-backface-visibility: hidden;-webkit-perspective: 1000;}.subparticle {position: absolute;pointer-events: none;z-index: 696969;-webkit-transform: translate3d(0, 0, 10px);-webkit-backface-visibility: hidden;-webkit-perspective: 1000;}.votersContainer {min-height: 18px;margin-bottom: 6px;}</style>'),$("body").on("click","a.button.mikro.ajax",function(){"use strict";var t,e=$(this),a=e.offset(),i=a.left,s=a.top,o=$("body"),r="particle_"+Math.random().toString(36).substring(3),n="particle "+r;if(e.find(".affect").length||e.find(".fa-minus").length)var t=" particlered",c='<i class="fa fa-minus"></i>';else var t=" particlegreen",c='<i class="fa fa-plus lcontrast affect"></i>';for(var l=0;l<options.particles;l++){var f=getParticlePosition(i,s,t),p="particle_"+Math.random().toString(36).substring(7),d=randomRotate();e.clone().appendTo(o).html(c).attr("id",p).attr("class",n+t).attr("href","").css("top",s).css("left",i).fadeIn(1,function(){$("#"+p).css("top",f[1]).css("left",f[0]).css("transform","rotate("+d+"deg)").fadeOut(1e3,function(){$("."+r).each(function(){$(this).remove()})})})}}),$("body").on("click","a.ajax.button.folNeutral, a.ajax.button.folObserved",function(){"use strict";var t=$(this),e=t.offset(),a=e.left,i=e.top,s=$("body"),o="subparticle_"+Math.random().toString(36).substring(3),r="subparticle "+o;if(console.log(t.attr("class")),t.hasClass("folObserved"))var n=" particlered",c='<i class="fa fa-eye-slash"></i>';else var n=" particlegreen",c='<i class="fa fa-eye"></i>';for(var l=0;l<options.subparticles;l++){var f=getParticlePosition(a,i,n),p="subparticle"+Math.random().toString(36).substring(7),d=randomRotate();t.clone().appendTo(s).html(c).attr("id",p).attr("class",r+n).attr("href","").css("top",i).css("left",a).fadeIn(1,function(){$("#"+p).css("top",f[1]).css("left",f[0]).css("transform","rotate("+d+"deg)").fadeOut(1e3,function(){$("."+o).each(function(){$(this).remove()})})})}});