Skip to content

Instantly share code, notes, and snippets.

@amuhororo
Last active July 3, 2022 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amuhororo/79b0fd58f461210300b6c6960f83adb3 to your computer and use it in GitHub Desktop.
Save amuhororo/79b0fd58f461210300b6c6960f83adb3 to your computer and use it in GitHub Desktop.
縦中横
//セーブを実行する
doSave : function(num) {
var array_save = this.getSaveData();
var data = {};
var that = this;
//* 【追記開始】縦中横変更 *//
var dt = new Date();
var year = "<tcy>" + dt.getFullYear() + "</tcy>";
var month = "<tcy>" + dt.getMonth()+1 + "</tcy>";
var day = "<tcy>" + dt.getDate() + "</tcy>";
var hours = "<tcy>" + dt.getHours() + "</tcy>";
var minutes = "<tcy>" + dt.getMinutes() + "</tcy>";
var seconds = "<tcy>" + dt.getSeconds() + "</tcy>";
//* 【追記ここまで】 *//
if (this.snap == null) {
this.snapSave(this.kag.stat.current_message_str, function() {
data = that.snap;
//data.save_date = $.getNowDate() + " " + $.getNowTime();
//↑を↓に変更
data.save_date = year+"年"+month+"月"+day+"日"+"\u3000"+hours+"時"+minutes+"分"+seconds+"秒";
array_save.data[num] = data;
$.setStorage(
that.kag.config.projectID + "_tyrano_data",
array_save,
that.kag.config.configSave
);
if (typeof cb == "function") {
//終わったタイミングでコールバックを返す
cb(data);
}
});
} else {
data = that.snap;
//data.save_date = $.getNowDate() + " " + $.getNowTime();
//↑を↓に変更
data.save_date = year+"年"+month+"月"+day+"日"+"\u3000"+hours+"時"+minutes+"分"+seconds+"秒";
array_save.data[num] = data;
$.setStorage(
that.kag.config.projectID + "_tyrano_data",
array_save,
that.kag.config.configSave,
);
if (typeof cb == "function") {
//終わったタイミングでコールバックを返す
cb(data);
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment