Last active
July 7, 2019 22:47
-
-
Save tokyosheep/a46e6e22192c982aa8670c01facc99d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.onload = ()=>{ | |
| `use strict`; | |
| const csInterface = new CSInterface(); | |
| themeManager.init(); | |
| const btn_test = document.getElementById(`btn_test`); | |
| const loading = document.getElementById(`loading`); | |
| btn_test.addEventListener(`click`,saveJpegs); | |
| async function saveJpegs(){ | |
| loading.style.display = `block`; | |
| await adjustTime();//ロード画面を表示させるため少し間を空ける | |
| csInterface.evalScript(`saveJpeg()`,(result)=>{ | |
| console.log(result); | |
| loading.style.display = `none`; | |
| });//メインjsxの関数を呼び出す | |
| } | |
| function adjustTime(){ | |
| return new Promise(resolve=>{ | |
| setTimeout(()=>{ | |
| resolve(); | |
| },100); | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment