CW when reply
This commit is contained in:
		@@ -227,7 +227,8 @@ $(function($) {
 | 
				
			|||||||
				var acct_id = $('#timeline_' + selectedColumn).attr('data-acct')
 | 
									var acct_id = $('#timeline_' + selectedColumn).attr('data-acct')
 | 
				
			||||||
				var ats_cm = $('.selectedToot .rep-btn').attr('data-men')
 | 
									var ats_cm = $('.selectedToot .rep-btn').attr('data-men')
 | 
				
			||||||
				var mode = $('.selectedToot .rep-btn').attr('data-visen')
 | 
									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
 | 
									return false
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -79,8 +79,8 @@ function loadVis() {
 | 
				
			|||||||
loadVis()
 | 
					loadVis()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//コンテントワーニング
 | 
					//コンテントワーニング
 | 
				
			||||||
function cw() {
 | 
					function cw(force) {
 | 
				
			||||||
	if ($('#cw').hasClass('cw-avail')) {
 | 
						if ($('#cw').hasClass('cw-avail') || !force) {
 | 
				
			||||||
		$('#cw-text').val()
 | 
							$('#cw-text').val()
 | 
				
			||||||
		$('#cw-text').hide()
 | 
							$('#cw-text').hide()
 | 
				
			||||||
		$('#cw').removeClass('yellow-text')
 | 
							$('#cw').removeClass('yellow-text')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -475,7 +475,7 @@ function draftToPost(json, acct_id, id) {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	$('#textarea').val(html)
 | 
						$('#textarea').val(html)
 | 
				
			||||||
	if (json.spoiler_text) {
 | 
						if (json.spoiler_text) {
 | 
				
			||||||
		cw()
 | 
							cw(true)
 | 
				
			||||||
		$('#cw-text').val(json.spoiler_text)
 | 
							$('#cw-text').val(json.spoiler_text)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (json.sensitive) {
 | 
						if (json.sensitive) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
/*リプライ*/
 | 
					/*リプライ*/
 | 
				
			||||||
function re(id, ats_cm, acct_id, mode) {
 | 
					function re(id, ats_cm, acct_id, mode, cwTxt) {
 | 
				
			||||||
	clear()
 | 
						clear()
 | 
				
			||||||
	var ats = ats_cm.split(',')
 | 
						var ats = ats_cm.split(',')
 | 
				
			||||||
	localStorage.setItem('nohide', true)
 | 
						localStorage.setItem('nohide', true)
 | 
				
			||||||
@@ -25,13 +25,18 @@ function re(id, ats_cm, acct_id, mode) {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
	$('#acct-sel-prof').attr('src', profimg)
 | 
						$('#acct-sel-prof').attr('src', profimg)
 | 
				
			||||||
	vis(mode)
 | 
						vis(mode)
 | 
				
			||||||
 | 
						if(localStorage.getItem('cw-continue') == 'yes') {
 | 
				
			||||||
 | 
							cw(true)
 | 
				
			||||||
 | 
							$('#cw-text').val(cwTxt)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
function reEx(id) {
 | 
					function reEx(id) {
 | 
				
			||||||
	$('#tootmodal').modal('close')
 | 
						$('#tootmodal').modal('close')
 | 
				
			||||||
	var at = $('#tootmodal').attr('data-user')
 | 
						var at = $('#tootmodal').attr('data-user')
 | 
				
			||||||
	var acct_id = $('#status-acct-sel').val()
 | 
						var acct_id = $('#status-acct-sel').val()
 | 
				
			||||||
	var mode = $('#tootmodal .vis-data').attr('data-vis')
 | 
						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) {
 | 
					function qt(id, acct_id, at, url) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1085,7 +1085,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
 | 
				
			|||||||
						</a>
 | 
											</a>
 | 
				
			||||||
					</div>
 | 
										</div>
 | 
				
			||||||
					<div class="action ${disp['re']} ${noauth}">
 | 
										<div class="action ${disp['re']} ${noauth}">
 | 
				
			||||||
						<a onclick="re('${toot.id}','${to_mention}','${acct_id}','${visen}')" 
 | 
											<a onclick="re('${toot.id}','${to_mention}','${acct_id}','${visen}','${escapeHTML(toot.spoiler_text)}')" 
 | 
				
			||||||
							class="waves-effect waves-dark btn-flat actct rep-btn"
 | 
												class="waves-effect waves-dark btn-flat actct rep-btn"
 | 
				
			||||||
							data-men="${to_mention}" data-visen="${visen}" style="padding:0" title="${lang.lang_parse_replyto}">
 | 
												data-men="${to_mention}" data-visen="${visen}" style="padding:0" title="${lang.lang_parse_replyto}">
 | 
				
			||||||
								<i class="fas fa-share"></i>
 | 
													<i class="fas fa-share"></i>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -523,6 +523,17 @@ var postConstruction = [
 | 
				
			|||||||
			checkbox: yesno
 | 
								checkbox: yesno
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							id: 'cw-continue',
 | 
				
			||||||
 | 
							storage: 'cw-continue',
 | 
				
			||||||
 | 
							checkbox: true,
 | 
				
			||||||
 | 
							setValue: 'no',
 | 
				
			||||||
 | 
							text: {
 | 
				
			||||||
 | 
								head: '@@cwContinue@@',
 | 
				
			||||||
 | 
								desc: '',
 | 
				
			||||||
 | 
								checkbox: yesno
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		id: 'vis',
 | 
							id: 'vis',
 | 
				
			||||||
		storage: 'vis',
 | 
							storage: 'vis',
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user