아빠의 우주연구
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
ctd:scrap:stock:heatmap_dow [2025/09/15 11:54] admin created |
ctd:scrap:stock:heatmap_dow [2025/09/15 11:55] (current) admin |
||
|---|---|---|---|
| Line 22: | Line 22: | ||
| <html> <!------ 페이지 iframe 삽입 및 이벤트 연결 -------> | <html> <!------ 페이지 iframe 삽입 및 이벤트 연결 -------> | ||
| | | ||
| - | <iframe id="slide" src="https://finviz.com/map.ashx?t=sec_dji" width="576" height="420" scrolling="no" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen> | + | <iframe id="heatmap" src="https://finviz.com/map.ashx?t=sec_dji" width="576" height="420" scrolling="no" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen> |
| </iframe> | </iframe> | ||
| | | ||
| Line 45: | Line 45: | ||
| - | <html> <!------ Comment 출력 함수 -------> | ||
| - | <script type="text/javascript"> | ||
| - | | ||
| - | function getSlideComment(horz, vert) { | ||
| - | try { | ||
| - | return comments[horz][vert]; | ||
| - | } | ||
| - | catch (e) { | ||
| - | return undefined; | ||
| - | } | ||
| - | } | ||
| - | | ||
| - | function getVoiceSelected() | ||
| - | { | ||
| - | var e = document.getElementById("voice"); | ||
| - | return strUser = e.options[e.selectedIndex].value; | ||
| - | } | ||
| - | | ||
| - | function commentPrint(comment) { | ||
| - | document.querySelector('.comment').innerHTML = comment; | ||
| - | } | ||
| - | | ||
| - | function commentVoice(comment) { | ||
| - | stopSpeech(); | ||
| - | splitComment = comment.split(SPLITCHAR); | ||
| - | | ||
| - | //while (splitComment.length > 0) { | ||
| - | if ((splitComment.length > 0)&&(voiceEnabled)) { | ||
| - | sayText(splitComment.shift(), getVoiceSelected(), LANG, ENGINE); | ||
| - | } | ||
| - | } | ||
| - | | ||
| - | // called when audio out is ended | ||
| - | function vw_audioEnded(){ | ||
| - | if ((splitComment.length > 0)&&(voiceEnabled)) { | ||
| - | sayText(splitComment.shift(), getVoiceSelected(), LANG, ENGINE); | ||
| - | } | ||
| - | //console.log('Audio Ended'); | ||
| - | } | ||
| - | |||
| - | function slideChangedTimer(horz, vert) { | ||
| - | if (typeof timerVar !== 'undefined') | ||
| - | clearTimeout(timerVar); | ||
| - | timerHorz = horz; | ||
| - | timerVert = vert; | ||
| - | // Mobile 에서는 user interaction 으로만 audio play 가능 timer event 에서 오디오 실행 안됨 | ||
| - | if (mobileBrowser) { | ||
| - | slideChangedEvent(); | ||
| - | } else { | ||
| - | timerVar = setTimeout(slideChangedEvent, TIMEOUT); | ||
| - | } | ||
| - | } | ||
| - | |||
| - | function slideChangedEvent() { | ||
| - | var horz = timerHorz; | ||
| - | var vert = timerVert; | ||
| - | // output index | ||
| - | //document.querySelector('.status').innerHTML = 'indexh: ' + horz + ' ' + 'indexv: ' + vert; | ||
| - | // output comment | ||
| - | var comment = getSlideComment(horz, vert); | ||
| - | //alert(horz+','+vert+','+comment); | ||
| - | if (comment) { | ||
| - | commentPrint(comment); | ||
| - | commentVoice(comment); | ||
| - | } | ||
| - | else { | ||
| - | commentPrint('작업중...'); | ||
| - | commentVoice(''); | ||
| - | console.log('comment null!'); | ||
| - | } | ||
| - | } | ||
| - | | ||
| - | </script> | ||
| - | </html> | ||
| - | | ||
| - | <html> <!------ fulscreen 함수 -------> | ||
| - | <script type="text/javascript"> | ||
| - | |||
| - | function full_screen() { | ||
| - | // check if user allows full screen of elements. This can be enabled or disabled in browser config. By default its enabled. | ||
| - | //its also used to check if browser supports full screen api. | ||
| - | if ("fullscreenEnabled" in document || "webkitFullscreenEnabled" in document || "mozFullScreenEnabled" in document || "msFullscreenEnabled" in document) { | ||
| - | if (document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled) { | ||
| - | console.log("User allows fullscreen"); | ||
| - | |||
| - | var element = document.getElementById("slide"); | ||
| - | //requestFullscreen is used to display an element in full screen mode. | ||
| - | if ("requestFullscreen" in element) { | ||
| - | element.requestFullscreen(); | ||
| - | } | ||
| - | else if ("webkitRequestFullscreen" in element) { | ||
| - | element.webkitRequestFullscreen(); | ||
| - | } | ||
| - | else if ("mozRequestFullScreen" in element) { | ||
| - | element.mozRequestFullScreen(); | ||
| - | } | ||
| - | else if ("msRequestFullscreen" in element) { | ||
| - | element.msRequestFullscreen(); | ||
| - | } | ||
| - | |||
| - | } | ||
| - | } | ||
| - | else { | ||
| - | console.log("User doesn't allow full screen"); | ||
| - | } | ||
| - | } | ||
| - | |||
| - | function screen_change() { | ||
| - | //fullscreenElement is assigned to html element if any element is in full screen mode. | ||
| - | if (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement) { | ||
| - | console.log("Current full screen element is : " + (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement)) | ||
| - | } | ||
| - | else { | ||
| - | // exitFullscreen us used to exit full screen manually | ||
| - | if ("exitFullscreen" in document) { | ||
| - | document.exitFullscreen(); | ||
| - | } | ||
| - | else if ("webkitExitFullscreen" in document) { | ||
| - | document.webkitExitFullscreen(); | ||
| - | } | ||
| - | else if ("mozCancelFullScreen" in document) { | ||
| - | document.mozCancelFullScreen(); | ||
| - | } | ||
| - | else if ("msExitFullscreen" in document) { | ||
| - | document.msExitFullscreen(); | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | |||
| - | //called when an event goes full screen and vice-versa. | ||
| - | document.addEventListener("fullscreenchange", screen_change); | ||
| - | document.addEventListener("webkitfullscreenchange", screen_change); | ||
| - | document.addEventListener("mozfullscreenchange", screen_change); | ||
| - | document.addEventListener("MSFullscreenChange", screen_change); | ||
| - | |||
| - | //called when requestFullscreen(); fails. it may fail if iframe don't have allowfullscreen attribute enabled or for something else. | ||
| - | document.addEventListener("fullscreenerror", function () { console.log("Full screen failed"); }); | ||
| - | document.addEventListener("webkitfullscreenerror", function () { console.log("Full screen failed"); }); | ||
| - | document.addEventListener("mozfullscreenerror", function () { console.log("Full screen failed"); }); | ||
| - | document.addEventListener("MSFullscreenError", function () { console.log("Full screen failed"); }); | ||
| - | </script> | ||
| - | | ||
| - | </html> | ||
| - | |||
| - | |||
| - | {{page>ctd:slides:timematrix:01&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:02&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:03&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:04&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:05&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:06&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:07&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:08&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:09&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:10&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:11&nofooter}} | ||
| - | {{page>ctd:slides:timematrix:12&nofooter}} | ||