非公開 定型文・コア

    @@ -1,9 +1,5 @@ /* - * @title 陣取り司令官・極(左パネル修正) - * @description 左側パネルのめり込みを解消し、画面内に収める - * @include http://* - * @license MIT License - * @require + * @title 陣取り司令官・極(左パネル・位置リセット版) * @private */ (function(){ @@ -14,67 +10,63 @@ 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); } + .j-all-root { position:fixed; top:0; left:0; width:100vw; height:100vh; pointer-events:none; z-index:999999; } + .j-box { position:absolute !important; background:rgba(15, 23, 42, 0.95); border:2px solid #3b82f6; border-radius:8px; padding:8px; pointer-events:auto; color:#fff; box-shadow:0 0 15px #000; } + .j-btn-side { position:fixed; right:10px; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; gap:15px; } + .j-btn { width:70px; height:70px; background:#2563eb; color:#fff; border:2px solid #93c5fd; border-radius:50%; cursor:pointer; font-size:16px; font-weight:bold; } - /* 左パネルの強制サイズ固定 */ - .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; + /* 中身を強制的に枠に合わせる */ + .l-panel-wrap { + width: 220px !important; + height: 200px !important; + overflow: auto !important; + position: relative !important; } - /* 本家パーツの内部スタイルを上書き */ - #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-team, #tc-panel-log { + display:block !important; position:static !important; + width:100% !important; height:auto !important; + inset: auto !important; transform: none !important; + } - #tc-panel-chat { display:block !important; visibility:visible !important; width:260px; } - #team-chat-messages { height:200px !important; } + #tc-panel-chat { display:block !important; width:280px; } + #team-chat-messages { height:220px !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;'; + root.id = 'j-all'; root.className = 'j-all-root'; document.body.appendChild(root); - // --- 右端:独立ボタン --- - const sBtnArea = document.createElement('div'); - sBtnArea.className = 'j-btn-side'; - [['⚔️攻', '攻めましょう!'], ['🛡️守', '守備!'], ['🆘援', '援護!'], ['✨感', '感謝!']].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();} }; sBtnArea.appendChild(b); }); root.appendChild(sBtnArea); - - // --- 右側:会話タブ --- - const r = document.createElement('div'); r.className = 'j-box'; - r.style.right = '100px'; r.style.bottom = '20px'; + 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.style.cssText = 'position:absolute; left:20px; bottom:20px; display:flex; gap:10px; pointer-events:auto;'; - l.appendChild(p1); l.appendChild(p2); root.appendChild(l); + const makeP = (title, content) => { + const p = document.createElement('div'); p.className='j-box'; p.style.position='relative'; + p.innerHTML=`<div style="font-size:12px;color:#93c5fd;font-weight:bold;margin-bottom:5px;">${title}</div>`; + const wrap = document.createElement('div'); wrap.className='l-panel-wrap'; + wrap.appendChild(content); + p.appendChild(wrap); + return p; + }; + + l.appendChild(makeP('👥 自軍状況', team)); + l.appendChild(makeP('⚔️ 戦歴', log)); + root.appendChild(l); - const orig = $id('team-chat'); if(orig) orig.style.visibility='hidden'; + const orig = $id('team-chat'); if(orig) orig.style.display='none'; setInterval(()=>{ if(typeof refreshTeamStats==='function') refreshTeamStats(); if(typeof renderBattleLog==='function') renderBattleLog(); }, 2000); })();
  • /*
     * @title 陣取り司令官・極(左パネル・位置リセット版)
     * @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-all-root { position:fixed; top:0; left:0; width:100vw; height:100vh; pointer-events:none; z-index:999999; }
            .j-box { position:absolute !important; background:rgba(15, 23, 42, 0.95); border:2px solid #3b82f6; border-radius:8px; padding:8px; pointer-events:auto; color:#fff; box-shadow:0 0 15px #000; }
            .j-btn-side { position:fixed; right:10px; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; gap:15px; }
            .j-btn { width:70px; height:70px; background:#2563eb; color:#fff; border:2px solid #93c5fd; border-radius:50%; cursor:pointer; font-size:16px; font-weight:bold; }
            
            /* 中身を強制的に枠に合わせる */
            .l-panel-wrap { 
                width: 220px !important; 
                height: 200px !important; 
                overflow: auto !important;
                position: relative !important;
            }
            
            /* 本家のインラインスタイルを力づくで無効化する設定 */
            #tc-panel-team, #tc-panel-log { 
                display:block !important; position:static !important; 
                width:100% !important; height:auto !important; 
                inset: auto !important; transform: none !important; 
            }
            
            #tc-panel-chat { display:block !important; width:280px; }
            #team-chat-messages { height:220px !important; }
        `;
        document.head.appendChild(style);
    
        const root = document.createElement('div');
        root.id = 'j-all'; root.className = 'j-all-root';
        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:20px; display:flex; gap:10px; pointer-events:auto;';
        
        const makeP = (title, content) => {
            const p = document.createElement('div'); p.className='j-box'; p.style.position='relative';
            p.innerHTML=`<div style="font-size:12px;color:#93c5fd;font-weight:bold;margin-bottom:5px;">${title}</div>`;
            const wrap = document.createElement('div'); wrap.className='l-panel-wrap';
            wrap.appendChild(content);
            p.appendChild(wrap);
            return p;
        };
    
        l.appendChild(makeP('👥 自軍状況', team));
        l.appendChild(makeP('⚔️ 戦歴', log));
        root.appendChild(l);
    
        const orig = $id('team-chat'); if(orig) orig.style.display='none';
        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 です。