This commit is contained in:
cutls 2019-11-27 23:03:18 +09:00
parent 89ba321890
commit 9f1aeb2b58
2 changed files with 8 additions and 7 deletions

View File

@ -17,6 +17,13 @@ function post(mode, postvis) {
var acct_id = $('#post-acct-sel').val() var acct_id = $('#post-acct-sel').val()
localStorage.setItem('last-use', acct_id) localStorage.setItem('last-use', acct_id)
var domain = localStorage.getItem('domain_' + acct_id) var domain = localStorage.getItem('domain_' + acct_id)
if ($('#ideKey').val() != '') {
var ideKey = $('#ideKey').val()
} else {
var user = localStorage.getItem('user_' + acct_id)
var ideKey = Math.floor(Date.now() / 1000) + '/TheDesk/' + user + '@' + domain
$('#ideKey').val(ideKey)
}
if (!localStorage.getItem('cw_sentence')) { if (!localStorage.getItem('cw_sentence')) {
var cw_sent = 500 var cw_sent = 500
} else { } else {
@ -148,12 +155,6 @@ function post(mode, postvis) {
} }
} }
console.table(toot) console.table(toot)
if($('#ideKey').val() != ''){
var ideKey = $('#ideKey').val()
} else {
var ideKey = Date.now() + '/' + Math.random().toString(32).substring(2)
$('#ideKey').val(ideKey)
}
var httpreq = new XMLHttpRequest() var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true) httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json') httpreq.setRequestHeader('Content-Type', 'application/json')

View File

@ -775,7 +775,7 @@
<a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"> <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor">
<img src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">Cutls <img src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">Cutls
</a><br> </a><br>
・冪等性の確保 ・冪等性の確保(これにより2秒以内の同一アカウントからの連投は禁止されます。)
<a onclick="udgEx('Cutls@cutls.com','main')" class="contributor"> <a onclick="udgEx('Cutls@cutls.com','main')" class="contributor">
<img src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">Cutls <img src="https://media.thedesk.top/accounts/avatars/000/000/001/original/d34ef8bb49d5e011.png">Cutls
</a><br> </a><br>