From b77be98285b2b418905ef281412c6bb9b11fd07d Mon Sep 17 00:00:00 2001 From: seo Date: Mon, 29 Jun 2026 05:38:59 +0900 Subject: [PATCH] =?UTF-8?q?=EB=82=98=EC=9D=98=20=EC=B0=BE=EA=B8=B0=20?= =?UTF-8?q?=EA=B8=B0=EC=A1=B4=20HTML=20=ED=98=B8=ED=99=98=20=EB=B6=84?= =?UTF-8?q?=EA=B8=B0=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- js/main.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1d020b5..9352ff4 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Home Assistant에 기록된 Galaxy Z Fold7의 위치, 배터리, 활동 상태, 표시할 모바일 앱 센서 목록은 `/custom/common/config.php`의 `findmydevice_sensor_sections`에서 섹션 단위로 관리합니다. 화면 CSS 원본은 `/custom/common/css/findmydevice.css`를 사용합니다. 기존 운영 HTML이 `/custom/findmydevice/css/style.css`를 참조해도 호환 파일이 공용 CSS를 import합니다. -페이지 본문에는 `
`만 두면 됩니다. `main.js`는 `#mySettingContainer`가 없을 때 지도, 헤더, 설정/기록/위치/업데이트/배터리/활동 섹션과 iOS PWA 안내 영역을 자동으로 생성합니다. 기존처럼 전체 HTML을 직접 넣어둔 페이지에서는 이미 존재하는 `#mySettingContainer`를 그대로 사용합니다. +페이지 본문에는 `
`만 두면 됩니다. `main.js`는 이 컨테이너 안에 지도, 헤더, 설정/기록/위치/업데이트/배터리/활동 섹션과 iOS PWA 안내 영역을 항상 자동 생성합니다. 위치 갱신 명령은 `/custom/common/config.php`의 `findmydevice_location_refresh` 설정을 사용합니다. `seoul`, `main` Home Assistant 프로필의 `notify.mobile_app_seocaegeonyi_z_fold7` 서비스로 Companion App notification command를 보냅니다. 자동 업데이트가 켜지면 Android high accuracy mode를 5초 간격으로 설정하고 `force_on`을 보낸 뒤 `request_location_update`와 `command_update_sensors`를 함께 호출합니다. 자동 업데이트 중에는 10초마다 위치 요청과 센서 업데이트 요청을 반복하고, 자동 업데이트를 끄거나 페이지를 벗어나면 `force_off`를 보냅니다. diff --git a/js/main.js b/js/main.js index e0eabbb..6f01cbb 100644 --- a/js/main.js +++ b/js/main.js @@ -460,8 +460,6 @@ let langCode = localStorage.getItem("currentLang") || deviceLang, wakeLock = null; function ensureFindMyDeviceShell() { - if (document.getElementById('mySettingContainer')) return; - let mount = document.getElementById('findmydevice'); if (!mount) { mount = document.createElement('div'); @@ -469,6 +467,10 @@ function ensureFindMyDeviceShell() { document.body.prepend(mount); } + document.querySelectorAll('#mySettingContainer, #ios-pwa-tooltip').forEach(el => { + if (!mount.contains(el)) el.remove(); + }); + mount.innerHTML = `