SHARE
TWEET

Untitled

a guest Jul 18th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.onload = ()=>{
  2.   `use strict`;
  3.   const csInterface = new CSInterface();  
  4.   themeManager.init();
  5.   const btn_test = document.getElementById(`btn_test`);
  6.   const loading = document.getElementById(`loading`);
  7.  
  8.   btn_test.addEventListener(`click`,saveJpegs);
  9.   async function saveJpegs(){
  10.     loading.style.display = `block`;
  11.     await adjustTime();//ロード画面を表示させるため少し間を空ける
  12.     csInterface.evalScript(`saveJpeg()`,(result)=>{
  13.       console.log(result);
  14.       loading.style.display = `none`;
  15.     });//メインjsxの関数を呼び出す
  16.   }
  17.  
  18.   function adjustTime(){
  19.     return new Promise(resolve=>{
  20.       setTimeout(()=>{
  21.         resolve();
  22.       },100);
  23.     });
  24.   }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top