記事の「下書き保存」「投稿」を確認する画面
この間、「SP Caution ⭐」の見直しをして来ましたが、「下書き保存」や「投稿する」の処理をした時に表示される確認画面(それぞれ違います)をチェックしていて、いくつかの部分をデザイン上で小修正しました。
これらの確認画面には、CSSスタイル「Ameblo Writer(Compact)」と、JavaScriptツール「Quick EntryList」が関わっていて、デザイン上では互いに連携させています。
下は、「下書き保存」の確認画面で、既に修正済ですが、これまでは「Quick EntryList」が表示している「記事の編集・削除を表示」のボタンが、赤文字のエラー表示に少しかかっていたので、パネルの配置を少しですが移動しました。
下は、同じ「下書き保存」の確認画面で、正常終了時の場合です。「記事の編集・削除を表示」のボタンを移動したので、「ページをとじる」のボタンと少し重なり、このボタンも少し上に移動しています。 この「閉じるボタン」は「Ameblo Writer」がアレンジした配置です。
ツールとCSSの更新について
機能上は変わらないデザイン上の更新なので、ご利用の方はお手空きの時にでも更新いただけたらと思います。
Quick EntryList
「Quick EntryList」は、このページの末尾に更新済の「ver. 1.0」のコードを置いています。
Ameblo Writer / Ameblo Writer Compact
「Ameblo Writer(Compact)」の更新版は「ver. 202307.15.01」です。 これは「Stylus」の管理画面で、「全スタイルの更新をチェック」のボタンから、更新が可能です。
「Quick EntryList」 とは
「Quick EntryList」は「記事の編集・削除」の機能を拡張するツールです。 アメブロの書庫的な利用や管理などに大変便利です。 また、記事の扱いや表示に関して、幾つかの補助をします。
詳しくは「Quick EntryList」のマニュアルを参照ください。
「Quick EntryList」を利用するには
このツールは Chrome / Edge / Firefox の拡張機能「Tampermonkey」上で動作します。 このツールは常駐型のツールで、Tampermonkey上で常に「ON」にしておくと、「記事の編集・削除」の画面を開いた時にのみに起動します。
以下に、このツールの導入手順を簡単に説明します。
❶「Tampermonkey」を導入します
使用しているブラウザに拡張機能「Tampermonkey」を導入する事が必要です。 以下のページに簡単な導入の説明があるので参照ください。
❷「Tampermonkey」にスクリプトを登録します
●「Tampermonkey」の「+」マークの「新規スクリプト」タブを開きます。
●「新規スクリプト」には、最初からテンプレートが記入されています。 これは全て削除して、完全に空白の編集枠に 下のコードをコピー&ペーストします。
〔コピー方法〕 軽量シンプルなツール「PreBox Button 」を使うと
コード枠内を「Ctrl+左Click」➔「Copy code 」を「左Click」
の操作で、掲載コードのコピーが可能になります。
● 最後に「ファイル」メニューの「保存」を押すと、ツールが使用可能になります。
〔 Quick EntryList 〕 ver. 1.0
// ==UserScript== // @name Quick EntryList // @namespace http://tampermonkey.net/ // @version 1.0 // @description 記事の編集・削除の機能拡張 // @author Ameba Blog User // @match https://blog.ameba.jp/ucs/entry/srventrylist* // @match https://blog.ameba.jp/ucs/entry/srventry*draft* // @match https://blog.ameba.jp/ucs/top.do // @grant none // ==/UserScript== if(location.pathname.includes('srventrylist')){ // 記事の編集・削除の場合 let help_url='https://ameblo.jp/personwritep/entry-12742971012.html'; let year_list=[]; // 選択年度の配列 let point_ym; // ユーザーの指定年月のクエリー文字 let qe_ym=[]; // Quick EntryList 復帰ポイントのユーザー設定 let read_json=localStorage.getItem('QE_Point'); // ローカルストレージ 保存名 qe_ym=JSON.parse(read_json); if(qe_ym==null){ qe_ym=['', '?', '?', '?', '?']; } let write_json=JSON.stringify(qe_ym); localStorage.setItem('QE_Point', write_json); // ローカルストレージ 保存 let help_SVG= '<svg class="qe_h" height="20" width="24" viewBox="0 0 210 220">'+ '<path d="M89 22C71 25 54 33 41 46C7 81 11 142 50 171C58 177 '+ '68 182 78 185C90 188 103 189 115 187C126 185 137 181 146 175'+ 'C155 169 163 162 169 153C190 123 189 80 166 52C147 30 118 18'+ ' 89 22z" style="fill:#999;"></path>'+ '<path d="M67 77C73 75 78 72 84 70C94 66 114 67 109 83C106 91'+ ' 98 95 93 101C86 109 83 116 83 126L111 126C112 114 122 108 1'+ '29 100C137 90 141 76 135 64C127 45 101 45 84 48C80 49 71 50 '+ '68 54C67 56 67 59 67 61L67 77M85 143L85 166L110 166L110 143L'+ '85 143z" style="fill:#fff;"></path>'+ '</svg>'; let disp_qe= '<div id="disp_qe">'+ '<span class="qe_s">表示年月:</span>'+ '<button class="qe_button" id="qe_b1"></button>'+ '<button class="qe_button" id="qe_b2"></button>'+ '<button class="qe_button" id="qe_b3"></button>'+ '<button class="qe_button" id="qe_b4"></button>'+ '<a href="'+ help_url +'" target="_blank" rel="noopener">'+ help_SVG + '</a></div>'; let Main_h1=document.querySelector('#ucsMainLeft h1'); if(!document.querySelector('#disp_qe') && Main_h1){ Main_h1.insertAdjacentHTML('beforeend', disp_qe); } let ym_select= '<select id="ym_select_box"></select>'; let entrySort=document.querySelector('#entrySort'); if(!document.querySelector('#ym_select_box') && entrySort){ entrySort.insertAdjacentHTML('beforeend', ym_select); } let qe_style= '<style id="qe_style">'+ '#disp_qe { float: right; margin-top: -2px; background: #fff; } '+ '.qe_s { font: normal 14px Meiryo; cursor: default; } '+ '.qe_s:hover::before { '+ 'content: "Boxを Ctrl+Click:現在の表示年月を登録 Click:登録ページを表示"; '+ 'position: absolute; right: 10px; margin: -27px 0 0; padding: 2px 6px 0; '+ 'background: #fff; border: thin solid #aaa; } '+ '.qe_button { height: 25px; min-width: 70px; font-size: 15px; '+ 'margin: 0 4px; padding: 2px 6px; border: 1px solid #ccc; '+ 'vertical-align: -1px; cursor: pointer; } '+ '.qe_h { vertical-align: -6px; } '+ '#entrySort { position: relative; padding: 1px 0 0; } '+ '#entryYear { display: flex; justify-content: space-between; '+ 'align-items: center; width: 120px; margin: 0 5px; } '+ '#yearText { position: absolute; top: 6px; left: 84px; width: 16px; '+ 'padding: 0 1px; font-size: 14px; color: #1976d2; z-index: 1; } '+ '#ym_select_box { position: absolute; top: 0; left: 24px; height: 29px; '+ 'width: 81px; padding: 1px 11px 0 0; font: bold 18px Meiryo !important; '+ 'text-align: center; border: 1px solid #ccc; outline: none; background: #fff; '+ 'appearance: none; scrollbar-width: none; cursor: pointer; } '+ '#ym_select_box::-webkit-scrollbar { display: none; } '+ '#ym_select_box option { font: bold 18px Meiryo; } '+ '#entryMonth { margin-right: -10px; } '+ '#sorting .pagingArea { float: left; margin: -3px -10px -3px 20px; '+ 'background: #fff; } '+ '#sorting .pagingArea ul { padding: 3px 2px 2px; } '+ '#sorting .pagingArea li { margin: 0; padding: 0;border-right: none; }</style>'; if(!document.querySelector('#qe_style')){ document.documentElement.insertAdjacentHTML('beforeend', qe_style); } for(let k=1; k<5; k++){ disp_button(k)} set_year_list(); disp_select(); select_year(); point_set(1); point_set(2); point_set(3); point_set(4); paging(); feature(); function disp_button(n){ let button=document.querySelector('#qe_b'+n); if(button){ let date_raw; let ny; let nm; if(qe_ym[n].indexOf("&so=")!=-1){ // 古い順表示の場合 date_raw=qe_ym[n].substring(0, qe_ym[n].indexOf("&so=")); } else{ date_raw=qe_ym[n]; } ny=date_raw.slice(-6, -2); nm=date_raw.slice(-2); if((ny>1999 && ny<2100) && (nm>0 && nm<13)){ button.textContent=ny+'-'+nm; } else{ // 未登録の場合 button.textContent='- - -'; }}} function select_year(){ let set_year; let ym_select_box=document.querySelector('#ym_select_box'); if(ym_select_box){ ym_select_box.onchange=function(){ set_year=ym_select_box.options[ym_select_box.selectedIndex].value; location.href= "https://blog.ameba.jp/ucs/entry/srventrylist.do?entry_ym="+ set_year +"01"; }}} function set_year_list(){ let currentTime=new Date(); let year=currentTime.getFullYear(); for(let k=2000; k<year+1; k++){ year_list.push(k); } year_list.reverse(); } function disp_select(){ let page_year; let query; let input_year=document.querySelector('input[name="urlParam"]'); if(input_year){ query=input_year.value; page_year=query.slice(-6, -2); } if(!page_year){ let currentTime=new Date(); let current_year=currentTime.getFullYear(); page_year=current_year; } let ym_select_box=document.querySelector('#ym_select_box'); if(ym_select_box){ for(let k=0; k<year_list.length; k++){ let option=document.createElement('option'); option.text=year_list[k]; option.value=year_list[k]; ym_select_box.appendChild(option); if(page_year==year_list[k]){ option.selected=true; }}}} function point_set(n){ let point_button=document.querySelector('#qe_b'+n); if(point_button){ point_button.onclick=function(event){ if(!event.ctrlKey){ // 登録ページの表示 location.href= "https://blog.ameba.jp/ucs/entry/srventrylist.do"+ qe_ym[n]; } else{ // ページを登録 let date_raw; let ny; let nm; let current_search; // 現在のクエリー文字列 if(!location.search){ //「記事の編集・削除」の初期表示の場合 let currentTime=new Date(); ny=currentTime.getFullYear(); nm=('0'+(currentTime.getMonth()+1)).slice(-2); } else{ if(location.search.indexOf("&so=")!=-1){ // 古い順表示の場合 date_raw=location.search.substring(0, location.search.indexOf("&so=")); } else{ date_raw=location.search; } ny=date_raw.slice(-6, -2); nm=date_raw.slice(-2); } if((ny>1999 && ny<2100) && (nm>0 && nm<13)){ let ok=confirm( " 💢 Quick指定年月の登録を変更します\n\n"+ "「OK」を押すと現在選択している "+ny+"年 "+nm+"月 のページを登録します" ); if(ok){ current_search=location.search; if(!current_search){ current_search='?entry_ym='+ny+nm; } qe_ym[n]=current_search; let write_json=JSON.stringify(qe_ym); // ローカルストレージ 保存 localStorage.setItem('QE_Point', write_json); disp_button(n); }} else{ // クエリーの値が不正値の場合 let ok=confirm( " 💢 クエリー文字列が異常値で登録できません\n\n"+ " 「OK」を押すと先頭ページに移動します" ); if(ok){ location.href= "https://blog.ameba.jp/ucs/entry/srventrylist.do"; }}} }}} // point_set() function paging(){ let paging_area=document.querySelector('.pagingArea'); if(paging_area){ let sorting=document.querySelector('#sorting'); let s_theme=document.querySelector('#selectTheme'); let clone_paging=document.querySelector('#sorting .pagingArea'); if(!clone_paging){ if(sorting && s_theme){ let clone=paging_area.cloneNode(true); sorting.insertBefore(clone, s_theme.nextElementSibling); }}}} function feature(){ let currentDate = new Date(); let year=currentDate.getFullYear(); let month=currentDate.getMonth() + 1; let date=currentDate.getDate(); let hour=currentDate.getHours(); let minute=currentDate.getMinutes(); function formatTime(val) { return ("0" + val).slice(-2); } //「0」付きで2桁テキストに変更 let now=year + formatTime(month) + formatTime(date) + formatTime(hour) + formatTime(minute) now=parseInt(now, 10); let page_year=document.querySelector('#entryYear #year'); if(page_year){ page_year=page_year.textContent; } else{ page_year='2000'; } let p_time=document.querySelectorAll('#entryList .date'); for(let k=0; k<p_time.length; k++){ let p_date=p_time[k].textContent; p_date=page_year + p_date.replace(/[^0-9]/g, ''); p_date=parseInt(p_date, 10); // 文字列を10進数に変換 if(p_date>now){ p_time[k].style.color='#fff'; p_time[k].style.background='#2196f3'; }} } // feature() } // 記事の編集・削除の場合 if(location.pathname.includes('top.do')){ // 管理トップの場合 let EntryStatus=document.querySelectorAll('.recentEntry__itemEntryStatus'); for(let k=0; k<EntryStatus.length; k++){ if(EntryStatus[k].textContent.includes('下書き中')){ EntryStatus[k].style.overflow='hidden'; let add= '<span style="padding:2px 4px; margin: 0 -4px; '+ 'color: #fff; background: #2196f3;">下書き</span>'; let str=EntryStatus[k].textContent.split('・'); if(str.length<3){ EntryStatus[k].innerHTML=add; } if(str.length==3){ EntryStatus[k].innerHTML=str[0] +' '+ add; }}} } // 管理トップの場合 if(location.pathname.includes('draft')){ // 下書き保存の場合 let el_button= '<div id="el_button">'+ '<svg viewBox="0 0 120 120">'+ '<path d="M0 0L0 112L112 112L112 0L0 0z" style="fill: #fff"></path>'+ '<path d="M23 21L45 21C48 21 52 20 55 22C60 26 56 34 64 36C70 38 '+ '78 37 84 37C88 37 92 37 94 40C97 43 96 48 96 52L96 81C100 81 103 '+ '80 105 76C107 73 106 69 106 65L106 43C106 39 106 35 104 31C101 27 '+ '96 27 92 27C84 27 76 27 68 27C68 22 68 17 65 14C61 10 55 11 50 11C39 '+ '11 26 8 23 21M52 43C52 40 52 38 51 35C48 25 35 27 27 27C21 27 13 26 '+ '9 32C6 37 7 43 7 48L7 82C7 87 6 94 10 97C15 101 22 100 28 100L69 '+ '100C74 100 81 101 86 98C90 95 90 91 90 86L90 58C90 53 90 48 86 '+ '45C83 43 79 43 75 43L52 43z" style="fill: #1976D2"></path>'+ '<path d="M80 53C72 52 65 52 57 52C54 52 49 53 47 52C40 48 44 39 '+ '38 37C34 36 21 35 18 39C16 42 17 45 17 48L17 69C17 74 15 85 18 '+ '89C21 92 28 91 32 91L67 91C71 91 77 92 80 89C82 86 81 81 81 78C81 '+ '70 81 61 80 53z" style="fill: #fff"></path></svg>'+ '記事の編集・削除を表示'+ '<style>'+ '#el_button { position: absolute; top: 100px; left: calc(50% + 200px); '+ 'font: bold 16px Meiryo; white-space: nowrap; padding: 7px 20px 5px; '+ 'border-radius: 6px; color: #1976D2; background: #fff; '+ 'box-shadow: 5px 10px 30px #00000025; } '+ '#el_button:hover { background: #cfd8dc; } '+ '#el_button svg { width: 48px; height: 36px; vertical-align: -12px; } }'+ '</style></div>'; if(!document.querySelector('#el_button')){ document.body.insertAdjacentHTML('beforeend', el_button); } let files_link=document.querySelector('#el_button'); if(files_link){ files_link.onclick=function(){ location.href="https://blog.ameba.jp/ucs/entry/srventrylist.do"; }}}
「Quick EntryList」最新版について
旧いバージョンの「Quick EntryList」は、アメーバのページ構成の変更で動作しない場合があり、導入する場合は最新バージョンをお勧めします。 最新バージョンへのリンクは、以下のページのリンクリストから探せます。