User:Nixxx60/MediaWiki:Wikia.js

$(function {   if ( mw.config.get( 'wgPageName' ) == "User_blog:Logologologol/Tools" ) {        $("#pp").click(function{$("#p").val($("#p").val.replace(/\./g,  ).toUpperCase.split(  ).join('.')+".");});        $("#qq").click(function{$("#q").val($("#q").val.replace(/\./g, '').length);});        $("#rq").click(function{ $("#resx").val(+$("#pre").val.split("&")[0]); $("#resy").val(+$("#pre").val.split("&")[1]); });       $("#rr").click(function{ $("#inch").html("inch"); var xxresx = $("#resx").val, xxresy = $("#resy").val, xxscrs = $("#scrs").val, xxppi = .sqrt(xxresx*xxresx+xxresy*xxresy)/xxscrs, xxpwd = 25.4/xxppi; $("#wid").val(Math.round(100*xxresx/xxppi)/100); $("#hig").val(Math.round(100*xxresy/xxppi)/100); $("#ppi").val(Math.round(xxppi)); $("#pp2").val(Math.round(xxppi*xxppi)); $("#pwd").val(Math.round(10000*xxpwd)/10000); $("#psz").val(Math.round(10000*xxpwd*xxpwd)/10000); });       $("#rs").click(function{ if ($(".inch").html==("inch")) {               $(".inch").html("mm"); $("#wid").val(Math.round(100*$("#wid").val*25.4)/100); $("#hig").val(Math.round(100*$("#hig").val*25.4)/100); }           else {               $(".inch").html("inch"); $("#wid").val(Math.round(100*$("#wid").val/25.4)/100); $("#hig").val(Math.round(100*$("#hig").val/25.4)/100); }       });     } }); //Classes var bright = $(" "); $(".hover").hover(function{   bright.css({ "background":"rgba(255,255,255,0.4)", "width":"inherit", "height":"inherit", "position":"inherit", "right":"inherit" });   $(this).prepend(bright); }, function{    bright.remove; });