토너먼트 기본 동작과 베팅 선택을 split 메뉴로 묶고 빈 국가 메뉴 칸에 화면 설정을 배치한다. 내 정보 화면에는 게임 상태 설정만 남기며 화면 폭, 모바일 패널 순서, 개인 CSS는 기기별 전용 화면에서 관리한다.
20 lines
658 B
TypeScript
20 lines
658 B
TypeScript
export const CUSTOM_CSS_KEY = 'sam_customCSS';
|
|
export const CUSTOM_CSS_STYLE_ID = 'sammo-custom-css';
|
|
|
|
export const applyCustomCss = (text: string): void => {
|
|
if (typeof document === 'undefined') return;
|
|
|
|
let style = document.getElementById(CUSTOM_CSS_STYLE_ID) as HTMLStyleElement | null;
|
|
if (!style) {
|
|
style = document.createElement('style');
|
|
style.id = CUSTOM_CSS_STYLE_ID;
|
|
document.head.appendChild(style);
|
|
}
|
|
style.textContent = text;
|
|
};
|
|
|
|
export const applyStoredCustomCss = (): void => {
|
|
if (typeof window === 'undefined') return;
|
|
applyCustomCss(window.localStorage.getItem(CUSTOM_CSS_KEY) ?? '');
|
|
};
|