(removed wave js) |
m (1 revision imported: New Files) |
Latest revision as of 11:54, 24 March 2024
$(function(){function e(){$("html").addClass("dark")}$(".chevron-right").click(function(){$(".frame").scrollLeft(),$(".frame").animate({scrollLeft:"+=362"},400)}),$(".chevron-left").click(function(){$(".frame").scrollLeft(),$(".frame").animate({scrollLeft:"-=362"},400)}),$('a[href*="#"]').not('[href="#"]').not('[href="#0"]').click(function(e){if(location.pathname.replace(/^\//,"")==this.pathname.replace(/^\//,"")&&location.hostname==this.hostname){var t=$(this.hash);(t=t.length?t:$("[name="+this.hash.slice(1)+"]")).length&&(e.preventDefault(),$("html, body").animate({scrollTop:t.offset().top-150},1e3,function(){var e=$(t);if(e.focus(),e.is(":focus"))return!1;e.attr("tabindex","-1"),e.focus()}))}}),$("#p-personal ul").append($("<li>").append($("<a>").attr("id","styleswitcher").append("Switch theme"))),"true"==mw.cookie.get("dark")&&e(),$("#styleswitcher").click(function(){"true"!=mw.cookie.get("dark")?(e(),mw.cookie.set("dark","true")):($("html").removeClass("dark"),mw.cookie.set("dark","false"))})});