728x90 ๐ฅ๏ธํ๋ก ํธ์๋/HTML | CSS | JAVASCRIPT28 ์๋ฐ์คํฌ๋ฆฝํธ - text to speech(text2speech)(SpeechSynthesisUtterance) function say(m) { var msg = new SpeechSynthesisUtterance(); var voices = window.speechSynthesis.getVoices(); msg.voice = voices[10]; msg.voiceURI = "native"; msg.volume = 1; msg.rate = 1; msg.pitch = 0.8; msg.text = m; msg.lang = 'en-US'; speechSynthesis.speak(msg); } ์ถ์ฒ: https://stackoverflow.com/questions/15653145/using-google-text-to-speech-in-javascript Using Google Text-To-Speech in Javascr.. 2022. 11. 5. ์๋ฐ์คํฌ๋ฆฝํธ - ๋ด ์ปดํจํฐ GPU(๊ทธ๋ํฝ ์นด๋) ์ ๋ณด ๊ฐ์ ธ์ค๊ธฐ(WebGL) var canvas = document.createElement('canvas'); var gl; var debugInfo; var vendor; var renderer; try { gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); } catch (e) { } if (gl) { debugInfo = gl.getExtension('WEBGL_debug_renderer_info'); vendor = gl.getParameter(debugInfo.UNMASKED_VENDOR_WEBGL); renderer = gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL); } console.log(.. 2022. 10. 12. ์๋ฐ์คํฌ๋ฆฝํธ - Pure JavaScript HTML5 to (Animated) GIF Conversion HTML5๋ฅผ GIF๋ก ๋ณํ ์ํค๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ https://github.com/antimatter15/jsgif/ GitHub - antimatter15/jsgif: Save a HTML5 Canvas to GIF and Animations. A port of as3gif GIFPlayer to JS Save a HTML5 Canvas to GIF and Animations. A port of as3gif GIFPlayer to JS - GitHub - antimatter15/jsgif: Save a HTML5 Canvas to GIF and Animations. A port of as3gif GIFPlayer to JS github.com 2022. 10. 12. html - debugger(๊ฐ๋ฐ์ ๋๊ตฌ ๋ฐฉ์ง) ๋นํ์ฑํ https://janger.tistory.com/222 html - ๊ฐ๋ฐ์ ๋๊ตฌ ๋ง๊ธฐ(์ฌ์ฉํ๊ธฐ ํ๋ค๊ฒ) (function () { (function a() { try { (function b(i) { if (('' + (i / i)).length !== 1 || i % 20 === 0) { (function () { }).constructor('debugger')() } else { debugger } b(++i) } )(0) } catch (e) { s.. janger.tistory.com (function anonymous( ) { debugger }) ์ ๊ฐ์ ๊ฐ๋ฐ์ ๋๊ตฌ๋ฅผ ๋ง์ผ๋ ค๊ณ ์ผ๋ถ๋ก debugger๋ก ๋ธ๋ ์ดํฌ ํฌ์ธํธ๋ฅผ ์ฃผ๋ ์คํฌ๋ฆฝํธ๊ฐ ์กด์ฌํ ๊ฒฝ์ฐ ๊ฐ๋ฐ์ ๋๊ตฌ์์ Sources ํญ์ ๋ค์ด๊ฐ ๋ค.. 2022. 8. 16. CSS - ์ธ๋ผ์ธ ์ฝ๋ ๋ธ๋ญ ๋์ถฉ ์ด๋ฐ๊ฒ์ ๋๋ค. /* ์ธ๋ผ์ธ ์ฝ๋ ๋ธ๋ญ */ code { padding: 0.25rem; background-color: #F1F1F1; border-radius: 5px; box-shadow: 0.25px 0.25px 10px rgb(156, 156, 156); font-family: "Consolas", "Sans Mono", "Courier", "monospace"; font-size: 1.0rem; } ์ฐธ๊ณ : https://wordbe.tistory.com/entry/%EC%9D%B8%EB%9D%BC%EC%9D%B8-%EC%BD%94%EB%93%9C%EB%B8%94%EB%9F%AD-%EC%BD%94%EB%93%9C-%EA%B0%95%EC%A1%B0-%EC%BD%94%EB%93%9C-%EB%B0.. 2022. 7. 30. ์๋ฐ์คํฌ๋ฆฝํธ - for in๊ณผ for of ์ฐจ์ด์ ์๊น์ var arr = [2, 5, 7, 9, 12]; // for in for(const item in arr){ console.log(item); } // for of for(const item of arr){ console.log(item) } ์๊น์๋ ์ด๋ ๊ฒ ์๊ฒผ์ต๋๋ค. ๋ ๋ค ๋๋ฌด ๋๊ฐ์ด ์๊ฒจ์ ๊ฐ๋ ์ฌ์ฉํ๋ ค๊ณ ํ ๋๋ง๋ค ํผ๋์ด ์๊น๋๋ค. ์ง๊ธ๋ถํฐ ์ด๋ฐ ์์ผ๋ก ์ธ์ฐ์๋ฉด ๋ฉ๋๋ค. for in์ ๊ฐ์ฒด(ํค ๊ฐ) ์ํ for of์ ๋ฐฐ์ด ์ํ ์ฐธ๊ณ ๋ก ์๋จ ์ฝ๋์ ์คํ ๊ฒฐ๊ณผ๋ ์ด๋ ์ต๋๋ค. // for in 0 1 2 3 4 // for of 2 5 7 9 12 for of๋ ๋ฐฐ์ด์ ๊ฐ์ ์์๋๋ก ์ ์ถ๋ ฅํ๋ ๋ฐ๋ฉด์ for in์ 0, 1, 2, 3 ๊ฐ์ ์ซ์์ ์ํ์ ๋ฐํํฉ๋๋ค. ๋ฐ๋ก ๋์น์ฑ ์ฌ๋๋ ์.. 2022. 7. 30. ์๋ฐ์คํฌ๋ฆฝํธ - map์ forEach์ ์ฐจ์ด์ Array.prototype.map() map() ๋ฉ์๋๋ ๋ฐฐ์ด ๋ด์ ๋ชจ๋ ์์ ๊ฐ๊ฐ์ ๋ํ์ฌ ์ฃผ์ด์ง ํจ์๋ฅผ ํธ์ถํ ๊ฒฐ๊ณผ๋ฅผ ๋ชจ์ ์๋ก์ด ๋ฐฐ์ด์ ๋ฐํํฉ๋๋ค. ์๋ํด๋ณด๊ธฐ Array.prototype.forEach() forEach() ๋ฉ์๋๋ ์ฃผ์ด์ง ํจ์๋ฅผ ๋ฐฐ์ด ์์ ๊ฐ๊ฐ์ ๋ํด ์คํํฉ๋๋ค. ์๋ํด๋ณด๊ธฐ map ๋ฉ์๋์ forEach ๋ฉ์๋์ ์ฐจ์ด์ ํฐ ์ฐจ์ด์ ์ return ๊ฐ์ ๋ฐํํ๋ ์ ํ๋๊ฐ ์์ต๋๋ค. const map1 = array1.map(x => x * 2); console.log(map1); // [2, 8, 18, 32] ์ฐ์ map ๊ฐ์ ๊ฒฝ์ฐ๋ ์ฝ๋ฐฑ ํจ์์ ์คํ ๊ฒฐ๊ณผ๋ฅผ return์ ๊ทธ ๊ฒฐ๊ณผ๋ค์ ๋ฐฐ์ด ํํ๋ก ๋ณ์์ ์ ์ฅํฉ๋๋ค. array1.forEach(element => console.l.. 2022. 7. 30. ์๋ฐ์คํฌ๋ฆฝํธ - ์ฌ์ฉ์ ๊ณ ์ ์ ํ๋กํ ์ฌ์ง(Identicon) ๊ฐ๋ ์ปค๋ฎค๋ํฐ ์ฌ์ดํธ๋ฅผ ์ด์ฉํ๋ค๋ณด๋ฉด ์์ ๊ฐ์ ํํ์ ์ฌ์ฉ์ ํ๋กํ๋ค์ ํ์ธํ ์ ์๋๋ฐ ์ด๋ ์ฌ์ฉ์์ ๊ณ ์ ํ ๋ฒํธ๋ก ๋ง๋ค์ด๋ด๋ ์ฌ์ฉ์ ์๋ณ ํ๋กํ ์ฌ์ง์ด๋ค. ์ ํํ ๋ช ์นญ์ Identicon์. ์๋ฐ์คํฌ๋ฆฝํธ๋ง์ ์ฌ์ฉํด์ ๋ง๋ค์๋ค๊ณ ํ๋ค. ์คํ์์ค์ด๋ฏ๋ก ์ง์ ๊นํ๋ธ์์ ๋ค์ดํด์ ๋ณธ์ธ์ด ์ด์ํ๋ ์ฌ์ดํธ์๋ค ์ ์ฉํด๋๋๋ค. https://github.com/stewartlord/identicon.js GitHub - stewartlord/identicon.js: GitHub-style identicons as PNGs or SVGs in JS GitHub-style identicons as PNGs or SVGs in JS . Contribute to stewartlord/identicon.js developm.. 2022. 7. 21. ์๋ฐ์คํฌ๋ฆฝํธ - Web Notification API(์๋์ฐ ์๋ ๊ธฐ๋ฅ) window.onload = function () { // ์น ํ์ด์ง ๋ก๋ ํ์ ์๋ฆผ ๊ถํ ํ์ธ if (window.Notification) { Notification.requestPermission(); } } function notify() { if (Notification.permission !== 'granted') { alert('notification is disabled'); } else { var notification = new Notification('Notification title', { icon: 'http://cdn.sstatic.net/stackexchange/img/logos/so/so-icon.png', body: 'Notification text', }); notifica.. 2022. 6. 22. ์๋ฐ์คํฌ๋ฆฝํธ - alertBox function alertBox(msg, delay = 3000){ var container = document.createElement('div'); container.setAttribute('class', 'alertBox-container'); container.style.width = '100%'; container.style.height = '100px'; container.style.position = 'fixed'; container.style.bottom = '0'; container.style.display = 'flex'; container.style.justifyContent = 'center'; var box = document.createElement('div'); box.styl.. 2022. 4. 10. html - ๊ฐ๋ฐ์ ๋๊ตฌ ๋ง๊ธฐ(์ฌ์ฉํ๊ธฐ ํ๋ค๊ฒ) (function () { (function a() { try { (function b(i) { if (('' + (i / i)).length !== 1 || i % 20 === 0) { (function () { }).constructor('debugger')() } else { debugger } b(++i) } )(0) } catch (e) { setTimeout(a, 700) } } )() } )(); 2022. 2. 24. ์๋ฐ์คํฌ๋ฆฝํธ - localStorage์ ํด๋์ค ๋ณ์ ์ ์ฅํ๊ธฐ localStorage.setItem('Todos', JSON.stringify(todosList)); if( localStorage.getItem('Todos') != null && localStorage.getItem('Todos') != undefined && localStorage.getItem('Todos') != '' && localStorage.getItem('Todos') != '[]' ){ todosList = JSON.parse( localStorage.getItem('Todos') ); } 2022. 2. 10. ์ด์ 1 2 3 ๋ค์ 728x90