(function() { // 1. 환경 데이터 가져오기 (없으면 기본값 production) const info = window.SERVER_INFO || { alias: 'UNKNOWN', env: 'production' }; // 2. 운영 환경이면 실행 중단 (표시 안 함) if (info.env === 'production') { return; } // 3. 테스트/로컬 환경일 때 스타일 설정 (강렬한 빨간색) const bgColor = '#dc3545'; // 경고 의미의 빨간색 const textColor = '#ffffff'; const borderColor = '#a71d2a'; // 더 어두운 빨간색 테두리 // 4. 상태바 생성 및 스타일 적용 const statusDiv = document.createElement('div'); Object.assign(statusDiv.style, { position: 'fixed', bottom: '0', left: '0', width: '100%', height: '32px', backgroundColor: bgColor, color: textColor, textAlign: 'center', fontSize: '14px', lineHeight: '32px', fontWeight: '900', zIndex: '2147483647', // 최상단 레이어 보장 opacity: '1', pointerEvents: 'none', // 클릭 방해 금지 boxShadow: '0 -4px 15px rgba(0,0,0,0.4)', borderTop: `3px solid ${borderColor}`, letterSpacing: '0.5px', fontFamily: 'system-ui, -apple-system, sans-serif' }); // 5. 출력 문구 (서버 이름 강조) statusDiv.innerHTML = `⚠️ [TEST SERVER] NAME: ${info.alias} | HOST: ${window.location.hostname} ⚠️`; // 6. 문서에 추가 document.body.appendChild(statusDiv); })();