定型文・コア
by
cutfloss
05/01 [2026/05/01 13:11:50]
6連ボタン対応の完璧版
@@ -3,6 +3,7 @@
* @description 隠れたパネルを最前面に引きずり出す
* @include http://*
* @license MIT License
+* @private
*/
(function() {
/*
* @title 陣取りマルチパネル拡張(最強レイヤー版)
* @description 隠れたパネルを最前面に引きずり出す
* @include http://*
* @license MIT License
* @private
*/
(function() {
console.log("マルチパネル拡張:物理配置を開始します...");
// 1. 二重起動防止
const old = document.getElementById('jintori-multi-panel');
if (old) old.remove();
// 2. 本家のパネル要素を「救出」する
const chatPanel = document.getElementById('tc-panel-chat');
const teamPanel = document.getElementById('tc-panel-team');
const logPanel = document.getElementById('tc-panel-log');
if (!chatPanel) {
console.error("エラー:本家のチャットパネルが見つかりません。チーム戦中ですか?");
return;
}
// 3. スタイルを「最強」に設定
const styleId = 'jintori-ext-style';
if (!document.getElementById(styleId)) {
const style = document.createElement('style');
style.id = styleId;
style.innerHTML = `
.ext-container-fixed {
position: fixed !important;
top: 0 !important;
left: 0 !important;
width: 100vw !important;
height: 100vh !important;
pointer-events: none !important; /* 背景のゲーム操作を邪魔しない */
z-index: 999999 !important; /* 何よりも上に */
}
.ext-panel {
position: absolute !important;
background: rgba(15, 23, 42, 0.95) !important;
border: 2px solid #3b82f6 !important;
border-radius: 8px !important;
padding: 10px !important;
pointer-events: auto !important; /* パネル内はクリック可能 */
box-shadow: 0 0 20px rgba(0,0,0,0.8) !important;
color: white !important;
}
.ext-title {
font-size: 12px; color: #93c5fd; font-weight: bold;
border-bottom: 1px solid #334155; margin-bottom: 8px;
}
/* 本家のパーツを強制表示 */
#tc-panel-chat, #tc-panel-team, #tc-panel-log {
display: block !important;
visibility: visible !important;
opacity: 1 !important;
}
#team-chat-messages { height: 300px !important; overflow-y: auto !important; }
#tc-team-stats, #tc-panel-log { height: 200px !important; overflow-y: auto !important; }
`;
document.head.appendChild(style);
}
// 4. 画面全体を覆う透明なレイヤーをbody直下に作る
const container = document.createElement('div');
container.id = 'jintori-multi-panel';
container.className = 'ext-container-fixed';
document.body.appendChild(container);
// 5. 各パネルを配置
function setupPanel(title, side, bottom, width, content) {
const p = document.createElement('div');
p.className = 'ext-panel';
p.style[side] = '20px';
p.style.bottom = bottom + 'px';
p.style.width = width + 'px';
p.innerHTML = `<div class="ext-title">${title}</div>`;
if (content) p.appendChild(content);
container.appendChild(p);
}
// パネルを展開
setupPanel('💬 チーム会話(右端)', 'right', 20, 260, chatPanel);
setupPanel('⚔️ 戦歴(左端下)', 'left', 20, 240, logPanel);
setupPanel('👥 自軍状況(左端上)', 'left', 280, 240, teamPanel);
// 6. オリジナルの親枠を完全に消す
const original = document.getElementById('team-chat');
if (original) original.style.display = 'none';
// 7. 更新タイマー
const timerId = setInterval(() => {
if (!document.getElementById('jintori-multi-panel')) {
clearInterval(timerId);
return;
}
if (typeof refreshTeamStats === 'function') refreshTeamStats();
if (typeof renderBattleLog === 'function') renderBattleLog();
}, 2000);
console.log("マルチパネル拡張:最前面に再配置しました!");
})();
- Permalink
- このページへの個別リンクです。
- RAW
- 書かれたコードへの直接のリンクです。
- Packed
- 文字列が圧縮された書かれたコードへのリンクです。
- Userscript
- Greasemonkey 等で利用する場合の .user.js へのリンクです。
- Loader
- @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
- Metadata
- コード中にコメントで @xxx と書かれたメタデータの JSON です。