/* Gold Apple — 거래내역 날짜 셀의 "YYYY-MM-DD HH:MM:SS" → 날짜 위 / (시간) 아래 분리 * 적용: page-buy 거래내역 카드 (.Buy-list li.table-A table tbody td) * 2026-04-28 */ (function () { 'use strict'; if (window.__gaTxDateSplitInit) return; window.__gaTxDateSplitInit = true; var DATETIME_RE = /^(\d{4}-\d{2}-\d{2})\s+(\d{2}:\d{2}:\d{2})$/; function splitOne(td) { if (td.dataset.gaSplit) return; var raw = (td.textContent || '').trim(); var m = raw.match(DATETIME_RE); if (!m) return; td.dataset.gaSplit = '1'; td.innerHTML = '' + '' + m[1] + '' + '(' + m[2] + ')' + ''; } function run() { var tds = document.querySelectorAll('.Buy-list li.table-A table tbody td'); for (var i = 0; i < tds.length; i++) splitOne(tds[i]); } function init() { if (!document.body.classList.contains('page-buy')) return; run(); /* 행이 동적으로 추가될 수 있으므로 MutationObserver로 후속 row도 처리 */ var tbody = document.querySelector('.Buy-list li.table-A table tbody'); if (tbody && window.MutationObserver) { new MutationObserver(run).observe(tbody, { childList: true, subtree: true }); } } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })();