v4.0.8: nginx no-cache·deck-favorites shim으로 배포/캐시 문제 수정

구 HTML·CDN immutable JS가 init 없이 남던 문제를 nginx 캐시 정책·shim·배포 검증으로 해결한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-23 16:24:19 +09:00
parent 72d73a54bd
commit eb4b35bccc
8 changed files with 100 additions and 20 deletions

View File

@@ -0,0 +1,22 @@
/**
* 구 CDN 캐시 deck-favorites.js(init 없음) 호환 — init/forget 폴리해
*/
(function applyDeckFavoritesShim() {
const F = window.UaDeckFavorites;
if (!F) return;
if (typeof F.init !== 'function') {
F.init = async function initLegacyShim() {
/* localStorage 전용 구버전 — 계정 동기화 없음 */
};
}
if (typeof F.forget !== 'function') {
F.forget = function forgetLegacyShim(shareCode) {
if (!shareCode || typeof F.isFavorite !== 'function') return;
if (F.isFavorite(shareCode) && typeof F.toggle === 'function') {
F.toggle(shareCode);
}
};
}
})();