Last active
August 29, 2015 14:20
-
-
Save lopezjurip/97771781262c18a24521 to your computer and use it in GitHub Desktop.
Inyectar Nyancat al Siding (UC)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Este código no es mio. | |
Autor: Desconocido | |
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script><br /> | |
<script>//<br /> | |
// Este iframe fallaba<br /> | |
//<iframe src="http://nyan.cat/" width="640" height="480"></iframe><br /> | |
console.log("js injection ");//<br /> | |
var url = "https://raw.github.com/jfix/nyancat/master";//<br /> | |
var keyCode = 16; // shift key<br /> | |
var animationDuration = 9000; // number of milliseconds the animation will take<br /> | |
//<br /> | |
var imgNode = '<img src="'+url+'/nyancat.gif" id="nyancat" width="100" style="position:absolute;z-index:9999;left:-100px;top:250px;" />'//<br /> | |
$("body > table > tbody > tr:nth-child(2) > td.ColorFondoZonaTrabajo").append(imgNode);//<br /> | |
var img = $("img#nyancat");//<br /> | |
//<br /> | |
//<br /> | |
$('body').append('<audio id="sound" preload="auto"><source src="'+url+'/nyancat.ogg" type="audio/ogg"/><source src="'+url+'/nyancat.mp3" type="audio/mp3" /></audio>');//<br /> | |
var sound = $("#sound").get(0);//<br /> | |
//<br /> | |
//<br /> | |
var nyancat_reset = function()//<br /> | |
{//<br /> | |
sound.pause();//<br /> | |
sound.currentTime = 0;//<br /> | |
sound.volume = 1;//<br /> | |
img.css("left", "-100px");//<br /> | |
}//<br /> | |
//<br /> | |
//<br /> | |
function nyancat_start() {//<br /> | |
sound.play();//<br /> | |
img.show().animate({ "left": "+=" + parseInt($("body").width() + 100) + "px"}, animationDuration, nyancat_reset);//<br /> | |
};//<br /> | |
//<br /> | |
//<br /> | |
$("body").keydown(function (event)//<br /> | |
{//<br /> | |
if (event.which == keyCode) {//<br /> | |
nyancat_start();//<br /> | |
}//<br /> | |
}//<br /> | |
);//<br /> | |
//<br /> | |
//<br /> | |
$("#sound").on('timeupdate', function ()//<br /> | |
{//<br /> | |
var vol = 1,//<br /> | |
interval = 200;//<br /> | |
if (Math.floor(sound.currentTime) == 6) {//<br /> | |
if (sound.volume == 1) {//<br /> | |
var intervalID = setInterval(function () {//<br /> | |
if (vol > 0) {//<br /> | |
vol -= 0.10;//<br /> | |
if (vol >= 0.10)//<br /> | |
sound.volume = vol.toFixed(1);//<br /> | |
} else {//<br /> | |
clearInterval(intervalID);//<br /> | |
}//<br /> | |
},//<br /> | |
interval//<br /> | |
);//<br /> | |
}//<br /> | |
}//<br /> | |
}//<br /> | |
);//<br /> | |
nyancat_start();//<br /> | |
</script> |
Al parecer hay que ser administrador en algún curso en SIDING para poder inyectar esto
Ah, ya veo como lo hicieron. Ingenioso
Es probable que funcione dentro del foro, habría que probarlo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hoy lo vi en el SIDING, estaba perfecto en el código.
¿Como lo hicieron?
Me gustaría mucho aprender de estas cosas :D.