cdnhost 2.6.3 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ws_cdn.js +2 -2
package/package.json
CHANGED
package/ws_cdn.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
document.addEventListener('DOMContentLoaded', function() {
|
|
3
3
|
if (window.FHLWidgetInitialized) return;
|
|
4
4
|
window.FHLWidgetInitialized = true;
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
const renderInitialResults = (items) => { searchResultsContainer.innerHTML = ''; currentPage = 1; currentDisplayItems = items; appendNextPage(); };
|
|
282
282
|
const openSearch = async () => { widgetContainer.classList.add('search-mode'); widgetWrapper.classList.add('search-mode'); searchInput.focus(); if (fullApiItemsData === null) { try { const response = await fetch('https://isai.kr/appapi2.php'); if (!response.ok) throw new Error('API 응답 오류'); fullApiItemsData = await response.json(); } catch (error) { console.error('전체 앱 목록 로드 실패:', error); searchResultsContainer.innerHTML = '<p>목록 로드 실패</p>'; fullApiItemsData = []; return; } } renderInitialResults(fullApiItemsData); };
|
|
283
283
|
|
|
284
|
-
const initialRender=()=>{const a=translations[currentLang]||translations['en'];const b=[{name:a.search,url:'https://isai.kr',icon:'ph-sparkle'},{name:a.question,url:'https://isai.kr/#chat',icon:'ph-question-mark'},{name:a.
|
|
284
|
+
const initialRender=()=>{const a=translations[currentLang]||translations['en'];const b=[{name:a.search,url:'https://isai.kr',icon:'ph-sparkle'},{name:a.question,url:'https://isai.kr/#chat',icon:'ph-question-mark'},{name:a.blog,url:'https://blog.099.kr',icon:'ph-article-medium'},{name:a.characterChat,url:'https://zoai.oduc.kr/ko/character/select',icon:'ph-chats-circle'},{name:a.translate,url:'https://translato.isai.kr/',icon:'ph-translate'},{name:a.tarot,url:'https://tarot.isai.kr/',icon:'ph-cards'},{name:'라노벨',url:'https://ranovel.kr/',img:'https://cdn.jsdelivr.net/npm/cdnhost@2.2.2/__ra.png'},{name:a.psychology,url:'https://simpong.oduc.kr/',img:'http://cdn.jsdelivr.net/npm/cdnhost@2.2.0/_simpong.png'},{name:a.forum,url:'https://logig.im',img:'https://cdn.jsdelivr.net/npm/cdnhost@2.3.9/_______________logig.png'},{name:a.ads,url:'https://gig.snapp.im/',icon:'ph-currency-circle-dollar'},];listContainer.innerHTML='';const c=shortcutManager.get();let d=[...b];d.splice(2,0,...c);d.forEach(e=>{const f=c.some(g=>g.url===e.url);const h=f&&!e.icon&&!e.img?'local':'default';listContainer.appendChild(createIconItem(e,h));});checkScrollability();updateAllWidgetLinks();};
|
|
285
285
|
|
|
286
286
|
const updateScrollIndicator = () => { const scrollLeft = listContainer.scrollLeft; const maxScrollLeft = listContainer.scrollWidth - listContainer.clientWidth; if (maxScrollLeft <= 0) return; const scrollFraction = scrollLeft / maxScrollLeft; const trackWidth = indicatorTrack.clientWidth; const indicatorWidth = scrollIndicator.clientWidth; const maxIndicatorLeft = trackWidth - indicatorWidth; const indicatorLeft = scrollFraction * maxIndicatorLeft; scrollIndicator.style.transform = `translateY(-50%) translateX(${indicatorLeft}px)`; };
|
|
287
287
|
const checkScrollability = () => { const isScrollable = listContainer.scrollWidth > listContainer.clientWidth; widgetContainer.classList.toggle('scrollable', isScrollable); if (isScrollable) updateScrollIndicator(); };
|