定型文・コア
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,12 +14,25 @@
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-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; box-sizing:border-box; }
.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; }
+ .j-btn { width:75px; height:75px; 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); }
+
+ /* 左パネルの強制サイズ固定 */
+ .l-panel-content {
+ width: 200px !important;
+ height: 180px !important; /* ここで高さをしっかり指定 */
+ overflow-y: auto !important;
+ overflow-x: hidden !important;
+ background: rgba(0,0,0,0.3);
+ border-radius: 4px;
+ }
+
+ /* 本家パーツの内部スタイルを上書き */
+ #tc-panel-team, #tc-panel-log { display:block !important; visibility:visible !important; width:100% !important; height:100% !important; }
+ #tc-team-stats table { width:100% !important; }
+
+ #tc-panel-chat { display:block !important; visibility:visible !important; width:260px; }
#team-chat-messages { height:200px !important; }
`;
document.head.appendChild(style);
@@ -29,7 +42,7 @@
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=>{
@@ -39,16 +52,27 @@
});
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.style.cssText = 'position:absolute; left:20px; bottom:40px; display:flex; gap:10px; pointer-events:auto;';
+
+ // 自軍パネル
+ const p1 = document.createElement('div'); p1.className='j-box';
+ p1.innerHTML='<div style="font-size:11px;color:#93c5fd;margin-bottom:5px;font-weight:bold;">👥 自軍状況</div>';
+ const c1 = document.createElement('div'); c1.className='l-panel-content'; c1.appendChild(team);
+ p1.appendChild(c1);
+
+ // 戦歴パネル
+ const p2 = document.createElement('div'); p2.className='j-box';
+ p2.innerHTML='<div style="font-size:11px;color:#93c5fd;margin-bottom:5px;font-weight:bold;">⚔️ 戦歴</div>';
+ const c2 = document.createElement('div'); c2.className='l-panel-content'; c2.appendChild(log);
+ p2.appendChild(c2);
+
l.appendChild(p1); l.appendChild(p2); root.appendChild(l);
const orig = $id('team-chat'); if(orig) orig.style.visibility='hidden';
/*
* @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.95); border:2px solid #3b82f6; border-radius:8px; padding:8px; z-index:99999; pointer-events:auto; color:#fff; box-sizing:border-box; }
.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:75px; height:75px; 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); }
/* 左パネルの強制サイズ固定 */
.l-panel-content {
width: 200px !important;
height: 180px !important; /* ここで高さをしっかり指定 */
overflow-y: auto !important;
overflow-x: hidden !important;
background: rgba(0,0,0,0.3);
border-radius: 4px;
}
/* 本家パーツの内部スタイルを上書き */
#tc-panel-team, #tc-panel-log { display:block !important; visibility:visible !important; width:100% !important; height:100% !important; }
#tc-team-stats table { width:100% !important; }
#tc-panel-chat { display:block !important; visibility:visible !important; width:260px; }
#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:40px; display:flex; gap:10px; pointer-events:auto;';
// 自軍パネル
const p1 = document.createElement('div'); p1.className='j-box';
p1.innerHTML='<div style="font-size:11px;color:#93c5fd;margin-bottom:5px;font-weight:bold;">👥 自軍状況</div>';
const c1 = document.createElement('div'); c1.className='l-panel-content'; c1.appendChild(team);
p1.appendChild(c1);
// 戦歴パネル
const p2 = document.createElement('div'); p2.className='j-box';
p2.innerHTML='<div style="font-size:11px;color:#93c5fd;margin-bottom:5px;font-weight:bold;">⚔️ 戦歴</div>';
const c2 = document.createElement('div'); c2.className='l-panel-content'; c2.appendChild(log);
p2.appendChild(c2);
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 です。