NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Dasanfall 3D // @namespace http://use.i.E.your.homepage/ // @version 0.4 // @description Makes the Dasanfall site look 3D // @match http://stats.dasanfall.com/ps2/news/ // @copyright 2014+, KlyptoTech // @downloadURL https://openuserjs.org/install/KlyptoKlyptoTech.com/Dasanfall_Addon.user.js // ==/UserScript== // Styleshee script var script = document.createElement('style'); script.textContent = '*{transform-style: preserve-3d; translate3d(0, 0, 0);}.newscard1{transform: translatez(-5px)}.newscard2{transform: translatez(-250px);-webkit-filter: blur(1px);} .newscard3{transform: translatez(-500px);-webkit-filter: blur(2px);}'; document.body.appendChild(script); var xRotate = false; var yRotate = false; $(function(){ $("body").css({"background": "none", "transition": "transform 250ms", "height": "100%"}); $("html").css({"height": "100%", "overflow": "hidden", "perspective": "2000px"}); $(".page_banner").css({"transform": "translatez(-75px) rotatex(-2deg)"}); $(".slantytext").css({"transform": "translatez(100px) rotateZ(-20deg) rotateY(20deg)", "background": "rgba(0,0,0,0.5)"}); $(".web_banner").css({"transform": "translatez(-25px) rotatex(-5deg)", "background": "rgba(150,150,150,0.5)"}); $("body center table tbody tr td center table").css({"transform": "translatez(-35px) rotatex(-5deg)", "background": "rgba(100,100,100,0.5)", "border-radius": "5px"}); $("body center table tbody tr td center table tbody").css({"transform": "translatez(5px)"}); $("body center table tbody tr td nav ul").css({"transform": "translatez(1px)", "background": "rgba(100,100,100,0.90)"}); $("body center table tbody tr td nav a").css({"transform": "translatez(1px)"}); $(".page_content").css({"transform": "translatez(-5px)", "background": "none", "border": "none"}); $(".f_thread").css({"background": "none", "border": "none"}); $(".f_module_connector").css({"background": "none", "border": "none", "transform": "rotateY(-7deg) rotateX(-5deg)"}); $(".f_module_connector table").css({"position": "absolute"}); $(".f_module_connector table tbody").css({"border-radius": "15px", "background": "none", "border": "none",}); $(".f_thread_innercontainer").css({"background": "rgba(0,0,0,0.85)", "border": "none"}); $(".f_thread_content").css({"background": "rgba(150,150,150,0.90)"}); $("body center table tbody tr td:last").css({"display": "none"}); $(".f_module_connector table").each(function(i) { $(this).addClass("newscard"+(i+1)); }); var mousex = 0, mousey; function repeatOften() { var paneH = $(window).height(); var paneW = $(window).width(); var nx = 0; var ny = 0; var mx = mousex / paneW; var my = mousey / paneH; if(mx < .20){ nx = -(20-(mx*100)); yRotate = true; }else if(mx > .80){ nx = 20-(100-(mx*100)); yRotate = true; }else if(yRotate){ nx = 0; yRotate = false; } if(my < .20){ ny = 20-(my*100); xRotate = true; }else if(my > .80){ ny = -(20-(100-(my*100))); xRotate = true; }else if(xRotate){ ny= 0; xRotate = false; } $('body').css('transform', 'rotateX('+ ny +'deg) rotateY('+ nx +'deg)') requestAnimationFrame(repeatOften); } requestAnimationFrame(repeatOften); $(window).mousemove(function(e){ mousex = e.pageX; mousey = e.pageY; }); });