イラストなどを投稿した自分のポストを異なる時間帯(昼や深夜など)にセルフRPして宣伝できるツールです script.google.com/macros/s/AKfycbwnbvG1hSPgYJOWz4yyH76WxJU3TEOmZIBk_3CeaImYNVn4uRpz21VlEjNPs06FojkJLQ/exec
bluesky gas

Fix hour problems

Lamron 93ab5774 299de904

Changed files
+7 -2
+7 -2
code.js
··· 34 34 return htmlOutput; 35 35 } 36 36 37 + function resetData() { 38 + const userProperties = PropertiesService.getUserProperties(); 39 + userProperties.deleteAllProperties() 40 + } 41 + 37 42 function confirmTemplate(e) { 38 43 const template = HtmlService.createTemplateFromFile('confirm'); 39 44 const postUrl = e.parameter.postUrl ··· 98 103 idx++; 99 104 } 100 105 101 - idx = (nearestIdx + 1) % HOURS_NUM; 106 + idx = nearestIdx; 102 107 // var hourNames = []; 103 108 var rpList = JSON.parse(userProperties.getProperty("rpList")); 104 109 gasLog(rpList) ··· 292 297 } 293 298 294 299 const getLocalHour = (date) => { 295 - return date.getHours() + (9 + date.getTimezoneOffset() / 60); 300 + return (date.getHours() + (9 + date.getTimezoneOffset() / 60) + 24) % 24; 296 301 } 297 302 298 303 const gasLog = (obj) => {