/*audio ファイル形式取得-------------------------------------------------------------------------------------*/ var audio = new Audio(); var audiotype = audio.canPlayType("audio/mp3")!=""?".mp3": audio.canPlayType("audio/ogg")!=""?".ogg": alert("サンプルボイスが再生できません"); $(function(){ /*--------------------------------------------------------------------------------------*/ //ページ内スクロール $(document).on("click","a[href^='#']", function(){ var link= $(this).attr("href"); var scl = $(link).offset().top; $("html,body").animate({scrollTop : scl}, 1000); return false; }); $(document).on("click","#menuChanger",function(){ if ($('#mci').prop('checked')) { // チェックを外す $('#mci').prop('checked', false); // もしチェックが外れていたら } else { // チェックを入れる $('#mci').prop('checked', true); } }); $(".copy_hash").on("click",function(){ var hash= $('input',this).val(); alert("ハッシュ値をコピーしました。\n"+hash) $("#HASH").select(); document.execCommand('copy'); }); var audio = new Audio(); //chara $(document).on("click",".ccbutton label:not(.cbac)",function(){ $(".ccbutton label").removeClass("cbac") $(this).addClass("cbac"); audio.pause(); }); //voice $(document).on("click",".samplevoice div",function(){ voice = $(this).data("chara"); charaID = $(this).parent("div").data("type"); audio.pause(); audio.src='chara/data/'+charaID+'/voice/'+voice+audiotype; audio.play(); }); //concept Voice $(document).on("click",".cV",function(){ voice = $(this).data("voice"); audio.pause(); audio.src='concept/'+voice+audiotype; audio.play(); }) //download $(document).on("click",".dlLink , .dlLink_ALL , .dlLink_SUB , .dlLink_cha", function(){ dlfile = $(this).data("dlid"); //location.href ='http://ddx1.illusion.rip/download/dl.cgi?dlname='+ dlfile +'.exe&count='+ dlfile; location.href ='https://static.illusion.rip/honeyselect2_libido_dx/'+ dlfile +'.exe'; }); /*-----------------------------------------------------------------------------------------------------*/ });