定型文・コア
by
cutfloss
05/01 [2026/05/01 13:11:50]
6連ボタン対応の完璧版
@@ -1,6 +1,6 @@
/*
- * @title 陣取り司令官・改
- * @description 定型文ボタン独立&パネル寄り配置
+ * @title 陣取り司令官・極
+ * @description 画面端に特大ボタン+左右パネル最適化
* @include http://*
* @license MIT License
* @require
@@ -14,13 +14,13 @@
const style = document.createElement('style');
style.innerHTML = `
- .j-box { position:fixed; background:rgba(10,20,40,0.95); border:2px solid #3b82f6; border-radius:8px; padding:8px; z-index:99999; pointer-events:auto; color:#fff; }
- .j-btn-area { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
- .j-btn { background:#2563eb; color:#fff; border:1px solid #60a5fa; border-radius:5px; padding:10px 5px; cursor:pointer; font-size:14px; font-weight:bold; }
- .j-btn:hover { background:#1d4ed8; transform:scale(1.02); }
- #tc-panel-chat { display:block !important; visibility:visible !important; width:280px; } /* 会話タブを少し大きく */
- #tc-panel-team, #tc-panel-log { display:block !important; visibility:visible !important; width:200px; height:150px; overflow-y:auto; }
- #team-chat-messages { height:250px !important; } /* チャット履歴を長く */
+ .j-box { position:fixed; background:rgba(10,20,40,0.9); border:2px solid #3b82f6; border-radius:8px; padding:6px; z-index:99999; pointer-events:auto; color:#fff; }
+ .j-btn-side { position:fixed; right:10px; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; gap:15px; z-index:100000; pointer-events:auto; }
+ .j-btn { width:80px; height:80px; background:#2563eb; color:#fff; border:2px solid #93c5fd; border-radius:50%; cursor:pointer; font-size:16px; font-weight:bold; box-shadow:0 4px 10px rgba(0,0,0,0.5); transition:0.2s; }
+ .j-btn:hover { background:#1d4ed8; transform:scale(1.1); }
+ #tc-panel-chat { display:block !important; visibility:visible !important; width:250px; }
+ #tc-panel-team, #tc-panel-log { display:block !important; visibility:visible !important; width:180px; height:120px; overflow-y:auto; font-size:11px; }
+ #team-chat-messages { height:200px !important; }
`;
document.head.appendChild(style);
@@ -29,27 +29,25 @@
root.style.cssText = 'position:fixed; top:0; left:0; width:100vw; height:100vh; pointer-events:none; z-index:99999;';
document.body.appendChild(root);
- // --- 右側:ボタン(上) + 会話(下) ---
- const r = document.createElement('div'); r.className = 'j-box';
- r.style.right = '60px'; // プレー画面に寄せる(値を小さくすると右端へ、大きくすると中央へ)
- r.style.bottom = '10px';
-
- // ボタンを上に配置
- const bArea = document.createElement('div');
- bArea.className = 'j-btn-area';
- [['⚔️ 攻め', '攻めましょう!'], ['🛡️ 守り', '守備お願いします!'], ['🆘 援護', '援護が必要です!'], ['✨ 感謝', 'ありがとうございます!']].forEach(p=>{
+ // --- 右端:独立した特大ボタン ---
+ const sBtnArea = document.createElement('div');
+ sBtnArea.className = 'j-btn-side';
+ [['⚔️攻', '攻めましょう!'], ['🛡️守', '守備!'], ['🆘援', '援護!'], ['✨感', '感謝!']].forEach(p=>{
const b = document.createElement('button'); b.className='j-btn'; b.innerText=p[0];
b.onclick=()=>{ const i=$id('team-chat-input'); if(i){i.value=p[1]; sendTeamChat();} };
- bArea.appendChild(b);
+ sBtnArea.appendChild(b);
});
- r.appendChild(bArea);
- r.appendChild(chat); // その下に会話タブ
- root.appendChild(r);
+ root.appendChild(sBtnArea);
+
+ // --- 右側:会話タブ(ボタンの少し左に配置) ---
+ const r = document.createElement('div'); r.className = 'j-box';
+ r.style.right = '100px'; r.style.bottom = '20px';
+ r.appendChild(chat); root.appendChild(r);
- // --- 左側:状況 + 戦歴 ---
+ // --- 左側:状況 + 戦歴(めり込み防止で少し上に配置) ---
const l = document.createElement('div');
- l.style.cssText = 'position:absolute; left:60px; bottom:10px; display:flex; gap:10px; pointer-events:auto;';
- const p1 = document.createElement('div'); p1.className='j-box'; p1.innerHTML='<div style="font-size:10px;color:#93c5fd">自軍状況</div>'; p1.appendChild(team);
+ l.style.cssText = 'position:absolute; left:20px; bottom:30px; display:flex; gap:10px; pointer-events:auto;';
+ const p1 = document.createElement('div'); p1.className='j-box'; p1.innerHTML='<div style="font-size:10px;color:#93c5fd">自軍</div>'; p1.appendChild(team);
const p2 = document.createElement('div'); p2.className='j-box'; p2.innerHTML='<div style="font-size:10px;color:#93c5fd">戦歴</div>'; p2.appendChild(log);
l.appendChild(p1); l.appendChild(p2); root.appendChild(l);
/*
* @title 陣取り司令官・極
* @description 画面端に特大ボタン+左右パネル最適化
* @include http://*
* @license MIT License
* @require
* @private
*/
(function(){
const $id = (id)=>document.getElementById(id);
const old = $id('j-all'); if(old) old.remove();
const chat = $id('tc-panel-chat'), team = $id('tc-panel-team'), log = $id('tc-panel-log');
if(!chat) return console.log("パネル未検出");
const style = document.createElement('style');
style.innerHTML = `
.j-box { position:fixed; background:rgba(10,20,40,0.9); border:2px solid #3b82f6; border-radius:8px; padding:6px; z-index:99999; pointer-events:auto; color:#fff; }
.j-btn-side { position:fixed; right:10px; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; gap:15px; z-index:100000; pointer-events:auto; }
.j-btn { width:80px; height:80px; background:#2563eb; color:#fff; border:2px solid #93c5fd; border-radius:50%; cursor:pointer; font-size:16px; font-weight:bold; box-shadow:0 4px 10px rgba(0,0,0,0.5); transition:0.2s; }
.j-btn:hover { background:#1d4ed8; transform:scale(1.1); }
#tc-panel-chat { display:block !important; visibility:visible !important; width:250px; }
#tc-panel-team, #tc-panel-log { display:block !important; visibility:visible !important; width:180px; height:120px; overflow-y:auto; font-size:11px; }
#team-chat-messages { height:200px !important; }
`;
document.head.appendChild(style);
const root = document.createElement('div');
root.id = 'j-all';
root.style.cssText = 'position:fixed; top:0; left:0; width:100vw; height:100vh; pointer-events:none; z-index:99999;';
document.body.appendChild(root);
// --- 右端:独立した特大ボタン ---
const sBtnArea = document.createElement('div');
sBtnArea.className = 'j-btn-side';
[['⚔️攻', '攻めましょう!'], ['🛡️守', '守備!'], ['🆘援', '援護!'], ['✨感', '感謝!']].forEach(p=>{
const b = document.createElement('button'); b.className='j-btn'; b.innerText=p[0];
b.onclick=()=>{ const i=$id('team-chat-input'); if(i){i.value=p[1]; sendTeamChat();} };
sBtnArea.appendChild(b);
});
root.appendChild(sBtnArea);
// --- 右側:会話タブ(ボタンの少し左に配置) ---
const r = document.createElement('div'); r.className = 'j-box';
r.style.right = '100px'; r.style.bottom = '20px';
r.appendChild(chat); root.appendChild(r);
// --- 左側:状況 + 戦歴(めり込み防止で少し上に配置) ---
const l = document.createElement('div');
l.style.cssText = 'position:absolute; left:20px; bottom:30px; display:flex; gap:10px; pointer-events:auto;';
const p1 = document.createElement('div'); p1.className='j-box'; p1.innerHTML='<div style="font-size:10px;color:#93c5fd">自軍</div>'; p1.appendChild(team);
const p2 = document.createElement('div'); p2.className='j-box'; p2.innerHTML='<div style="font-size:10px;color:#93c5fd">戦歴</div>'; p2.appendChild(log);
l.appendChild(p1); l.appendChild(p2); root.appendChild(l);
const orig = $id('team-chat'); if(orig) orig.style.visibility='hidden';
setInterval(()=>{ if(typeof refreshTeamStats==='function') refreshTeamStats(); if(typeof renderBattleLog==='function') renderBattleLog(); }, 2000);
})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。