diff --git a/app/js/common/keyshortcut.js b/app/js/common/keyshortcut.js index 07722f61..6bfee7fe 100644 --- a/app/js/common/keyshortcut.js +++ b/app/js/common/keyshortcut.js @@ -227,7 +227,8 @@ $(function($) { var acct_id = $('#timeline_' + selectedColumn).attr('data-acct') var ats_cm = $('.selectedToot .rep-btn').attr('data-men') var mode = $('.selectedToot .rep-btn').attr('data-visen') - re(id, ats_cm, acct_id, mode) + var cwTxt = $('#cw-text').val() + re(id, ats_cm, acct_id, mode, cwTxt) return false } } diff --git a/app/js/post/secure.js b/app/js/post/secure.js index 1ae60032..9ea56518 100644 --- a/app/js/post/secure.js +++ b/app/js/post/secure.js @@ -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') diff --git a/app/js/post/status.js b/app/js/post/status.js index b80890b3..0e96b64b 100644 --- a/app/js/post/status.js +++ b/app/js/post/status.js @@ -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) { diff --git a/app/js/post/use-txtbox.js b/app/js/post/use-txtbox.js index 9e272df2..e7a347c2 100644 --- a/app/js/post/use-txtbox.js +++ b/app/js/post/use-txtbox.js @@ -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) { diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index 6afcca0d..98befa14 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -1085,7 +1085,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {