var CurrentMouseXPostion; var CurrentMouseYPostion; $(document).mousemove(function(event) { CurrentMouseXPostion = event.pageX; CurrentMouseYPostion = event.pageY; //console.log(CurrentMouseXPostion+' '+CurrentMouseYPostion); }); $(document).ready(function() { $("#wt-btn").click(function(){ if($('.okineko').css('display') == 'none' ){ $('.okineko').show(); $('#wt-btn img').attr('src', 'https://accessibility.ppv.stream/icon3.png'); }else{ $('.okineko').hide(); $('#wt-btn img').attr('src', 'https://accessibility.ppv.stream/icon2.png'); } return false; }); $(".opt1").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('invert'); setCookie("opt1", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('invert'); setCookie("opt1", 1, 100); setCookie("opt3", 0, 100); $(".opt3").removeClass('optx-active'); $('html').removeClass('grayscale'); setCookie("opt12", 0, 100); $(".opt12").removeClass('optx-active'); $('html').removeClass('saturate'); } return false; }); $(".opt2").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('wt-opt2'); setCookie("opt2", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('wt-opt2'); setCookie("opt2", 1, 100); } return false; }); $(".opt3").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('grayscale'); setCookie("opt3", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('grayscale'); setCookie("opt3", 1, 100); setCookie("opt1", 0, 100); $(".opt1").removeClass('optx-active'); $('html').removeClass('invert'); setCookie("opt12", 0, 100); $(".opt12").removeClass('optx-active'); $('html').removeClass('saturate'); } return false; }); $(".opt5").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('bigfont'); setCookie("opt5", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('bigfont'); setCookie("opt5", 1, 100); } return false; }); $(".opt6").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('smallfont'); setCookie("opt6", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('smallfont'); setCookie("opt6", 1, 100); } return false; }); $(".opt7").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('noanimation'); setCookie("opt7", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('noanimation'); setCookie("opt7", 1, 100); } return false; }); $(".opt8").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('noimage'); setCookie("opt8", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('noimage'); setCookie("opt8", 1, 100); } return false; }); $(".opt9").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('cursor'); setCookie("opt9", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('cursor'); setCookie("opt9", 1, 100); } return false; }); $(".opt10").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('lineheight'); setCookie("opt10", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('lineheight'); setCookie("opt10", 1, 100); } return false; }); $(".opt11").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('otleft'); $('.opt11 .img-optx').attr('src', 'https://accessibility.ppv.stream/SVG/lewa.svg'); $('.opt11 .txt-optx').html('Tekst do lewej'); if(getCookie("opt11") == '1'){ setCookie("opt11", 2, 100); $('.opt11 .img-optx').attr('src', 'https://accessibility.ppv.stream/SVG/cenr.svg'); $('.opt11 .txt-optx').html('Tekst centralnie'); $(this).addClass('optx-active'); $('html').addClass('otcenter'); }else if(getCookie("opt11") == '2'){ setCookie("opt11", 3, 100); $('.opt11 .img-optx').attr('src', 'https://accessibility.ppv.stream/SVG/prawa.svg'); $('.opt11 .txt-optx').html('Tekst do prawej'); $(this).addClass('optx-active'); $('html').addClass('otright'); }else if(getCookie("opt11") == '3'){ setCookie("opt11", 4, 100); $('.opt11 .img-optx').attr('src', 'https://accessibility.ppv.stream/SVG/wyjustuj.svg'); $('.opt11 .txt-optx').html('Tekst wyjustowany'); $(this).addClass('optx-active'); $('html').addClass('otjustify'); }else{ $(this).removeClass('optx-active'); $('html').removeClass('otjustify'); setCookie("opt11", 0, 100); $('.opt11 .txt-optx').html('Wyrównanie auto'); } }else{ $(this).addClass('optx-active'); $('html').addClass('otleft'); $('.opt11 .img-optx').attr('src', 'https://accessibility.ppv.stream/SVG/lewa.svg'); $('.opt11 .txt-optx').html('Tekst do lewej'); setCookie("opt11", 1, 100); } return false; }); $(".opt12").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('saturate'); setCookie("opt12", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('saturate'); setCookie("opt12", 1, 100); setCookie("opt1", 0, 100); $(".opt1").removeClass('optx-active'); $('html').removeClass('invert'); setCookie("opt3", 0, 100); $(".opt3").removeClass('optx-active'); $('html').removeClass('grayscale'); } return false; }); $(".opt13").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('odc'); setCookie("opt13", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('odc'); setCookie("opt13", 1, 100); } return false; }); $(".opt14").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('letterspacing'); setCookie("opt14", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('letterspacing'); setCookie("opt14", 1, 100); } return false; }); $(".opt15").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('zakladka'); setCookie("opt15", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('zakladka'); setCookie("opt15", 1, 100); } return false; }); $(".opt16").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('otcenter'); setCookie("opt16", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('otcenter'); setCookie("opt16", 1, 100); } return false; }); $(".opt17").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('otright'); setCookie("opt17", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('otright'); setCookie("opt17", 1, 100); } return false; }); $(".opt18").click(function(){ if($(this).hasClass('optx-active')){ $(this).removeClass('optx-active'); $('html').removeClass('otjustify'); setCookie("opt18", 0, 100); }else{ $(this).addClass('optx-active'); $('html').addClass('otjustify'); setCookie("opt18", 1, 100); } return false; }); }) $('body').append('