非公開 定型文・コア

    @@ -1,72 +1,65 @@ /* - * @title 陣取り司令官・極(左パネル・位置リセット版) + * @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("パネル未検出"); + 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; - } + /* 基本の箱(mini版準拠) */ + .j-box { position:fixed; background:rgba(10,20,40,0.9); border:2px solid #3b82f6; border-radius:5px; padding:5px; z-index:99999; pointer-events:auto; color:#fff; font-size:11px; } - /* 本家のインラインスタイルを力づくで無効化する設定 */ - #tc-panel-team, #tc-panel-log { - display:block !important; position:static !important; - width:100% !important; height:auto !important; - inset: auto !important; transform: none !important; - } + /* 右端の独立ボタン */ + .j-btn-side { position:fixed; right:10px; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; gap:10px; z-index:100000; pointer-events:auto; } + .j-btn-round { width:70px; height:70px; background:#2563eb; color:#fff; border:2px solid #93c5fd; border-radius:50%; cursor:pointer; font-size:16px; font-weight:bold; box-shadow:0 4px 10px #000; } - #tc-panel-chat { display:block !important; width:280px; } - #team-chat-messages { height:220px !important; } + /* 本家パーツのサイズ強制(mini版準拠) */ + #tc-panel-chat { display:block !important; visibility:visible !important; width:250px; } + #tc-panel-team, #tc-panel-log { display:block !important; visibility:visible !important; width:200px; } + #team-chat-messages { height:200px !important; } + #tc-team-stats, #tc-panel-log { height:150px !important; } `; document.head.appendChild(style); const root = document.createElement('div'); - root.id = 'j-all'; root.className = 'j-all-root'; + 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'; + // --- 1. 右端:独立ボタン --- + 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]; + const b = document.createElement('button'); b.className='j-btn-round'; 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); - // --- 左側:状況と戦歴(強制リセット版) --- + // --- 2. 右側:会話パネル(mini版の構造) --- + const r = document.createElement('div'); r.className = 'j-box'; + r.style.right = '100px'; r.style.bottom = '10px'; + r.appendChild(chat); + root.appendChild(r); + + // --- 3. 左側:状況 + 戦歴(mini版の構造そのまま) --- const l = document.createElement('div'); - l.style.cssText = 'position:absolute; left:20px; bottom:20px; display:flex; gap:10px; pointer-events:auto;'; + l.style.cssText = 'position:absolute; left:10px; bottom:10px; display:flex; gap:5px; 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)); + const p1 = document.createElement('div'); p1.className='j-box'; p1.style.position='relative'; p1.appendChild(team); + const p2 = document.createElement('div'); p2.className='j-box'; p2.style.position='relative'; p2.appendChild(log); + + l.appendChild(p1); l.appendChild(p2); root.appendChild(l); - const orig = $id('team-chat'); if(orig) orig.style.display='none'; + // 本家の元を隠す + const orig = $id('team-chat'); if(orig) orig.style.visibility='hidden'; + + // 更新 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 = `
            /* 基本の箱(mini版準拠) */
            .j-box { position:fixed; background:rgba(10,20,40,0.9); border:2px solid #3b82f6; border-radius:5px; padding:5px; z-index:99999; pointer-events:auto; color:#fff; font-size:11px; }
            
            /* 右端の独立ボタン */
            .j-btn-side { position:fixed; right:10px; top:50%; transform:translateY(-50%); display:flex; flex-direction:column; gap:10px; z-index:100000; pointer-events:auto; }
            .j-btn-round { width:70px; height:70px; background:#2563eb; color:#fff; border:2px solid #93c5fd; border-radius:50%; cursor:pointer; font-size:16px; font-weight:bold; box-shadow:0 4px 10px #000; }
            
            /* 本家パーツのサイズ強制(mini版準拠) */
            #tc-panel-chat { display:block !important; visibility:visible !important; width:250px; }
            #tc-panel-team, #tc-panel-log { display:block !important; visibility:visible !important; width:200px; }
            #team-chat-messages { height:200px !important; }
            #tc-team-stats, #tc-panel-log { height:150px !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);
    
        // --- 1. 右端:独立ボタン ---
        const sBtnArea = document.createElement('div');
        sBtnArea.className = 'j-btn-side';
        [['⚔️攻','攻め!'],['🛡️守','守り!'],['🆘援','援護!'],['✨感','感謝!']].forEach(p=>{
            const b = document.createElement('button'); b.className='j-btn-round'; 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);
    
        // --- 2. 右側:会話パネル(mini版の構造) ---
        const r = document.createElement('div'); r.className = 'j-box';
        r.style.right = '100px'; r.style.bottom = '10px';
        r.appendChild(chat); 
        root.appendChild(r);
    
        // --- 3. 左側:状況 + 戦歴(mini版の構造そのまま) ---
        const l = document.createElement('div');
        l.style.cssText = 'position:absolute; left:10px; bottom:10px; display:flex; gap:5px; pointer-events:auto;';
        
        const p1 = document.createElement('div'); p1.className='j-box'; p1.style.position='relative'; p1.appendChild(team);
        const p2 = document.createElement('div'); p2.className='j-box'; p2.style.position='relative'; 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 です。