CINXE.COM

<!DOCTYPE HTML> <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css"> <link href="styles.css" rel="stylesheet" type="text/css"> <!-- Google Tag Manager --> <script> (function(w, d, s, l, i) { w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', 'GTM-PNVXCFZ'); </script> <!-- End Google Tag Manager --> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-29421672-1']); _gaq.push(['_trackPageview']); let device; (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); function dialogSet(device, appurl, storeurl) { $(function() { if ($.cookie('hideDialog') != 'on') { $('.dialog').dialog({ modal: true, width: 600, resizable: false, buttons: { "キャンセル": function() { history.back(-1); } } }); } $('#useKinoppy').on('click', function() { $('#useKinoppy').off(); if ($('input').prop('checked')) { $.cookie('hideDialog', 'on', { expires: 3652 }); $.cookie('readStatus', 'kinoppy', { expires: 3652 }); } if (device == "mac") { AppSchemeStartUpForDesktop(appurl); } else if (device == "ios") { window.location = appurl; } }); //「次回以降ダイアログを表示しない」にチェックがある状態で「kinopppyをインストール」を押下したら次回以降もダイアログを表示させる $('#instKinoppy').click(function() { window.location = storeurl; }); }); } function launchAppForWebkit(appurl, storeurl) { var webkitHidden = 0; setTimeout(function() { if (!document.webkitHidden && !webkitHidden) { window.location = storeurl; } }, 400); window.location = appurl; setTimeout(function() { webkitHidden = document.webkitHidden; }, 25); } function AppSchemeStartUpForDesktop(appurl) { var iframe; iframe = document.body.appendChild(document.createElement('iframe')); iframe.setAttribute('id', 'launch'); iframe.setAttribute('name', 'launch'); iframe.setAttribute('src', appurl); iframe.setAttribute('style', 'visibility:hidden'); } function launchAppForMac(appurl, storeurl) { device = "mac"; dialogSet(device, appurl, storeurl); if ($.cookie('readStatus') == 'kinoppy') { var func; func = setTimeout(function() { if (document.hasFocus()) { window.location = storeurl; } else { history.back(-1); } }, 1500); AppSchemeStartUpForDesktop(appurl); window.blur(); window.focus(); if (typeof document.addEventListener != 'undefined') { document.addEventListener('DOMContentLoaded', func, false); window.addEventListener('load', func, false); } else if (typeof document.attachEvent != 'undefined') { document.attachEvent('onreadystatechange', func); window.attachEvent('onload', func); } } } function launchAppForWindows(appurl, storeurl) { var func; func = setTimeout(function() { if (document.hasFocus()) { window.location = storeurl; } else { history.back(-1); } }, 1500); AppSchemeStartUpForDesktop(appurl); window.blur(); window.focus(); if (typeof document.addEventListener != 'undefined') { document.addEventListener('DOMContentLoaded', func, false); window.addEventListener('load', func, false); } else if (typeof document.attachEvent != 'undefined') { document.attachEvent('onreadystatechange', func); window.attachEvent('onload', func); } } function launchAppForIos(appurl, storeurl) { device = "ios"; dialogSet(device, appurl, storeurl); if ($.cookie('readStatus') == 'kinoppy') { return window.location = appurl; } } function launchAppForAndroid(appurl, storeurl) { var previousBrowserHidden = false; setTimeout(function() { if (!document.hidden && !previousBrowserHidden) { window.location = storeurl; } else { history.back(-1); } }, 400); window.location = appurl; setTimeout(function() { previousBrowserHidden = document.hidden; }, 25); } function launchAppForWin(appurl, storeurl) { var iframe, func, called = false; if (typeof document.webkitHidden != 'undefined') { func = function() { if (called) return; called = true; launchAppForWebkit(appurl, storeurl); }; } else { func = function() { if (called) return; called = true; setTimeout(function() { window.location = storeurl; }, 3000); }; iframe = document.body.appendChild(document.createElement('iframe')); iframe.setAttribute('id', 'launch'); iframe.setAttribute('name', 'launch'); iframe.setAttribute('src', appurl); } if (typeof document.addEventListener != 'undefined') { document.addEventListener('DOMContentLoaded', func, false); window.addEventListener('load', func, false); } else if (typeof document.attachEvent != 'undefined') { document.attachEvent('onreadystatechange', func); window.attachEvent('onload', func); } } function isIpad() { if (navigator.userAgent.indexOf("Safari") != -1 && navigator.userAgent.indexOf("Chrome") == -1 && navigator.standalone !== undefined) { return true; } return false; } </script> </head> <body> <script type='text/javascript'><!-- // launchAppForWindows("kinoppy://sample?itemId=ID-EK-1964749100","https://k-kinoppy.jp/download/"); // --></script> <div class="dialog" id="dialog"> <p>試し読みの閲覧にはKinoppyのインストールが必要です。</p> <button type="button" name="useKinoppy" id="useKinoppy">Kinoppyで読む<button> <button type="button" name="instKinoppy" id="instKinoppy">Kinoppyをインストールする</button> <div class="checkbox"> <label> <input type="checkbox" name="check" id="checkBox" checked="checked">次回以降、このページを表示しない。 </label> <div> </div> </body> </html>