Add desc
This commit is contained in:
		@@ -3,6 +3,7 @@ window.onload = function () {
 | 
			
		||||
	initPostbox()
 | 
			
		||||
	connection()
 | 
			
		||||
	initPlugin(plugins)
 | 
			
		||||
	if(localStorage.getItem('control-center-np')) $('#ccnp').removeClass('hide')
 | 
			
		||||
}
 | 
			
		||||
$.strip_tags = function (str, allowed) {
 | 
			
		||||
	if (!str) {
 | 
			
		||||
 
 | 
			
		||||
@@ -62,6 +62,12 @@ function checkSpotify() {
 | 
			
		||||
	} else {
 | 
			
		||||
		$('#amw_no').prop('checked', true)
 | 
			
		||||
	}
 | 
			
		||||
	var flag3 = localStorage.getItem('control-center-np')
 | 
			
		||||
	if (flag3) {
 | 
			
		||||
		$('#cmw_yes').prop('checked', true)
 | 
			
		||||
	} else {
 | 
			
		||||
		$('#cmw_no').prop('checked', true)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
function spotifyFlagSave() {
 | 
			
		||||
	var awk = $('[name=awk]:checked').val()
 | 
			
		||||
@@ -83,6 +89,16 @@ function aMusicFlagSave() {
 | 
			
		||||
		M.toast({ html: lang.lang_spotify_imgno, displayLength: 3000 })
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
function cMusicFlagSave() {
 | 
			
		||||
	var awk = $('[name=cmw]:checked').val()
 | 
			
		||||
	if (awk == 'yes') {
 | 
			
		||||
		localStorage.setItem('control-center-np', 'yes')
 | 
			
		||||
		M.toast({ html: 'コントロールセンターNPをオンにしました', displayLength: 3000 })
 | 
			
		||||
	} else {
 | 
			
		||||
		localStorage.removeItem('control-center-np')
 | 
			
		||||
		M.toast({ html: 'コントロールセンターNPをオフにしました', displayLength: 3000 })
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
function nowplaying(mode) {
 | 
			
		||||
	if (mode == 'spotify') {
 | 
			
		||||
		var start = 'https://spotify.thedesk.top/current-playing?code=' + localStorage.getItem('spotify-token')
 | 
			
		||||
 
 | 
			
		||||
@@ -275,6 +275,9 @@
 | 
			
		||||
					<li class="mac">
 | 
			
		||||
						<a onclick="nowplaying('itunes');">NowPlaying (iTunes macOS)</a>
 | 
			
		||||
					</li>
 | 
			
		||||
					<li class="mac hide" id="ccnp">
 | 
			
		||||
						<a onclick="nowplaying('anynp');">NowPlaying (コントロールセンター)</a>
 | 
			
		||||
					</li>
 | 
			
		||||
					<li>
 | 
			
		||||
						<a onclick="nowplaying('lastFm');">NowPlaying (Last.fm)</a>
 | 
			
		||||
					</li>
 | 
			
		||||
 
 | 
			
		||||
@@ -491,6 +491,20 @@
 | 
			
		||||
						<span>@@no@@</span>
 | 
			
		||||
					</label>
 | 
			
		||||
					<br>
 | 
			
		||||
					<h5>macOSコントロールセンター NowPlaying</h5>
 | 
			
		||||
					日本語環境でのみご利用いただけます。(It works well on macOS with Japanese language profile.)<br />
 | 
			
		||||
					上のアートワーク補完を使用しないとアートワークは付与されません。コントロールセンターがある日本語設定のmacOS Big Sur以降が対象です。<br />
 | 
			
		||||
					なお、コントロールセンターが勝手に開きますが仕様ですのでご理解ください。上記のテンプレートは反映されず、常に「タイトル, アーティスト」になります。<br />
 | 
			
		||||
					<label>
 | 
			
		||||
						<input class="with-gap" onchange="cMusicFlagSave()" name="cmw" type="radio" id="cmw_yes"
 | 
			
		||||
							value="yes" />
 | 
			
		||||
						<span>@@yes@@</span>
 | 
			
		||||
					</label>
 | 
			
		||||
					<label>
 | 
			
		||||
						<input class="with-gap" onchange="cMusicFlagSave()" name="cmw" type="radio" id="cmw_no"
 | 
			
		||||
							value="no" />
 | 
			
		||||
						<span>@@no@@</span>
 | 
			
		||||
					</label>
 | 
			
		||||
				</div>
 | 
			
		||||
			</div>
 | 
			
		||||
		</li>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user