CW when reply

This commit is contained in:
cutls
2020-11-17 01:10:59 +09:00
parent f2a4900f18
commit fa20278727
6 changed files with 24 additions and 7 deletions

View File

@@ -79,8 +79,8 @@ function loadVis() {
loadVis()
//コンテントワーニング
function cw() {
if ($('#cw').hasClass('cw-avail')) {
function cw(force) {
if ($('#cw').hasClass('cw-avail') || !force) {
$('#cw-text').val()
$('#cw-text').hide()
$('#cw').removeClass('yellow-text')

View File

@@ -475,7 +475,7 @@ function draftToPost(json, acct_id, id) {
}
$('#textarea').val(html)
if (json.spoiler_text) {
cw()
cw(true)
$('#cw-text').val(json.spoiler_text)
}
if (json.sensitive) {

View File

@@ -1,5 +1,5 @@
/*リプライ*/
function re(id, ats_cm, acct_id, mode) {
function re(id, ats_cm, acct_id, mode, cwTxt) {
clear()
var ats = ats_cm.split(',')
localStorage.setItem('nohide', true)
@@ -25,13 +25,18 @@ function re(id, ats_cm, acct_id, mode) {
}
$('#acct-sel-prof').attr('src', profimg)
vis(mode)
if(localStorage.getItem('cw-continue') == 'yes') {
cw(true)
$('#cw-text').val(cwTxt)
}
}
function reEx(id) {
$('#tootmodal').modal('close')
var at = $('#tootmodal').attr('data-user')
var acct_id = $('#status-acct-sel').val()
var mode = $('#tootmodal .vis-data').attr('data-vis')
re(id, at, acct_id, mode)
var cwTxt = $('#cw-text').val()
re(id, at, acct_id, mode, cwTxt)
}
//引用
function qt(id, acct_id, at, url) {