// ==UserScript== // @name SOOP 다시보기 라이브 당시 시간 표시 // @namespace http://tampermonkey.net/ // @version 5.2.0 // @description SOOP 다시보기에서 생방송 당시 시간을 표시/이동 (최근 기록, 셀렉터 폴백, 접근성, 최적화 + 클립보드 미리보기) // @author WakViewer // @match https://vod.sooplive.co.kr/player/* // @icon https://www.google.com/s2/favicons?sz=64&domain=www.sooplive.co.kr // @grant unsafeWindow // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_setValue // @grant GM_getValue // @grant GM_registerMenuCommand // @grant GM_unregisterMenuCommand // @run-at document-end // @license MIT // @downloadURL https://update.greasyfork.icu/scripts/521331/SOOP%20%EB%8B%A4%EC%8B%9C%EB%B3%B4%EA%B8%B0%20%EB%9D%BC%EC%9D%B4%EB%B8%8C%20%EB%8B%B9%EC%8B%9C%20%EC%8B%9C%EA%B0%84%20%ED%91%9C%EC%8B%9C.user.js // @updateURL https://update.greasyfork.icu/scripts/521331/SOOP%20%EB%8B%A4%EC%8B%9C%EB%B3%B4%EA%B8%B0%20%EB%9D%BC%EC%9D%B4%EB%B8%8C%20%EB%8B%B9%EC%8B%9C%20%EC%8B%9C%EA%B0%84%20%ED%91%9C%EC%8B%9C.meta.js // ==/UserScript== (function () { 'use strict'; // ---------------- Config & Selectors ---------------- const SELECTORS = { startTimeTip: "span.broad_time[tip*='방송시간']", infoUL: ".broadcast_information .cnt_info ul", }; const CURRENT_TIME_CANDIDATES = [ "span.time-current", ".time-current", ".player .time-current", ".time_display .time-current", '[aria-label="Current time"]', '[data-role="current-time"]' ]; const DURATION_CANDIDATES = [ "span.time-duration", ".time-duration", ".player .time-duration", ".time_display .time-duration", '[aria-label="Duration"]', '[data-role="duration"]' ]; const EDIT_THRESHOLD_SEC = 180; const UPDATE_INTERVAL_MS = 500; const HISTORY_KEY = 'wv_soop_dt_history'; const HISTORY_MAX = 5; // ⏱ 사이트 기준 타임존(방송시간 tip 파싱용) const SITE_TZ = 'Asia/Seoul'; // 🔒 Live 라벨 고정폭(px) const LIVE_LABEL_WIDTH_PX = 240; // 📋 클립보드 읽기 캐시(ms) const CLIPBOARD_CACHE_MS = 1200; // ---------------- State ---------------- let startTime = null, endTime = null; let currentLiveTimeStr = ''; let updateTimer = null, routeObserver = null, initDoneForHref = null; let timeObserver = null; let lastActiveEl = null; // ARIA announcer(복사 때만 말하기) let liveAnnouncerEl = null; function ensureAnnouncer(){ if (liveAnnouncerEl) return liveAnnouncerEl; liveAnnouncerEl = document.createElement('div'); liveAnnouncerEl.setAttribute('aria-live','polite'); liveAnnouncerEl.setAttribute('role','status'); // 시각적으로 숨김 Object.assign(liveAnnouncerEl.style, { position:'absolute', width:'1px', height:'1px', margin:'-1px', border:'0', padding:'0', clip:'rect(0 0 0 0)', overflow:'hidden' }); document.body.appendChild(liveAnnouncerEl); return liveAnnouncerEl; } function announce(msg){ const el = ensureAnnouncer(); // 동일 문구도 다시 읽히도록 리셋 el.textContent = ''; setTimeout(()=> { el.textContent = String(msg ?? ''); }, 10); } // 클립보드 캐시 let _clipCacheVal = ''; let _clipCacheErr = false; let _clipCachedAt = 0; // ---------------- Tiny utils ---------------- const $ = (sel, root=document) => root.querySelector(sel); const p2 = (n)=> String(n).padStart(2,'0'); const fmtDate = (d) => `${d.getFullYear()}-${p2(d.getMonth()+1)}-${p2(d.getDate())}, ${p2(d.getHours())}:${p2(d.getMinutes())}:${p2(d.getSeconds())}`; const userTZ = Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC'; const esc = (s='') => String(s).replace(/&/g,'&').replace(//g,'>'); const waitFor = (selector, {timeout=10000, root=document}={}) => new Promise((resolve, reject) => { const found = $(selector, root); if (found) return resolve(found); const obs = new MutationObserver(() => { const el2 = $(selector, root); if (el2) { obs.disconnect(); resolve(el2); } }); obs.observe(root.body || root, { childList:true, subtree:true }); if (timeout > 0) setTimeout(() => { obs.disconnect(); reject(new Error('waitFor timeout: '+selector)); }, timeout); }); const pickFirst = (qList, root=document) => { for (const q of qList) { const el = root.querySelector(q); if (el) return el; } return null; }; function getCurrentTimeEl() { // 컨테이너 우선 const wrap = getTimeWrap(); if (wrap) { const scoped = pickFirst(CURRENT_TIME_CANDIDATES, wrap); if (scoped) return scoped; } // 폴백 let el = pickFirst(CURRENT_TIME_CANDIDATES); if (el) return el; const nodes = Array.from(document.querySelectorAll('span,div,time')) .filter(n => /:\d{2}/.test((n.textContent||'').trim())) .filter(n => (n.textContent||'').trim().length <= 8); return nodes[0] || null; } // ---- duration: 컨테이너 한정 → 폴백 (보강) function getTimeWrap(){ return document.querySelector( '#player .player_ctrlBox .ctrlBox .ctrl .time_display,' + '#player .time_display,' + '.player .time_display,' + '.time_display' ); } function isTimeLikeText(t){ return /^\d{1,2}:\d{2}(?::\d{2})?$/.test((t||'').trim()); } function getDurationElScoped(){ const wrap = getTimeWrap(); if (!wrap) return null; const nodes = Array.from(wrap.querySelectorAll('span,div,time')).filter(el => isTimeLikeText(el.textContent)); // 명시 셀렉터 우선 const explicit = nodes.find(n => n.matches('.time-duration,[aria-label="Duration"],[data-role="duration"]')); if (explicit) return explicit; // 현재시간 제외 후 마지막(보통 "현재 / 전체") const nonCurrent = nodes.filter(n => !n.matches('.time-current,[aria-label="Current time"],[data-role="current-time"]')); if (nonCurrent.length === 1) return nonCurrent[0]; if (nonCurrent.length > 1) return nonCurrent[nonCurrent.length - 1]; return null; } function getDurationElRobust(){ const scoped = getDurationElScoped(); if (scoped) return scoped; // 기본 후보 const basic = pickFirst(DURATION_CANDIDATES); if (basic) return basic; // 최후 폴백: 전역 휴리스틱 const all = Array.from(document.querySelectorAll('span,div,time')).filter(el => isTimeLikeText(el.textContent)); const currentEl = getCurrentTimeEl(); const curTxt = (currentEl?.textContent||'').trim(); const scored = all .filter(el => el !== currentEl && (el.textContent||'').trim() !== curTxt) .map(el => { const t = (el.textContent||'').trim(); let s = 0; if (/^\d{1,2}:\d{2}:\d{2}$/.test(t)) s += 3; const meta = ((el.className||'') + ' ' + (el.getAttribute('aria-label')||'') + ' ' + (el.getAttribute('data-role')||'')).toLowerCase(); if (/duration|total|length/.test(meta)) s += 5; return { el, s }; }) .sort((a,b)=> b.s - a.s); return scored[0]?.el || null; } // ---------------- Parse helpers ---------------- // ▶ tip의 'YYYY-MM-DD HH:mm:ss'를 사이트 기준 타임존(SITE_TZ)으로 해석해 UTC ms로 보정 const parseTipTimes = (tip) => { const m = tip && tip.match( /방송시간\s*:\s*(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})\s*~\s*(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})/ ); if (!m) return null; const sComp = { y:+m[1], M:+m[2], d:+m[3], h:+m[4], m:+m[5], s:+m[6] }; const eComp = { y:+m[7], M:+m[8], d:+m[9], h:+m[10], m:+m[11], s:+m[12] }; const sMs = zonedComponentsToUTCms(sComp, SITE_TZ); const eMs = zonedComponentsToUTCms(eComp, SITE_TZ); return { start: new Date(sMs), end: new Date(eMs) }; }; const parseHMSFlexible = (text) => { if (!text) return 0; const parts = text.trim().split(':').map(Number); if (parts.some(isNaN)) return 0; if (parts.length === 3) return parts[0]*3600 + parts[1]*60 + parts[2]; if (parts.length === 2) return parts[0]*60 + parts[1]; return 0; }; // --------- Timezone transforms ---------- function zonedComponentsToUTCms(comp, timeZone) { const utcGuess = Date.UTC(comp.y, comp.M-1, comp.d, comp.h, comp.m, comp.s); const fmt = new Intl.DateTimeFormat('en-US', { timeZone, year:'numeric', month:'2-digit', day:'2-digit', hour:'2-digit', minute:'2-digit', second:'2-digit', hour12:false }); const parts = fmt.formatToParts(new Date(utcGuess)); const get = t => Number(parts.find(p => p.type === t).value); const tzY=get('year'), tzM=get('month'), tzD=get('day'), tzH=get('hour'), tzMin=get('minute'), tzS=get('second'); const tzEpoch = Date.UTC(tzY, tzM-1, tzD, tzH, tzMin, tzS); const offset = tzEpoch - utcGuess; return Date.UTC(comp.y, comp.M-1, comp.d, comp.h, comp.m, comp.s) - offset; } function startOfDayZoned(date, timeZone) { const f = new Intl.DateTimeFormat('en-CA',{timeZone,year:'numeric',month:'2-digit',day:'2-digit'}); const p = f.formatToParts(date); const y = +p.find(v=>v.type==='year').value; const M = +p.find(v=>v.type==='month').value; const d = +p.find(v=>v.type==='day').value; return zonedComponentsToUTCms({y,M,d,h:0,m:0,s:0}, timeZone); } function listDaysInRange(start, end) { const res = []; if (!start || !end) return res; const endDayMs = startOfDayZoned(end, userTZ); let curMs = startOfDayZoned(start, userTZ); let guard = 0; while (curMs <= endDayMs && guard < 370) { const d = new Date(curMs); const f = new Intl.DateTimeFormat('en-CA',{timeZone:userTZ,year:'numeric',month:'2-digit',day:'2-digit'}); const p = f.formatToParts(d); res.push({ y:+p.find(v=>v.type==='year').value, M:+p.find(v=>v.type==='month').value, d:+p.find(v=>v.type==='day').value }); curMs += 24*3600*1000; guard++; } return res; } // --------------- Natural input parse --------------- function normalizeSpaces(s){ return s.replace(/\u00A0/g,' ').replace(/\s+/g,' ').trim(); } function inferYearFromYY(yy) { const yys = [startTime.getFullYear()%100, endTime.getFullYear()%100]; if (yy === yys[0]) return startTime.getFullYear(); if (yy === yys[1]) return endTime.getFullYear(); return 2000 + yy; } function parseInputToTarget(text) { if (!text) return null; let s = normalizeSpaces(text).replace(/,/g,' '); // 한국어 날짜/시간 const korDate = s.match(/(?:(\d{2,4})\s*년\s*)?(\d{1,2})\s*월\s*(\d{1,2})\s*일/); const korTime = s.match(/(\d{1,2})\s*시(?:\s*(\d{1,2})\s*분)?(?:\s*(\d{1,2})\s*초)?/); if (korDate || korTime) { let y, M, d, h=0, m=0, sec=0; if (korDate) { const yyRaw = korDate[1]; M = +korDate[2]; d = +korDate[3]; if (yyRaw) y = (yyRaw.length===2) ? inferYearFromYY(+yyRaw) : +yyRaw; else y = startTime.getFullYear(); } else if (korTime) { h = +korTime[1]; m = korTime[2]?+korTime[2]:0; sec = korTime[3]?+korTime[3]:0; if (h>23||m>59||sec>59) return null; const days = listDaysInRange(startTime, endTime); for (const dc of days) { const ms = zonedComponentsToUTCms({y:dc.y,M:dc.M,d:dc.d,h,m,s:sec}, userTZ); const cand = new Date(ms); if (cand >= startTime && cand <= endTime) return { comp:{y:dc.y,M:dc.M,d:dc.d,h,m,s:sec} }; } return null; } if (korTime) { h=+korTime[1]; m=korTime[2]?+korTime[2]:0; sec=korTime[3]?+korTime[3]:0; } if (h>23||m>59||sec>59) return null; if (!y||!M||!d) return null; return { comp:{y,M,d,h,m,s:sec} }; } let m; m = s.match(/^(\d{4})[-.](\d{1,2})[-.](\d{1,2})\s+(\d{1,2}):(\d{2})(?::(\d{2}))?$/); if (m) { const y=+m[1], M=+m[2], d=+m[3], h=+m[4], mm=+m[5], ss=m[6]?+m[6]:0; if (h>23||mm>59||ss>59) return null; return { comp:{y,M,d,h,m:mm,s:ss} }; } m = s.match(/^(\d{2})[-.](\d{1,2})[-.](\d{1,2})\s+(\d{1,2}):(\d{2})(?::(\d{2}))?$/); if (m) { const y=inferYearFromYY(+m[1]), M=+m[2], d=+m[3], h=+m[4], mm=+m[5], ss=m[6]?+m[6]:0; if (h>23||mm>59||ss>59) return null; return { comp:{y,M,d,h,m:mm,s:ss} }; } m = s.match(/^(\d{1,2})[-.](\d{1,2})\s+(\d{1,2}):(\d{2})(?::(\d{2}))?$/); if (m) { const M=+m[1], d=+m[2], h=+m[3], mm=+m[4], ss=m[5]?+m[5]:0; if (h>23||mm>59||ss>59) return null; const candidates=[startTime.getFullYear(), endTime.getFullYear()]; for (const y of [...new Set(candidates)]) { const ms=zonedComponentsToUTCms({y,M,d,h,m:mm,s:ss}, userTZ); const cand=new Date(ms); if (cand>=startTime && cand<=endTime) return { comp:{y,M,d,h,m:mm,s:ss} }; } return { comp:{ y:startTime.getFullYear(), M, d, h, m:mm, s:ss } }; } m = s.match(/^(\d{4}-\d{1,2}-\d{1,2})[ T](\d{1,2}):(\d{2})(?::(\d{2}))?$/); if (m) { const [y,M,d]=m[1].split('-').map(Number); const h=+m[2], mm=+m[3], ss=m[4]?+m[4]:0; if (h>23||mm>59||ss>59) return null; return { comp:{ y,M,d,h,m:mm,s:ss } }; } const t = s.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/); if (t && startTime && endTime) { const hh=+t[1], mm=+t[2], ss=t[3]?+t[3]:0; if (hh>23||mm>59||ss>59) return null; const days=listDaysInRange(startTime, endTime); for (const d of days) { const candMs=zonedComponentsToUTCms({ y:d.y,M:d.M,d:d.d,h:hh,m:mm,s:ss }, userTZ); const cand=new Date(candMs); if (cand>=startTime && cand<=endTime) return { comp:{ y:d.y,M:d.M,d:d.d,h:hh,m:mm,s:ss } }; } return null; } const onlyKorTime = s.match(/^(\d{1,2})\s*시(?:\s*(\d{1,2})\s*분)?(?:\s*(\d{1,2})\s*초)?$/); if (onlyKorTime && startTime && endTime) { const hh=+onlyKorTime[1], mm=onlyKorTime[2]?+onlyKorTime[2]:0, ss=onlyKorTime[3]?+onlyKorTime[3]:0; if (hh>23||mm>59||ss>59) return null; const days=listDaysInRange(startTime, endTime); for (const d of days) { const candMs=zonedComponentsToUTCms({ y:d.y,M:d.M,d:d.d,h:hh,m:mm,s:ss }, userTZ); const cand=new Date(candMs); if (cand>=startTime && cand<=endTime) return { comp:{y:d.y,M:d.M,d:d.d,h:hh,m:mm,s:ss} }; } return null; } const korDateAndHm = s.match(/(?:(\d{2,4})\s*년\s*)?(\d{1,2})\s*월\s*(\d{1,2})\s*일\s+(\d{1,2}):(\d{2})$/); if (korDateAndHm) { let y = korDateAndHm[1] ? (korDateAndHm[1].length===2 ? inferYearFromYY(+korDateAndHm[1]) : +korDateAndHm[1]) : startTime.getFullYear(); const M = +korDateAndHm[2], d = +korDateAndHm[3], h = +korDateAndHm[4], m = +korDateAndHm[5]; if (h>23||m>59) return null; return { comp:{ y,M,d,h,m,s:0 } }; } m = s.match(/^(\d{1,2})[.-](\d{1,2})\s+(\d{1,2}):(\d{2})$/); if (m) { const M=+m[1], d=+m[2], h=+m[3], mm=+m[4]; if (h>23||mm>59) return null; const candidates=[startTime.getFullYear(), endTime.getFullYear()]; for (const y of [...new Set(candidates)]) { const ms=zonedComponentsToUTCms({y,M,d,h,m:mm,s:0}, userTZ); const cand=new Date(ms); if (cand>=startTime && cand<=endTime) return { comp:{y,M,d,h,m:mm,s:0} }; } return { comp:{ y:startTime.getFullYear(), M, d, h, m:mm, s:0 } }; } return null; } // ---------------- Toast ---------------- function showToastMessage(message, isError=false) { const container = document.querySelector('#toastMessage') || document.querySelector('#toast-message') || document.querySelector('.toastMessage') || document.querySelector('.toast-message') || document.querySelector('.toast_container, .toast-container, .toast-wrap, .toast_wrap'); if (container) { const wrap = document.createElement('div'); const text = document.createElement('p'); text.textContent = String(message ?? ''); wrap.appendChild(text); container.appendChild(wrap); setTimeout(() => { if (wrap.parentNode === container) container.removeChild(wrap); }, 2000); return; } try { window.dispatchEvent(new CustomEvent('toast-message', { detail:{ message:String(message ?? ''), type:isError?'error':'info' } })); } catch {} alert(String(message ?? '')); } // ---------------- History store ---------------- const loadHistory = () => { try { return JSON.parse(localStorage.getItem(HISTORY_KEY) || '[]'); } catch { return []; } }; const saveHistory = (arr) => localStorage.setItem(HISTORY_KEY, JSON.stringify(arr.slice(0, HISTORY_MAX))); const addHistory = (item) => { const list = loadHistory().filter(v => v !== item); list.unshift(item); saveHistory(list); }; const clearHistory = () => saveHistory([]); // ---------------- Modal ---------------- let jumpModalHost = null; // 공유 URL 파라미터 중복 방지 function setChangeSecondParam(url, sec){ // 혹시 모를 유사 키도 정리 ['change_second','t','time','sec'].forEach(k => url.searchParams.delete(k)); url.searchParams.set('change_second', String(sec)); return url; } // 클립보드 읽기(1.2초 캐시) async function readClipboardCached(){ const now = Date.now(); if (now - _clipCachedAt < CLIPBOARD_CACHE_MS) { return { text:_clipCacheVal, error:_clipCacheErr }; } try { const text = (await navigator.clipboard.readText()) || ''; _clipCacheVal = text; _clipCacheErr = false; _clipCachedAt = now; return { text, error:false }; } catch { _clipCacheVal = ''; _clipCacheErr = true; _clipCachedAt = now; return { text:'', error:true }; } } function openJumpModal(triggerBtn) { lastActiveEl = triggerBtn || document.activeElement; const startStr = fmtDate(startTime); const endStr = fmtDate(endTime); const durEl = getDurationElRobust(); const totalDuration = durEl ? parseHMSFlexible((durEl.textContent || '').trim()) : null; const expectedSec = Math.max(0, ((endTime - startTime)/1000) | 0); const isEditedLike = (totalDuration != null) && (totalDuration + EDIT_THRESHOLD_SEC < expectedSec); const editedBadgeHTML = isEditedLike ? `해당 다시보기는 시네티 같이보기 진행 또는 편집된 영상일 수 있습니다.` : ''; const hintBase = new Date(startTime.getTime() + 2*60*1000); const y = hintBase.getFullYear(), M = p2(hintBase.getMonth()+1), D = p2(hintBase.getDate()); const H = p2(hintBase.getHours()), m = p2(hintBase.getMinutes()), s = p2(hintBase.getSeconds()); const yy = String(y).slice(-2), kH = String(hintBase.getHours()); const placeholderHint = `예: ${y}-${M}-${D}, ${H}:${m}:${s} / ${yy}.${M}.${D} ${H}:${m} / ${M}월 ${D}일 ${kH}시 ${m}분`; if (!jumpModalHost) { jumpModalHost = document.createElement('div'); jumpModalHost.style.position = 'fixed'; jumpModalHost.style.inset = '0'; jumpModalHost.style.zIndex = '2147483647'; jumpModalHost.attachShadow({ mode:'open' }); document.documentElement.appendChild(jumpModalHost); } const root = jumpModalHost.shadowRoot; root.innerHTML = ''; const style = document.createElement('style'); style.textContent = ` :host { all: initial; } .backdrop { all: initial; position: fixed; inset: 0; background: rgba(0,0,0,.38); display: grid; place-items: center; } .card { all: initial; width: min(720px, 94vw); background: #1f2329; color: #e9edf3; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.45); font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", Helvetica, Arial, sans-serif; text-rendering: optimizeSpeed; font-size: 14px; line-height: 1.5; padding: 22px 24px 18px; } .titlebar { display:flex; align-items:center; justify-content:space-between; margin-bottom: 14px; } .title { font-weight: 800; font-size: 18px; letter-spacing: .1px; } .desc { opacity: .85; margin-bottom: 12px; white-space: pre-line; } .section { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); } .section:first-of-type { margin-top: 0; padding-top: 0; border-top: none; } .section-title { display:flex; align-items:center; gap:8px; font-weight: 700; color:#dbe5f5; margin: 6px 0 8px; } .section-title::before { content:""; display:inline-block; width:14px; height:14px; border-radius:3px; background: linear-gradient(135deg, #3aa0ff, #8f77ff); } .row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; margin: 8px 0; } .row > div:last-child { min-width: 0; } .label { opacity: .85; } .inputwrap { position: relative; display: flex; align-items: center; gap: 8px; } input[type="text"]{ all: initial; background:#2a2f36; color:#e9edf3; padding:10px 12px; border-radius:10px; border:1px solid transparent; outline:none; font:13px/1.2 inherit; width:100%; box-sizing:border-box; display:block; } input[type="text"]:focus{ border-color:#048BFF; } .hist-panel { position: absolute; left: 0; right: 36px; top: calc(100% + 6px); background: #1f2329; border: 1px solid #2f3540; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.45); padding: 8px; z-index: 5; display: none; } .hist-panel.show { display: block; } .hist-item { display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:10px; cursor:pointer; } .hist-item:hover { background:#2a2f36; } .hist-ico { opacity:.9; } .hist-text { flex:1; pointer-events:none; } .ellipsis { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; } .hist-del { all:initial; color:#9aa3ad; cursor:pointer; padding:2px 6px; border-radius:6px; margin-left:2px; } .hist-del:hover { background:#2a2f36; color:#e9edf3; } .divider { height:1px; background:#2a2f36; margin:6px 4px; } .hist-caption { font-size:11px; opacity:.7; padding:0 10px 4px; } /* 현재 클립보드 칩 */ .hist-panel .hist-item[data-clip]{ background:#2a2f36; border:1px solid #2a2f36; border-radius:9999px; margin-left: 8px; padding:4px 10px; line-height:14px; font-size:12px; } .hist-panel .hist-item[data-clip]:hover{ background:#343a43; border-color:#4b5563; } .hist-panel .hist-item[data-clip] .hist-ico{ font-size:12px; opacity:.9; } .hist-panel .hist-item[data-clip] .hist-text{ color:#ffc107; font-weight:300; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", Helvetica, Arial, sans-serif; } /* 권한 실패 시 빨간 글자 */ .hist-panel .hist-item[data-clip].error .hist-text{ color:#ff4d4f; } /* 둥근모서리 칩 모양 */ .hist-chip{ background:#2a2f36; border:1px solid #3b414c; border-radius:10px; padding:8px 10px; margin-left: 8px;} .hist-chip:hover{ background:#343a43; } .hist-chip .hist-ico{ opacity:.9; } .hist-chip .hist-text{ flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size:12px; } .hist-footer { display:flex; justify-content:flex-end; padding-top:6px; } .hist-clear { all:initial; cursor:pointer; padding:6px 10px; border-radius:999px; background:#2a2f36; color:#e9edf3; font-size:12px; } .hist-clear:hover { background:#343a43; } .iconbtn{ all: initial; cursor:pointer; width:36px; height:36px; display:grid; place-items:center; border-radius:10px; background:#2a2f36; color:#e9edf3; user-select:none; } .iconbtn:hover{ background:#343a43; } .picker{ all: initial; position:absolute; right:0; top:calc(100% + 8px); background:#22262c; color:#e9edf3; border:1px solid #2f3540; border-radius:12px; box-shadow:0 16px 50px rgba(0,0,0,.45); padding:12px; z-index:4; min-width: 440px; font-family: inherit; text-rendering: inherit; } .picker[hidden]{ display:none !important; } .pick-row{ display:flex; align-items:center; gap:10px; margin-top:8px; flex-wrap:wrap; } .seg{ background:#2a2f36; border-radius:10px; padding:6px 10px; font-size:12px; } select{ all: initial; background:#2a2f36; color:#e9edf3; padding:8px 10px; border-radius:10px; border:1px solid transparent; outline:none; font:13px/1.2 inherit; } select:focus{ border-color:#048BFF; } input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } input[type=number] { -moz-appearance: textfield; } .numbox { display:flex; align-items:center; background:transparent; } .num{ all: initial; background:#2a2f36; color:#e9edf3; padding:8px 8px; border-radius:10px; border:1px solid transparent; outline:none; width:54px; text-align:center; font:13px/1.2 inherit; } .num:focus{ border-color:#048BFF; } .steppers { display:flex; flex-direction:column; gap:2px; margin-left:4px; } .step { all: initial; cursor:pointer; width:18px; height:16px; display:grid; place-items:center; border-radius:6px; background:#2a2f36; color:#e9edf3; font-size:10px; line-height:1; } .step:hover { background:#343a43; } .colon { opacity:.8; margin: 0 2px; } .pillbar, .tz, .hint { margin-left: 172px; } .pillbar { display:flex; gap:6px; margin-top: 12px; margin-bottom: 10px; flex-wrap:wrap; } .pill { all: initial; cursor:pointer; padding:6px 10px; border-radius:999px; background:#2a2f36; color:#e9edf3; font-size:12px; } .pill:hover { background:#343a43; } .pill.primary { background:#048BFF; color:#fff; } .pill.primary:hover { background:#048BFF; color:#fff; } .tz { font-size:12px; opacity:.8; margin-top: 14px; } .hint { font-size:12px; opacity:.75; margin-top:6px; } .actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; } .btn { all: initial; cursor: pointer; padding: 8px 12px; border-radius: 10px; background: #2a2f36; color: #e9edf3; } .btn.primary { background:#048BFF; color:#fff; } `; const container = document.createElement('div'); container.className = 'backdrop'; const card = document.createElement('div'); card.className = 'card'; card.setAttribute('role', 'dialog'); card.setAttribute('aria-modal', 'true'); card.setAttribute('aria-label', '특정 시간으로 이동하기'); card.innerHTML = `