From 89c33eba876167290820694675e750a358e47c2c Mon Sep 17 00:00:00 2001 From: seo Date: Wed, 1 Jul 2026 01:05:04 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B3=B5=EA=B7=80=20=EB=A7=81=ED=81=AC=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=EA=B2=BD=EB=A1=9C=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- monitor.php | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d0cce2d..4b981ef 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Car는 차량 모뎀/게이트웨이에서 받은 상태를 수집해 DB에 저 헤더 우측 컨트롤은 WakeLock, 언어, 테마 순서입니다. WakeLock은 Screen Wake Lock API를 지원하는 브라우저에서 화면 꺼짐을 방지하며, 활성 상태는 초록색 아이콘 버튼으로 표시합니다. 사용자의 선택은 `localStorage`에 저장하고, 새로고침이나 탭 복귀 후에는 브라우저 정책에 맞춰 다시 획득을 시도합니다. -좌측 상단 복귀 링크는 이전 페이지가 `chaegeon.com` 계열이면 해당 URL을 사용합니다. 같은 출처에서 이동한 경우에는 이전 문서의 title을 읽어 표시하고, 직접 접속이나 이전 페이지 확인이 어려운 경우에는 `https://chaegeon.com/blog`를 기본 목적지로 사용합니다. `seo.chaegeon.com`의 상대 경로로 이동하지 않도록 절대 URL을 기본값으로 둡니다. +좌측 상단 복귀 링크는 이전 페이지가 `chaegeon.com` 계열이면 해당 URL을 사용합니다. `chaegeon.com`이면 채건닷컴, `/blog`이면 블로그처럼 알려진 경로명을 우선 표시하고, 같은 출처의 다른 이전 페이지는 문서 title을 읽어 표시합니다. 직접 접속이나 이전 페이지 확인이 어려운 경우에는 `https://chaegeon.com/`를 기본 목적지로 사용합니다. `seo.chaegeon.com`의 상대 경로로 이동하지 않도록 절대 URL을 기본값으로 둡니다. ## 구성 diff --git a/monitor.php b/monitor.php index 85ca4b8..b5b49ac 100644 --- a/monitor.php +++ b/monitor.php @@ -1372,7 +1372,7 @@ car_monitor_require_access(false);
- 블로그 + 채건닷컴
Car Monitor
WAIT @@ -1826,7 +1826,7 @@ car_monitor_require_access(false); let wakeLockWanted = false; let latestDashboardData = null; let latestDashboardMeta = null; - const FALLBACK_BACK_TARGET = 'https://chaegeon.com/blog'; + const FALLBACK_BACK_TARGET = 'https://chaegeon.com/'; const BACK_LINK_PATH_TITLE = { '/': '채건닷컴', '/home': '홈', @@ -1903,9 +1903,10 @@ car_monitor_require_access(false); const ref = sameSiteUrl(document.referrer || ''); const current = new URL(location.href); const target = ref && ref.href !== current.href ? ref.href : FALLBACK_BACK_TARGET; - let label = titleFromBackUrl(target); + const knownLabel = titleFromBackUrl(target); + let label = knownLabel; - if (ref && ref.origin === location.origin) { + if (!knownLabel && ref && ref.origin === location.origin) { try { const res = await fetch(ref.href, { credentials: 'same-origin', cache: 'force-cache' }); if (res.ok) { @@ -1924,7 +1925,7 @@ car_monitor_require_access(false); if (!link) return; link.href = FALLBACK_BACK_TARGET; - updateBackLinkLabel('블로그'); + updateBackLinkLabel('채건닷컴'); resolveBackTarget().then(({ href, label }) => { link.href = href;