cdnhost 2.6.8 → 2.7.0
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 +1 -1
- package/ws_lg.js +17 -17
package/package.json
CHANGED
package/ws_cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
document.addEventListener('DOMContentLoaded', function() { if (window.FHLWidgetInitialized) return; window.FHLWidgetInitialized = true; const languages = [ { code: 'ko', name: '한국어' }, { code: 'en', name: 'English' }, { code: 'es', name: 'Español' }, { code: 'hi', name: 'हिन्दी' }, { code: 'ar', name: 'العربية' }, { code: 'de', name: 'Deutsch' }, { code: 'fr', name: 'Français' }, { code: 'pt', name: 'Português' }, { code: 'bn', name: 'বাংলা' }, { code: 'ja', name: '日本語' }, { code: 'ru', name: 'Русский' }, { code: 'zh', name: '简体中文' }, { code: 'th', name: 'ไทย' }, { code: 'vi', name: 'Tiếng Việt' }, { code: 'id', name: 'Indonesia' }, { code: 'tr', name: 'Türkçe' }, { code: 'ur', name: 'اردو' }]; let currentDisplayItems = []; let currentPage = 1; const ITEMS_PER_PAGE = 30; let isLoadingNextPage = false; let searchTimeout = null; const widgetContainer = document.getElementById('fhl-widget-container'); const widgetWrapper = document.getElementById('fhl-widget-wrapper'); const listContainer = document.getElementById('fhl-list-container'); const searchInput = document.getElementById('fhl-search-input'); const searchResultsContainer = document.getElementById('fhl-search-results'); const searchTrigger = document.getElementById('fhl-search-trigger'); const searchClose = document.getElementById('fhl-search-close'); const indicatorTrack = document.getElementById('fhl-indicator-track'); const scrollIndicator = document.getElementById('fhl-scroll-indicator'); const addToHomeBtn = document.getElementById('fhl-add-to-home-btn'); const searchAddBtn = document.getElementById('fhl-search-add-btn'); const toastElement = document.getElementById('fhl-toast-notification'); const languageBtn = document.getElementById('fhl-language-btn'); const languagePanel = document.getElementById('fhl-language-panel'); const fixedQuestionBtn = document.getElementById('fhl-fixed-question'); const fixedChatBtn = document.getElementById('fhl-fixed-chat'); const fixedAdBtn = document.getElementById('fhl-fixed-ad'); const fixedInfoBtn = document.getElementById('fhl-fixed-info'); let toastTimeout = null; let currentLang = localStorage.getItem('fhl-widget-lang') || 'ko'; const API_BASE_URL = 'https://isai.kr'; const shortcutManager = { key: 'fhl-custom-icons-with-expiry', get: () => { const rawData = localStorage.getItem(shortcutManager.key); if (!rawData) return []; try { const data = JSON.parse(rawData); const thirtyDaysInMs = 30 * 24 * 60 * 60 * 1000; if (Date.now() - data.timestamp > thirtyDaysInMs) { localStorage.removeItem(shortcutManager.key); return []; } return data.shortcuts || []; } catch (e) { localStorage.removeItem(shortcutManager.key); return []; } }, set: (shortcuts) => { const dataToStore = { timestamp: Date.now(), shortcuts: shortcuts }; localStorage.setItem(shortcutManager.key, JSON.stringify(dataToStore)); }, syncFromURL: () => { const params = new URLSearchParams(window.location.search); const shortcutsParam = params.get('shortcuts'); if (shortcutsParam) { try { const decodedData = atob(shortcutsParam); JSON.parse(decodedData); localStorage.setItem(shortcutManager.key, decodedData); } catch (e) { console.error("Failed to parse shortcuts from URL:", e); } } }, getAsParam: () => { const rawData = localStorage.getItem(shortcutManager.key); if (!rawData) return ''; return `shortcuts=${btoa(rawData)}`; } }; const updateAllWidgetLinks = () => { const paramString = shortcutManager.getAsParam(); if (!paramString) return; const allLinks = document.querySelectorAll('#fhl-widget-container .fhl-icon-display, #fhl-widget-container .fhl-fixed-item'); allLinks.forEach(link => { if (link.tagName === 'A') { const originalHref = link.getAttribute('href'); if (!originalHref || originalHref.startsWith('#')) return; try { let newUrl = new URL(originalHref); const [key, value] = paramString.split('='); newUrl.searchParams.set(key, value); link.href = newUrl.toString(); } catch (e) { console.error('Invalid URL for link update:', originalHref); } } }); }; const showToast = (message) => { clearTimeout(toastTimeout); toastElement.textContent = message; toastElement.classList.add('visible'); toastTimeout = setTimeout(() => { toastElement.classList.remove('visible'); }, 2500); }; const applyLanguage = (langCode) => { if (typeof translations === 'undefined') { console.error("Translations not loaded! Make sure lang.js is included correctly."); return; } const t = translations[langCode] || translations['en']; document.documentElement.lang = langCode; searchTrigger.setAttribute('aria-label', t.openSearch); addToHomeBtn.setAttribute('aria-label', t.addToWidget); searchClose.setAttribute('aria-label', t.closeSearch); languageBtn.setAttribute('aria-label', t.changeLanguage); searchAddBtn.setAttribute('aria-label', 'Copy Widget Code'); fixedQuestionBtn.setAttribute('aria-label', t.question); fixedChatBtn.setAttribute('aria-label', t.characterChat); fixedAdBtn.setAttribute('aria-label', t.ads); fixedInfoBtn.setAttribute('aria-label', t.info); searchInput.placeholder = t.searchPlaceholder; initialRender(); }; const populateLanguagePanel = () => { languagePanel.innerHTML = ''; languages.forEach(lang => { const langItem = document.createElement('a'); langItem.href = '#'; langItem.className = 'fhl-language-item'; langItem.textContent = lang.name; langItem.dataset.lang = lang.code; langItem.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); const newLang = e.target.dataset.lang; if (newLang !== currentLang) { currentLang = newLang; localStorage.setItem('fhl-widget-lang', currentLang); applyLanguage(currentLang); } languagePanel.classList.remove('visible'); }); languagePanel.appendChild(langItem); }); }; const getProcessedUrl = (fullUrl) => { try { const urlObj = new URL(fullUrl); return `${urlObj.protocol}//${urlObj.hostname}`; } catch (e) { return fullUrl; } }; const createIconItem = (item, type = 'default') => { const link = document.createElement('a'); if (type === 'search') { const paramString = shortcutManager.getAsParam(); let finalUrl = item.url; if (paramString) { try { let newUrl = new URL(item.url); const [key, value] = paramString.split('='); newUrl.searchParams.set(key, value); finalUrl = newUrl.toString(); } catch (e) { console.error('Invalid URL for search result link:', item.url); } } link.href = finalUrl; } else { link.href = item.url; } link.className = 'fhl-icon-display'; link.setAttribute('aria-label', item.name); if (type === 'search') { link.addEventListener('mousedown', () => { fetch(`${API_BASE_URL}/update_view_count.php`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ url: item.url }) }).catch(console.error); }); link.target = '_blank'; } const iconCircle = document.createElement('div'); iconCircle.className = 'fhl-icon-circle'; if (item.icon) { const icon = document.createElement('i'); icon.className = `ph-bold ${item.icon}`; iconCircle.appendChild(icon); } else if (item.img) { const customImage = document.createElement('img'); customImage.src = item.img; customImage.alt = item.name; customImage.onerror = () => { customImage.style.display = 'none'; }; iconCircle.appendChild(customImage); } else { const favicon = document.createElement('img'); favicon.src = `https://www.google.com/s2/favicons?sz=64&domain_url=${item.url}`; favicon.alt = item.name; favicon.onerror = () => { favicon.style.display = 'none'; }; iconCircle.appendChild(favicon); } link.appendChild(iconCircle); if (type === 'search') { const tooltip = document.createElement('div'); tooltip.className = 'fhl-item-tooltip'; tooltip.textContent = item.name.length > 5 ? item.name.slice(0, 5) + '..' : item.name; link.appendChild(tooltip); link.addEventListener('mouseenter', (e) => { const currentTooltip = e.currentTarget.querySelector('.fhl-item-tooltip'); if (!currentTooltip) return; currentTooltip.classList.add('visible'); const widgetRect = widgetWrapper.getBoundingClientRect(); const tooltipRect = currentTooltip.getBoundingClientRect(); let offsetX = 0; const padding = 5; if (tooltipRect.left < widgetRect.left) { offsetX = widgetRect.left - tooltipRect.left + padding; } else if (tooltipRect.right > widgetRect.right) { offsetX = widgetRect.right - tooltipRect.right - padding; } if (offsetX !== 0) { currentTooltip.style.transform = `translateX(calc(-50% + ${offsetX}px))`; } }); link.addEventListener('mouseleave', (e) => { const currentTooltip = e.currentTarget.querySelector('.fhl-item-tooltip'); if (!currentTooltip) return; currentTooltip.classList.remove('visible'); currentTooltip.style.transform = 'translateX(-50%)'; }); } else { const nameSpan = document.createElement('span'); nameSpan.className = 'fhl-item-name'; nameSpan.textContent = item.name.length > 5 ? item.name.slice(0, 5) + '..' : item.name; link.appendChild(nameSpan); } if (type === 'local') { const controls = document.createElement('div'); controls.className = 'fhl-item-controls'; const deleteBtn = document.createElement('button'); deleteBtn.className = 'fhl-control-btn'; deleteBtn.innerHTML = '×'; deleteBtn.title = '삭제'; deleteBtn.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); let storedItems = shortcutManager.get(); storedItems = storedItems.filter(stored => stored.url !== item.url); shortcutManager.set(storedItems); initialRender(); }); const moveBtn = document.createElement('button'); moveBtn.className = 'fhl-control-btn'; moveBtn.innerHTML = '>'; moveBtn.title = '오른쪽으로 이동'; moveBtn.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); let storedItems = shortcutManager.get(); const currentIndex = storedItems.findIndex(stored => stored.url === item.url); if (currentIndex > -1) { const newIndex = (currentIndex + 1) % storedItems.length; const [movedItem] = storedItems.splice(currentIndex, 1); storedItems.splice(newIndex, 0, movedItem); shortcutManager.set(storedItems); initialRender(); } }); controls.appendChild(deleteBtn); controls.appendChild(moveBtn); link.appendChild(controls); } return link; }; const appendNextPage = () => { if (isLoadingNextPage) return; isLoadingNextPage = true; const startIndex = (currentPage - 1) * ITEMS_PER_PAGE; const endIndex = currentPage * ITEMS_PER_PAGE; if (startIndex >= currentDisplayItems.length) { isLoadingNextPage = false; return; } const itemsToAppend = currentDisplayItems.slice(startIndex, endIndex); itemsToAppend.forEach(item => { searchResultsContainer.appendChild(createIconItem(item, 'search')); }); currentPage++; isLoadingNextPage = false; }; const renderInitialResults = (items) => { searchResultsContainer.innerHTML = ''; currentPage = 1; currentDisplayItems = items; appendNextPage(); }; const performSearch = async (query = '') => { try { const response = await fetch(`${API_BASE_URL}/appapi2.php?query=${encodeURIComponent(query)}`); if (!response.ok) throw new Error('API 응답 오류'); const results = await response.json(); renderInitialResults(results); } catch (error) { console.error('앱 목록 로드 실패:', error); searchResultsContainer.innerHTML = '<p>목록 로드 실패</p>'; } }; const openSearch = () => { widgetContainer.classList.add('search-mode'); widgetWrapper.classList.add('search-mode'); searchInput.focus(); performSearch(); }; const initialRender = () => { const t = translations[currentLang] || translations['en']; const b = [ { name: t.search, url: 'https://isai.kr', icon: 'ph-sparkle' }, { name: t.question, url: 'https://isai.kr/#chat', icon: 'ph-question-mark' }, { name: t.characterChat, url: 'https://zoai.oduc.kr/ko/character/select', icon: 'ph-chats-circle' }, { name: t.translate, url: 'https://translato.isai.kr/', icon: 'ph-translate' }, { name: t.tarot, url: 'https://tarot.isai.kr/', icon: 'ph-cards' }, { name: t.blog, url: 'https://blog.099.kr', icon: 'ph-article-medium' }, { name: t.novel, url: 'https://ranovel.kr/', img: 'https://cdn.jsdelivr.net/npm/cdnhost@2.2.2/__ra.png' }, { name: t.psychology, url: 'https://simpong.oduc.kr/', img: 'http://cdn.jsdelivr.net/npm/cdnhost@2.2.0/_simpong.png' }, { name: t.forum, url: 'https://logig.im', img: 'https://cdn.jsdelivr.net/npm/cdnhost@2.3.9/_______________logig.png' }, { name: t.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(); }; 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)`; }; const checkScrollability = () => { const isScrollable = listContainer.scrollWidth > listContainer.clientWidth; widgetContainer.classList.toggle('scrollable', isScrollable); if (isScrollable) updateScrollIndicator(); }; let isDragging = false; const handleDragMove = (e) => { if (!isDragging) return; e.preventDefault(); const trackRect = indicatorTrack.getBoundingClientRect(); const maxScrollLeft = listContainer.scrollWidth - listContainer.clientWidth; let positionRatio = (e.clientX - trackRect.left) / trackRect.width; positionRatio = Math.max(0, Math.min(1, positionRatio)); listContainer.scrollLeft = positionRatio * maxScrollLeft; }; const handleDragEnd = () => { if (!isDragging) return; isDragging = false; document.removeEventListener('mousemove', handleDragMove); document.removeEventListener('mouseup', handleDragEnd); }; indicatorTrack.addEventListener('mousedown', (e) => { isDragging = true; handleDragMove(e); document.addEventListener('mousemove', handleDragMove); document.addEventListener('mouseup', handleDragEnd); }); const closeSearch = () => { widgetContainer.classList.remove('search-mode'); widgetWrapper.classList.remove('search-mode'); searchInput.value = ''; searchResultsContainer.innerHTML = ''; }; let hideTimeout = null; widgetContainer.addEventListener('mouseenter', () => { clearTimeout(hideTimeout); }); widgetContainer.addEventListener('mouseleave', () => { hideTimeout = setTimeout(() => { widgetContainer.classList.add('hidden'); }, 6000); }); document.addEventListener('click', (e) => { if (!languagePanel.contains(e.target) && !languageBtn.contains(e.target)) { languagePanel.classList.remove('visible'); } if (widgetContainer.contains(e.target)) { return; } if (widgetContainer.classList.contains('hidden')) { setTimeout(() => { widgetContainer.classList.remove('hidden'); clearTimeout(hideTimeout); hideTimeout = setTimeout(() => { widgetContainer.classList.add('hidden'); }, 6000); }, 50); } }); listContainer.addEventListener('scroll', updateScrollIndicator); window.addEventListener('resize', checkScrollability); searchTrigger.addEventListener('click', openSearch); languageBtn.addEventListener('click', (e) => { e.stopPropagation(); languagePanel.classList.toggle('visible'); }); searchInput.addEventListener('input', function() { clearTimeout(searchTimeout); const query = this.value.toLowerCase().trim(); searchTimeout = setTimeout(() => { performSearch(query); }, 300); }); searchResultsContainer.addEventListener('scroll', () => { const isAtBottom = searchResultsContainer.scrollTop + searchResultsContainer.clientHeight >= searchResultsContainer.scrollHeight - 10; if (isAtBottom) { appendNextPage(); } }); searchClose.addEventListener('click', closeSearch); document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && widgetWrapper.classList.contains('search-mode')) { closeSearch(); } }); const addCurrentPageToWidget = async (e) => { e.preventDefault(); const t = translations[currentLang] || translations['en']; const baseUrl = getProcessedUrl(window.location.href); let iconName = document.title || t.currentPage; try { const response = await fetch(`${API_BASE_URL}/get_title.php?url=${encodeURIComponent(baseUrl)}`); if (response.ok) { const data = await response.json(); if (data.title) { iconName = data.title; } } } catch (error) { console.error('Failed to fetch title:', error); } const newIcon = { name: iconName, url: baseUrl }; let storedItems = shortcutManager.get(); const isAlreadyAdded = storedItems.some(item => getProcessedUrl(item.url) === getProcessedUrl(newIcon.url)); if (!isAlreadyAdded) { if (storedItems.length >= 10) { storedItems.shift(); } storedItems.push(newIcon); shortcutManager.set(storedItems); try { await fetch(`${API_BASE_URL}/register_app.php`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(newIcon) }); } catch (error) { console.error('DB 등록/갱신 실패:', error); } initialRender(); if (widgetWrapper.classList.contains('search-mode')) { closeSearch(); } } else { showToast(t.alreadyAdded); } }; const copyWidgetScript = (e) => { e.preventDefault(); const textToCopy = '<script src="https://unpkg.com/@phosphor-icons/web"><\/script> <script src="https://cdn.jsdelivr.net/npm/cdnhost@latest/ws_lg.js"><\/script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cdnhost@latest/ws_css.css"> <div id="app"></div> <script src="https://cdn.jsdelivr.net/npm/cdnhost@latest/ws_cdnhtml.js"><\/script> <script src="https://cdn.jsdelivr.net/npm/cdnhost@latest/ws_cdn.js"><\/script>'; const t = translations[currentLang] || translations['en']; const fallbackCopy = () => { const textArea = document.createElement("textarea"); textArea.value = textToCopy; textArea.style.position = "fixed"; textArea.style.top = 0; textArea.style.left = "-9999px"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { document.execCommand('copy'); showToast(t.codeCopied); } catch (err) { console.error('Fallback: Oops, unable to copy', err); } document.body.removeChild(textArea); }; if (navigator.clipboard && window.isSecureContext) { navigator.clipboard.writeText(textToCopy).then(() => { showToast(t.codeCopied); }).catch(() => { fallbackCopy(); }); } else { fallbackCopy(); } }; addToHomeBtn.addEventListener('click', addCurrentPageToWidget); searchAddBtn.addEventListener('click', copyWidgetScript); shortcutManager.syncFromURL(); shortcutManager.get(); populateLanguagePanel(); applyLanguage(currentLang); });
|
|
1
|
+
document.addEventListener('DOMContentLoaded', function() { if (window.FHLWidgetInitialized) return; window.FHLWidgetInitialized = true; const languages = [ { code: 'ko', name: '한국어' }, { code: 'en', name: 'English' }, { code: 'es', name: 'Español' }, { code: 'hi', name: 'हिन्दी' }, { code: 'ar', name: 'العربية' }, { code: 'de', name: 'Deutsch' }, { code: 'fr', name: 'Français' }, { code: 'pt', name: 'Português' }, { code: 'bn', name: 'বাংলা' }, { code: 'ja', name: '日本語' }, { code: 'ru', name: 'Русский' }, { code: 'zh', name: '简体中文' }, { code: 'th', name: 'ไทย' }, { code: 'vi', name: 'Tiếng Việt' }, { code: 'id', name: 'Indonesia' }, { code: 'tr', name: 'Türkçe' }, { code: 'ur', name: 'اردو' }]; let currentDisplayItems = []; let currentPage = 1; const ITEMS_PER_PAGE = 30; let isLoadingNextPage = false; let searchTimeout = null; const widgetContainer = document.getElementById('fhl-widget-container'); const widgetWrapper = document.getElementById('fhl-widget-wrapper'); const listContainer = document.getElementById('fhl-list-container'); const searchInput = document.getElementById('fhl-search-input'); const searchResultsContainer = document.getElementById('fhl-search-results'); const searchTrigger = document.getElementById('fhl-search-trigger'); const searchClose = document.getElementById('fhl-search-close'); const indicatorTrack = document.getElementById('fhl-indicator-track'); const scrollIndicator = document.getElementById('fhl-scroll-indicator'); const addToHomeBtn = document.getElementById('fhl-add-to-home-btn'); const searchAddBtn = document.getElementById('fhl-search-add-btn'); const toastElement = document.getElementById('fhl-toast-notification'); const languageBtn = document.getElementById('fhl-language-btn'); const languagePanel = document.getElementById('fhl-language-panel'); const fixedQuestionBtn = document.getElementById('fhl-fixed-question'); const fixedChatBtn = document.getElementById('fhl-fixed-chat'); const fixedAdBtn = document.getElementById('fhl-fixed-ad'); const fixedInfoBtn = document.getElementById('fhl-fixed-info'); let toastTimeout = null; let currentLang = localStorage.getItem('fhl-widget-lang') || 'ko'; const API_BASE_URL = 'https://isai.kr'; (function(w,ls,a,b){var K=a('ZmhsLWN1c3RvbS1pY29ucy13aXRoLWV4cGlyeQ==');var G=ls.getItem.bind(ls);var S=ls.setItem.bind(ls);function g(){var r=G(K);if(!r)return[];try{var p=JSON.parse(r);var L=2592000000;if(Date.now()-p.timestamp>L){ls.removeItem(K);return[]}return Array.isArray(p.shortcuts)?p.shortcuts.filter(function(i){return i&&i.name&&i.url;}):[]}catch(e){ls.removeItem(K);return[]}}function s(v){S(K,JSON.stringify({timestamp:Date.now(),shortcuts:v}))}function u(){try{var q=new URLSearchParams(w.location.search).get('shortcuts');if(!q)return;var d=a(q);JSON.parse(d);S(K,d)}catch(e){console.error('Failed to parse shortcuts from URL:',e)}}function gp(){var r=G(K);if(!r)return'';return'shortcuts='+b(r)}w.shortcutManager={key:K,get:g,set:s,syncFromURL:u,getAsParam:gp}})(window,localStorage,atob,btoa); const updateAllWidgetLinks = () => { const paramString = shortcutManager.getAsParam(); if (!paramString) return; const allLinks = document.querySelectorAll('#fhl-widget-container .fhl-icon-display, #fhl-widget-container .fhl-fixed-item'); allLinks.forEach(link => { if (link.tagName === 'A') { const originalHref = link.getAttribute('href'); if (!originalHref || originalHref.startsWith('#')) return; try { let newUrl = new URL(originalHref); const [key, value] = paramString.split('='); newUrl.searchParams.set(key, value); link.href = newUrl.toString(); } catch (e) { console.error('Invalid URL for link update:', originalHref); } } }); }; const showToast = (message) => { clearTimeout(toastTimeout); toastElement.textContent = message; toastElement.classList.add('visible'); toastTimeout = setTimeout(() => { toastElement.classList.remove('visible'); }, 2500); }; const applyLanguage = (langCode) => { if (typeof translations === 'undefined') { console.error("Translations not loaded! Make sure lang.js is included correctly."); return; } const t = translations[langCode] || translations['en']; document.documentElement.lang = langCode; searchTrigger.setAttribute('aria-label', t.openSearch); addToHomeBtn.setAttribute('aria-label', t.addToWidget); searchClose.setAttribute('aria-label', t.closeSearch); languageBtn.setAttribute('aria-label', t.changeLanguage); searchAddBtn.setAttribute('aria-label', 'Copy Widget Code'); fixedQuestionBtn.setAttribute('aria-label', t.question); fixedChatBtn.setAttribute('aria-label', t.characterChat); fixedAdBtn.setAttribute('aria-label', t.ads); fixedInfoBtn.setAttribute('aria-label', t.info); searchInput.placeholder = t.searchPlaceholder; initialRender(); }; const populateLanguagePanel = () => { languagePanel.innerHTML = ''; languages.forEach(lang => { const langItem = document.createElement('a'); langItem.href = '#'; langItem.className = 'fhl-language-item'; langItem.textContent = lang.name; langItem.dataset.lang = lang.code; langItem.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); const newLang = e.target.dataset.lang; if (newLang !== currentLang) { currentLang = newLang; localStorage.setItem('fhl-widget-lang', currentLang); applyLanguage(currentLang); } languagePanel.classList.remove('visible'); }); languagePanel.appendChild(langItem); }); }; const getProcessedUrl = (fullUrl) => { try { const urlObj = new URL(fullUrl); return `${urlObj.protocol}//${urlObj.hostname}`; } catch (e) { return fullUrl; } }; const createIconItem = (item, type = 'default') => { if (!item || !item.name || !item.url) return document.createDocumentFragment(); const link = document.createElement('a'); if (type === 'search') { const paramString = shortcutManager.getAsParam(); let finalUrl = item.url; if (paramString) { try { let newUrl = new URL(item.url); const [key, value] = paramString.split('='); newUrl.searchParams.set(key, value); finalUrl = newUrl.toString(); } catch (e) { console.error('Invalid URL for search result link:', item.url); } } link.href = finalUrl; } else { link.href = item.url; } link.className = 'fhl-icon-display'; link.setAttribute('aria-label', item.name); if (type === 'search') { link.addEventListener('mousedown', () => { fetch(`${API_BASE_URL}/update_view_count.php`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ url: item.url }) }).catch(console.error); }); link.target = '_blank'; } const iconCircle = document.createElement('div'); iconCircle.className = 'fhl-icon-circle'; if (item.icon) { const icon = document.createElement('i'); icon.className = `ph-bold ${item.icon}`; iconCircle.appendChild(icon); } else if (item.img) { const customImage = document.createElement('img'); customImage.src = item.img; customImage.alt = item.name; customImage.onerror = () => { customImage.style.display = 'none'; }; iconCircle.appendChild(customImage); } else { const favicon = document.createElement('img'); favicon.src = `https://www.google.com/s2/favicons?sz=64&domain_url=${item.url}`; favicon.alt = item.name; favicon.onerror = () => { favicon.style.display = 'none'; }; iconCircle.appendChild(favicon); } link.appendChild(iconCircle); if (type === 'search') { const tooltip = document.createElement('div'); tooltip.className = 'fhl-item-tooltip'; tooltip.textContent = item.name.length > 5 ? item.name.slice(0, 5) + '..' : item.name; link.appendChild(tooltip); link.addEventListener('mouseenter', (e) => { const currentTooltip = e.currentTarget.querySelector('.fhl-item-tooltip'); if (!currentTooltip) return; currentTooltip.classList.add('visible'); const widgetRect = widgetWrapper.getBoundingClientRect(); const tooltipRect = currentTooltip.getBoundingClientRect(); let offsetX = 0; const padding = 5; if (tooltipRect.left < widgetRect.left) { offsetX = widgetRect.left - tooltipRect.left + padding; } else if (tooltipRect.right > widgetRect.right) { offsetX = widgetRect.right - tooltipRect.right - padding; } if (offsetX !== 0) { currentTooltip.style.transform = `translateX(calc(-50% + ${offsetX}px))`; } }); link.addEventListener('mouseleave', (e) => { const currentTooltip = e.currentTarget.querySelector('.fhl-item-tooltip'); if (!currentTooltip) return; currentTooltip.classList.remove('visible'); currentTooltip.style.transform = 'translateX(-50%)'; }); } else { const nameSpan = document.createElement('span'); nameSpan.className = 'fhl-item-name'; nameSpan.textContent = item.name.length > 5 ? item.name.slice(0, 5) + '..' : item.name; link.appendChild(nameSpan); } if (type === 'local') { const controls = document.createElement('div'); controls.className = 'fhl-item-controls'; const deleteBtn = document.createElement('button'); deleteBtn.className = 'fhl-control-btn'; deleteBtn.innerHTML = '×'; deleteBtn.title = '삭제'; deleteBtn.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); let storedItems = shortcutManager.get(); storedItems = storedItems.filter(stored => stored.url !== item.url); shortcutManager.set(storedItems); initialRender(); }); const moveBtn = document.createElement('button'); moveBtn.className = 'fhl-control-btn'; moveBtn.innerHTML = '>'; moveBtn.title = '오른쪽으로 이동'; moveBtn.addEventListener('click', (e) => { e.preventDefault(); e.stopPropagation(); let storedItems = shortcutManager.get(); const currentIndex = storedItems.findIndex(stored => stored.url === item.url); if (currentIndex > -1) { const newIndex = (currentIndex + 1) % storedItems.length; const [movedItem] = storedItems.splice(currentIndex, 1); storedItems.splice(newIndex, 0, movedItem); shortcutManager.set(storedItems); initialRender(); } }); controls.appendChild(deleteBtn); controls.appendChild(moveBtn); link.appendChild(controls); } return link; }; const appendNextPage = () => { if (isLoadingNextPage) return; isLoadingNextPage = true; const startIndex = (currentPage - 1) * ITEMS_PER_PAGE; const endIndex = currentPage * ITEMS_PER_PAGE; if (startIndex >= currentDisplayItems.length) { isLoadingNextPage = false; return; } const itemsToAppend = currentDisplayItems.slice(startIndex, endIndex); itemsToAppend.forEach(item => { searchResultsContainer.appendChild(createIconItem(item, 'search')); }); currentPage++; isLoadingNextPage = false; }; const renderInitialResults = (items) => { searchResultsContainer.innerHTML = ''; currentPage = 1; currentDisplayItems = Array.isArray(items) ? items : []; appendNextPage(); }; const performSearch = async (query = '') => { try { const response = await fetch(`${API_BASE_URL}/appapi2.php?query=${encodeURIComponent(query)}`); if (!response.ok) throw new Error('API 응답 오류'); const results = await response.json(); renderInitialResults(results); } catch (error) { console.error('앱 목록 로드 실패:', error); searchResultsContainer.innerHTML = '<p>목록 로드 실패</p>'; } }; const openSearch = () => { widgetContainer.classList.add('search-mode'); widgetWrapper.classList.add('search-mode'); searchInput.focus(); performSearch(); }; const initialRender = () => { const t = translations[currentLang] || translations['en']; const b = [{ name: t.search, url: 'https://isai.kr', icon: 'ph-sparkle' }, { name: t.question, url: 'https://isai.kr/#chat', icon: 'ph-question-mark' }, { name: t.blog, url: 'https://blog.099.kr', icon: 'ph-article-medium' }, { name: t.characterChat, url: 'https://zoai.oduc.kr/ko/character/select', icon: 'ph-chats-circle' }, { name: t.translate, url: 'https://translato.isai.kr/', icon: 'ph-translate' }, { name: t.tarot, url: 'https://tarot.isai.kr/', icon: 'ph-cards' }, { name: t.novel, url: 'https://ranovel.kr/', img: 'https://cdn.jsdelivr.net/npm/cdnhost@2.2.2/__ra.png' }, { name: t.psychology, url: 'https://simpong.oduc.kr/', img: '//cdn.jsdelivr.net/npm/cdnhost@2.2.0/_simpong.png' }, { name: t.forum, url: 'https://logig.im', img: 'https://cdn.jsdelivr.net/npm/cdnhost@2.3.9/_______________logig.png' }, { name: t.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(); }; 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)`; }; const checkScrollability = () => { const isScrollable = listContainer.scrollWidth > listContainer.clientWidth; widgetContainer.classList.toggle('scrollable', isScrollable); if (isScrollable) updateScrollIndicator(); }; let isDragging = false; const handleDragMove = (e) => { if (!isDragging) return; e.preventDefault(); const trackRect = indicatorTrack.getBoundingClientRect(); const maxScrollLeft = listContainer.scrollWidth - listContainer.clientWidth; let positionRatio = (e.clientX - trackRect.left) / trackRect.width; positionRatio = Math.max(0, Math.min(1, positionRatio)); listContainer.scrollLeft = positionRatio * maxScrollLeft; }; const handleDragEnd = () => { if (!isDragging) return; isDragging = false; document.removeEventListener('mousemove', handleDragMove); document.removeEventListener('mouseup', handleDragEnd); }; indicatorTrack.addEventListener('mousedown', (e) => { isDragging = true; handleDragMove(e); document.addEventListener('mousemove', handleDragMove); document.addEventListener('mouseup', handleDragEnd); }); const closeSearch = () => { widgetContainer.classList.remove('search-mode'); widgetWrapper.classList.remove('search-mode'); searchInput.value = ''; searchResultsContainer.innerHTML = ''; }; let hideTimeout = null; widgetContainer.addEventListener('mouseenter', () => { clearTimeout(hideTimeout); }); widgetContainer.addEventListener('mouseleave', () => { hideTimeout = setTimeout(() => { widgetContainer.classList.add('hidden'); }, 6000); }); document.addEventListener('click', (e) => { if (!languagePanel.contains(e.target) && !languageBtn.contains(e.target)) { languagePanel.classList.remove('visible'); } if (widgetContainer.contains(e.target)) { return; } if (widgetContainer.classList.contains('hidden')) { setTimeout(() => { widgetContainer.classList.remove('hidden'); clearTimeout(hideTimeout); hideTimeout = setTimeout(() => { widgetContainer.classList.add('hidden'); }, 6000); }, 50); } }); listContainer.addEventListener('scroll', updateScrollIndicator); window.addEventListener('resize', checkScrollability); searchTrigger.addEventListener('click', openSearch); languageBtn.addEventListener('click', (e) => { e.stopPropagation(); languagePanel.classList.toggle('visible'); }); searchInput.addEventListener('input', function() { clearTimeout(searchTimeout); const query = this.value.toLowerCase().trim(); searchTimeout = setTimeout(() => { performSearch(query); }, 1000); }); searchResultsContainer.addEventListener('scroll', () => { const isAtBottom = searchResultsContainer.scrollTop + searchResultsContainer.clientHeight >= searchResultsContainer.scrollHeight - 10; if (isAtBottom) { appendNextPage(); } }); searchClose.addEventListener('click', closeSearch); document.addEventListener('keydown', (e) => { if (e.key === 'Escape' && widgetWrapper.classList.contains('search-mode')) { closeSearch(); } }); const addCurrentPageToWidget = async (e) => { e.preventDefault(); const t = translations[currentLang] || translations['en']; const baseUrl = getProcessedUrl(window.location.href); let iconName = document.title || t.currentPage; try { const response = await fetch(`${API_BASE_URL}/get_title.php?url=${encodeURIComponent(baseUrl)}`); if (response.ok) { const data = await response.json(); if (data.title) { iconName = data.title; } } } catch (error) { console.error('Failed to fetch title:', error); } const newIcon = { name: iconName, url: baseUrl }; let storedItems = shortcutManager.get(); const isAlreadyAdded = storedItems.some(item => getProcessedUrl(item.url) === getProcessedUrl(newIcon.url)); if (!isAlreadyAdded) { if (storedItems.length >= 10) { storedItems.shift(); } storedItems.push(newIcon); shortcutManager.set(storedItems); try { await fetch(`${API_BASE_URL}/register_app.php`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(newIcon) }); } catch (error) { console.error('DB 등록/갱신 실패:', error); } initialRender(); if (widgetWrapper.classList.contains('search-mode')) { closeSearch(); } } else { showToast(t.alreadyAdded); } }; const copyWidgetScript = (e) => { e.preventDefault(); const textToCopy = '<script src="https://unpkg.com/@phosphor-icons/web"><\/script> <script src="https://cdn.jsdelivr.net/npm/cdnhost@latest/ws_lg.js"><\/script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cdnhost@latest/ws_css.css"> <div id="app"></div> <script src="https://cdn.jsdelivr.net/npm/cdnhost@latest/ws_cdnhtml.js"><\/script> <script src="https://cdn.jsdelivr.net/npm/cdnhost@latest/ws_cdn.js"><\/script>'; const t = translations[currentLang] || translations['en']; const fallbackCopy = () => { const textArea = document.createElement("textarea"); textArea.value = textToCopy; textArea.style.position = "fixed"; textArea.style.top = 0; textArea.style.left = "-9999px"; document.body.appendChild(textArea); textArea.focus(); textArea.select(); try { document.execCommand('copy'); showToast(t.codeCopied); } catch (err) { console.error('Fallback: Oops, unable to copy', err); } document.body.removeChild(textArea); }; if (navigator.clipboard && window.isSecureContext) { navigator.clipboard.writeText(textToCopy).then(() => { showToast(t.codeCopied); }).catch(() => { fallbackCopy(); }); } else { fallbackCopy(); } }; addToHomeBtn.addEventListener('click', addCurrentPageToWidget); searchAddBtn.addEventListener('click', copyWidgetScript); shortcutManager.syncFromURL(); shortcutManager.get(); populateLanguagePanel(); applyLanguage(currentLang); });
|
package/ws_lg.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
// lang.js
|
|
2
2
|
const translations = {
|
|
3
|
-
ko: { search: '검색', question: '질문', forum: '포럼', blog: '블로그', characterChat: '캐릭터챗', translate: '번역', tarot: '타로', psychology: '심리', ads: '광고', openSearch: '검색 열기', addToWidget: '위젯에 추가', closeSearch: '검색 닫기', changeLanguage: '언어 변경', images: '이미지', searchPlaceholder: '검색...', alreadyAdded: '이미 위젯에 추가된 페이지입니다.', currentPage: '현재 페이지', codeCopied: '코드가 복사되었습니다. 사이트에 붙여 넣어 주세요.' },
|
|
4
|
-
en: { search: 'Search', question: 'Question', forum: 'Forum', blog: 'Blog', characterChat: 'CharacterChat', translate: 'Translate', tarot: 'Tarot', psychology: 'Psychology', ads: 'Ads', openSearch: 'Open Search', addToWidget: 'Add to Widget', closeSearch: 'Close Search', changeLanguage: 'Change Language', images: 'Images', searchPlaceholder: 'Search...', alreadyAdded: 'This page has already been added to the widget.', currentPage: 'Current Page', codeCopied: 'Code copied. Please paste it into your site.' },
|
|
5
|
-
es: { search: 'Buscar', question: 'Pregunta', forum: 'Foro', blog: 'Blog', characterChat: 'Chat de Personajes', translate: 'Traducir', tarot: 'Tarot', psychology: 'Psicología', ads: 'Anuncios', openSearch: 'Abrir Búsqueda', addToWidget: 'Añadir al Widget', closeSearch: 'Cerrar Búsqueda', changeLanguage: 'Cambiar Idioma', images: 'Imágenes', searchPlaceholder: 'Buscar...', alreadyAdded: 'Esta página ya ha sido añadida al widget.', currentPage: 'Página Actual', codeCopied: 'Código copiado. Péguelo en su sitio.' },
|
|
6
|
-
hi: { search: 'खोज', question: 'प्रश्न', forum: 'मंच', blog: 'ब्लॉग', characterChat: 'कैरेक्टरचैट', translate: 'अनुवाद', tarot: 'टैरो', psychology: 'मनोविज्ञान', ads: 'विज्ञापन', openSearch: 'खोज खोलें', addToWidget: 'विजेट में जोड़ें', closeSearch: 'खोज बंद करें', changeLanguage: 'भाषा बदलें', images: 'छवियाँ', searchPlaceholder: 'खोजें...', alreadyAdded: 'यह पृष्ठ पहले से ही विजेट में जोड़ा जा चुका है।', currentPage: 'वर्तमान पृष्ठ', codeCopied: 'कोड कॉपी हो गया। कृपया इसे अपनी साइट पर पेस्ट करें।' },
|
|
7
|
-
ar: { search: 'بحث', question: 'سؤال', forum: 'منتدى', blog: 'مدونة', characterChat: 'دردشة شخصية', translate: 'ترجمة', tarot: 'تاروت', psychology: 'علم النفس', ads: 'إعلانات', openSearch: 'فتح البحث', addToWidget: 'أضف إلى الويدجت', closeSearch: 'إغلاق البحث', changeLanguage: 'تغيير اللغة', images: 'صور', searchPlaceholder: 'بحث...', alreadyAdded: 'تمت إضافة هذه الصفحة بالفعل إلى الويدجت.', currentPage: 'الصفحة الحالية', codeCopied: 'تم نسخ الرمز. يرجى لصقه في موقعك.' },
|
|
8
|
-
de: { search: 'Suche', question: 'Frage', forum: 'Forum', blog: 'Blog', characterChat: 'Charakter-Chat', translate: 'Übersetzen', tarot: 'Tarot', psychology: 'Psychologie', ads: 'Anzeigen', openSearch: 'Suche öffnen', addToWidget: 'Zum Widget hinzufügen', closeSearch: 'Suche schließen', changeLanguage: 'Sprache ändern', images: 'Bilder', searchPlaceholder: 'Suchen...', alreadyAdded: 'Diese Seite wurde bereits zum Widget hinzugefügt.', currentPage: 'Aktuelle Seite', codeCopied: 'Code kopiert. Bitte fügen Sie ihn auf Ihrer Seite ein.' },
|
|
9
|
-
fr: { search: 'Recherche', question: 'Question', forum: 'Forum', blog: 'Blog', characterChat: 'Chat de Personnage', translate: 'Traduire', tarot: 'Tarot', psychology: 'Psychologie', ads: 'Publicités', openSearch: 'Ouvrir la Recherche', addToWidget: 'Ajouter au Widget', closeSearch: 'Fermer la Recherche', changeLanguage: 'Changer de Langue', images: 'Images', searchPlaceholder: 'Rechercher...', alreadyAdded: 'Cette page a déjà été ajoutée au widget.', currentPage: 'Page Actuelle', codeCopied: 'Code copié. Veuillez le coller sur votre site.' },
|
|
10
|
-
pt: { search: 'Pesquisa', question: 'Pergunta', forum: 'Fórum', blog: 'Blog', characterChat: 'Chat de Personagem', translate: 'Traduzir', tarot: 'Tarô', psychology: 'Psicologia', ads: 'Anúncios', openSearch: 'Abrir Pesquisa', addToWidget: 'Adicionar ao Widget', closeSearch: 'Fechar Pesquisa', changeLanguage: 'Mudar Idioma', images: 'Imagens', searchPlaceholder: 'Pesquisar...', alreadyAdded: 'Esta página já foi adicionada ao widget.', currentPage: 'Página Atual', codeCopied: 'Código copiado. Por favor, cole no seu site.' },
|
|
11
|
-
bn: { search: 'অনুসন্ধান', question: 'প্রশ্ন', forum: 'ফোরাম', blog: 'ব্লগ', characterChat: 'ক্যারেক্টারচ্যাট', translate: 'অনুবাদ', tarot: 'ট্যারোট', psychology: 'মনোবিজ্ঞান', ads: 'বিজ্ঞাপন', openSearch: 'অনুসন্ধান খুলুন', addToWidget: 'উইজেটে যোগ করুন', closeSearch: 'অনুসন্ধান বন্ধ করুন', changeLanguage: 'ভাষা পরিবর্তন করুন', images: 'ছবি', searchPlaceholder: 'অনুসন্ধান...', alreadyAdded: 'এই পৃষ্ঠাটি ইতিমধ্যে উইজেটে যোগ করা হয়েছে।', currentPage: 'বর্তমান পৃষ্ঠা', codeCopied: 'কোড কপি করা হয়েছে। আপনার সাইটে পেস্ট করুন।' },
|
|
12
|
-
ja: { search: '検索', question: '質問', forum: 'フォーラム', blog: 'ブログ', characterChat: 'キャラクターチャット', translate: '翻訳', tarot: 'タロット', psychology: '心理学', ads: '広告', openSearch: '検索を開く', addToWidget: 'ウィジェットに追加', closeSearch: '検索を閉じる', changeLanguage: '言語を変更', images: '画像', searchPlaceholder: '検索...', alreadyAdded: 'このページは既に追加されています。', currentPage: '現在のページ', codeCopied: 'コードがコピーされました。サイトに貼り付けてください。' },
|
|
13
|
-
ru: { search: 'Поиск', question: 'Вопрос', forum: 'Форум', blog: 'Блог', characterChat: 'Чат с персонажем', translate: 'Перевод', tarot: 'Таро', psychology: 'Психология', ads: 'Реклама', openSearch: 'Открыть поиск', addToWidget: 'Добавить в виджет', closeSearch: 'Закрыть поиск', changeLanguage: 'Сменить язык', images: 'Изображения', searchPlaceholder: 'Поиск...', alreadyAdded: 'Эта страница уже добавлена в виджет.', currentPage: 'Текущая страница', codeCopied: 'Код скопирован. Пожалуйста, вставьте его на свой сайт.' },
|
|
14
|
-
zh: { search: '搜索', question: '问题', forum: '论坛', blog: '博客', characterChat: '角色聊天', translate: '翻译', tarot: '塔罗牌', psychology: '心理学', ads: '广告', openSearch: '打开搜索', addToWidget: '添加到小组件', closeSearch: '关闭搜索', changeLanguage: '更改语言', images: '图片', searchPlaceholder: '搜索...', alreadyAdded: '此页面已添加到小组件。', currentPage: '当前页面', codeCopied: '代码已复制。请将其粘贴到您的网站中。' },
|
|
15
|
-
th: { search: 'ค้นหา', question: 'คำถาม', forum: 'ฟอรัม', blog: 'บล็อก', characterChat: 'แชทตัวละคร', translate: 'แปล', tarot: 'ไพ่ทาโรต์', psychology: 'จิตวิทยา', ads: 'โฆษณา', openSearch: 'เปิดการค้นหา', addToWidget: 'เพิ่มในวิดเจ็ต', closeSearch: 'ปิดการค้นหา', changeLanguage: 'เปลี่ยนภาษา', images: 'รูปภาพ', searchPlaceholder: 'ค้นหา...', alreadyAdded: 'หน้านี้ถูกเพิ่มในวิดเจ็ตแล้ว', currentPage: 'หน้าปัจจุบัน', codeCopied: 'คัดลอกโค้ดแล้ว โปรดวางลงในไซต์ของคุณ' },
|
|
16
|
-
vi: { search: 'Tìm kiếm', question: 'Câu hỏi', forum: 'Diễn đàn', blog: 'Blog', characterChat: 'Trò chuyện nhân vật', translate: 'Dịch', tarot: 'Tarot', psychology: 'Tâm lý học', ads: 'Quảng cáo', openSearch: 'Mở tìm kiếm', addToWidget: 'Thêm vào tiện ích', closeSearch: 'Đóng tìm kiếm', changeLanguage: 'Đổi ngôn ngữ', images: 'Hình ảnh', searchPlaceholder: 'Tìm kiếm...', alreadyAdded: 'Trang này đã được thêm vào tiện ích.', currentPage: 'Trang hiện tại', codeCopied: 'Đã sao chép mã. Vui lòng dán vào trang web của bạn.' },
|
|
17
|
-
id: { search: 'Cari', question: 'Pertanyaan', forum: 'Forum', blog: 'Blog', characterChat: 'Obrolan Karakter', translate: 'Terjemahkan', tarot: 'Tarot', psychology: 'Psikologi', ads: 'Iklan', openSearch: 'Buka Pencarian', addToWidget: 'Tambah ke Widget', closeSearch: 'Tutup Pencarian', changeLanguage: 'Ubah Bahasa', images: 'Gambar', searchPlaceholder: 'Cari...', alreadyAdded: 'Halaman ini sudah ditambahkan ke widget.', currentPage: 'Halaman Saat Ini', codeCopied: 'Kode disalin. Silakan tempel di situs Anda.' },
|
|
18
|
-
tr: { search: 'Ara', question: 'Soru', forum: 'Forum', blog: 'Blog', characterChat: 'Karakter Sohbeti', translate: 'Çevir', tarot: 'Tarot', psychology: 'Psikoloji', ads: 'Reklamlar', openSearch: 'Aramayı Aç', addToWidget: 'Widget\'a Ekle', closeSearch: 'Aramayı Kapat', changeLanguage: 'Dili Değiştir', images: 'Görseller', searchPlaceholder: 'Ara...', alreadyAdded: 'Bu sayfa zaten widget\'a eklenmiş.', currentPage: 'Mevcut Sayfa', codeCopied: 'Kod kopyalandı. Lütfen sitenize yapıştırın.' },
|
|
19
|
-
ur: { search: 'تلاش', question: 'سوال', forum: 'فورم', blog: 'بلاگ', characterChat: 'کردار چیٹ', translate: 'ترجمہ', tarot: 'ٹیرو', psychology: 'نفسیات', ads: 'اشتہارات', openSearch: 'تلاش کھولیں', addToWidget: 'ویجیٹ میں شامل کریں', closeSearch: 'تلاش بند کریں', changeLanguage: 'زبان تبدیل کریں', images: 'تصاویر', searchPlaceholder: 'تلاش کریں...', alreadyAdded: 'یہ صفحہ پہلے ہی
|
|
3
|
+
ko: { search: '검색', question: '질문', forum: '포럼', blog: '블로그', characterChat: '캐릭터챗', translate: '번역', tarot: '타로', psychology: '심리', ads: '광고', novel: '소설', openSearch: '검색 열기', addToWidget: '위젯에 추가', closeSearch: '검색 닫기', changeLanguage: '언어 변경', images: '이미지', searchPlaceholder: '검색...', alreadyAdded: '이미 위젯에 추가된 페이지입니다.', currentPage: '현재 페이지', codeCopied: '코드가 복사되었습니다. 사이트에 붙여 넣어 주세요.', info: '정보' },
|
|
4
|
+
en: { search: 'Search', question: 'Question', forum: 'Forum', blog: 'Blog', characterChat: 'CharacterChat', translate: 'Translate', tarot: 'Tarot', psychology: 'Psychology', ads: 'Ads', novel: 'Novel', openSearch: 'Open Search', addToWidget: 'Add to Widget', closeSearch: 'Close Search', changeLanguage: 'Change Language', images: 'Images', searchPlaceholder: 'Search...', alreadyAdded: 'This page has already been added to the widget.', currentPage: 'Current Page', codeCopied: 'Code copied. Please paste it into your site.', info: 'Information' },
|
|
5
|
+
es: { search: 'Buscar', question: 'Pregunta', forum: 'Foro', blog: 'Blog', characterChat: 'Chat de Personajes', translate: 'Traducir', tarot: 'Tarot', psychology: 'Psicología', ads: 'Anuncios', novel: 'Novela', openSearch: 'Abrir Búsqueda', addToWidget: 'Añadir al Widget', closeSearch: 'Cerrar Búsqueda', changeLanguage: 'Cambiar Idioma', images: 'Imágenes', searchPlaceholder: 'Buscar...', alreadyAdded: 'Esta página ya ha sido añadida al widget.', currentPage: 'Página Actual', codeCopied: 'Código copiado. Péguelo en su sitio.', info: 'Información' },
|
|
6
|
+
hi: { search: 'खोज', question: 'प्रश्न', forum: 'मंच', blog: 'ब्लॉग', characterChat: 'कैरेक्टरचैट', translate: 'अनुवाद', tarot: 'टैरो', psychology: 'मनोविज्ञान', ads: 'विज्ञापन', novel: 'उपन्यास', openSearch: 'खोज खोलें', addToWidget: 'विजेट में जोड़ें', closeSearch: 'खोज बंद करें', changeLanguage: 'भाषा बदलें', images: 'छवियाँ', searchPlaceholder: 'खोजें...', alreadyAdded: 'यह पृष्ठ पहले से ही विजेट में जोड़ा जा चुका है।', currentPage: 'वर्तमान पृष्ठ', codeCopied: 'कोड कॉपी हो गया। कृपया इसे अपनी साइट पर पेस्ट करें।', info: 'जानकारी' },
|
|
7
|
+
ar: { search: 'بحث', question: 'سؤال', forum: 'منتدى', blog: 'مدونة', characterChat: 'دردشة شخصية', translate: 'ترجمة', tarot: 'تاروت', psychology: 'علم النفس', ads: 'إعلانات', novel: 'رواية', openSearch: 'فتح البحث', addToWidget: 'أضف إلى الويدجت', closeSearch: 'إغلاق البحث', changeLanguage: 'تغيير اللغة', images: 'صور', searchPlaceholder: 'بحث...', alreadyAdded: 'تمت إضافة هذه الصفحة بالفعل إلى الويدجت.', currentPage: 'الصفحة الحالية', codeCopied: 'تم نسخ الرمز. يرجى لصقه في موقعك.', info: 'معلومات' },
|
|
8
|
+
de: { search: 'Suche', question: 'Frage', forum: 'Forum', blog: 'Blog', characterChat: 'Charakter-Chat', translate: 'Übersetzen', tarot: 'Tarot', psychology: 'Psychologie', ads: 'Anzeigen', novel: 'Roman', openSearch: 'Suche öffnen', addToWidget: 'Zum Widget hinzufügen', closeSearch: 'Suche schließen', changeLanguage: 'Sprache ändern', images: 'Bilder', searchPlaceholder: 'Suchen...', alreadyAdded: 'Diese Seite wurde bereits zum Widget hinzugefügt.', currentPage: 'Aktuelle Seite', codeCopied: 'Code kopiert. Bitte fügen Sie ihn auf Ihrer Seite ein.', info: 'Information' },
|
|
9
|
+
fr: { search: 'Recherche', question: 'Question', forum: 'Forum', blog: 'Blog', characterChat: 'Chat de Personnage', translate: 'Traduire', tarot: 'Tarot', psychology: 'Psychologie', ads: 'Publicités', novel: 'Roman', openSearch: 'Ouvrir la Recherche', addToWidget: 'Ajouter au Widget', closeSearch: 'Fermer la Recherche', changeLanguage: 'Changer de Langue', images: 'Images', searchPlaceholder: 'Rechercher...', alreadyAdded: 'Cette page a déjà été ajoutée au widget.', currentPage: 'Page Actuelle', codeCopied: 'Code copié. Veuillez le coller sur votre site.', info: 'Information' },
|
|
10
|
+
pt: { search: 'Pesquisa', question: 'Pergunta', forum: 'Fórum', blog: 'Blog', characterChat: 'Chat de Personagem', translate: 'Traduzir', tarot: 'Tarô', psychology: 'Psicologia', ads: 'Anúncios', novel: 'Romance', openSearch: 'Abrir Pesquisa', addToWidget: 'Adicionar ao Widget', closeSearch: 'Fechar Pesquisa', changeLanguage: 'Mudar Idioma', images: 'Imagens', searchPlaceholder: 'Pesquisar...', alreadyAdded: 'Esta página já foi adicionada ao widget.', currentPage: 'Página Atual', codeCopied: 'Código copiado. Por favor, cole no seu site.', info: 'Informação' },
|
|
11
|
+
bn: { search: 'অনুসন্ধান', question: 'প্রশ্ন', forum: 'ফোরাম', blog: 'ব্লগ', characterChat: 'ক্যারেক্টারচ্যাট', translate: 'অনুবাদ', tarot: 'ট্যারোট', psychology: 'মনোবিজ্ঞান', ads: 'বিজ্ঞাপন', novel: 'উপন্যাস', openSearch: 'অনুসন্ধান খুলুন', addToWidget: 'উইজেটে যোগ করুন', closeSearch: 'অনুসন্ধান বন্ধ করুন', changeLanguage: 'ভাষা পরিবর্তন করুন', images: 'ছবি', searchPlaceholder: 'অনুসন্ধান...', alreadyAdded: 'এই পৃষ্ঠাটি ইতিমধ্যে উইজেটে যোগ করা হয়েছে।', currentPage: 'বর্তমান পৃষ্ঠা', codeCopied: 'কোড কপি করা হয়েছে। আপনার সাইটে পেস্ট করুন।', info: 'তথ্য' },
|
|
12
|
+
ja: { search: '検索', question: '質問', forum: 'フォーラム', blog: 'ブログ', characterChat: 'キャラクターチャット', translate: '翻訳', tarot: 'タロット', psychology: '心理学', ads: '広告', novel: '小説', openSearch: '検索を開く', addToWidget: 'ウィジェットに追加', closeSearch: '検索を閉じる', changeLanguage: '言語を変更', images: '画像', searchPlaceholder: '検索...', alreadyAdded: 'このページは既に追加されています。', currentPage: '現在のページ', codeCopied: 'コードがコピーされました。サイトに貼り付けてください。', info: '情報' },
|
|
13
|
+
ru: { search: 'Поиск', question: 'Вопрос', forum: 'Форум', blog: 'Блог', characterChat: 'Чат с персонажем', translate: 'Перевод', tarot: 'Таро', psychology: 'Психология', ads: 'Реклама', novel: 'Роман', openSearch: 'Открыть поиск', addToWidget: 'Добавить в виджет', closeSearch: 'Закрыть поиск', changeLanguage: 'Сменить язык', images: 'Изображения', searchPlaceholder: 'Поиск...', alreadyAdded: 'Эта страница уже добавлена в виджет.', currentPage: 'Текущая страница', codeCopied: 'Код скопирован. Пожалуйста, вставьте его на свой сайт.', info: 'Информация' },
|
|
14
|
+
zh: { search: '搜索', question: '问题', forum: '论坛', blog: '博客', characterChat: '角色聊天', translate: '翻译', tarot: '塔罗牌', psychology: '心理学', ads: '广告', novel: '小说', openSearch: '打开搜索', addToWidget: '添加到小组件', closeSearch: '关闭搜索', changeLanguage: '更改语言', images: '图片', searchPlaceholder: '搜索...', alreadyAdded: '此页面已添加到小组件。', currentPage: '当前页面', codeCopied: '代码已复制。请将其粘贴到您的网站中。', info: '信息' },
|
|
15
|
+
th: { search: 'ค้นหา', question: 'คำถาม', forum: 'ฟอรัม', blog: 'บล็อก', characterChat: 'แชทตัวละคร', translate: 'แปล', tarot: 'ไพ่ทาโรต์', psychology: 'จิตวิทยา', ads: 'โฆษณา', novel: 'นิยาย', openSearch: 'เปิดการค้นหา', addToWidget: 'เพิ่มในวิดเจ็ต', closeSearch: 'ปิดการค้นหา', changeLanguage: 'เปลี่ยนภาษา', images: 'รูปภาพ', searchPlaceholder: 'ค้นหา...', alreadyAdded: 'หน้านี้ถูกเพิ่มในวิดเจ็ตแล้ว', currentPage: 'หน้าปัจจุบัน', codeCopied: 'คัดลอกโค้ดแล้ว โปรดวางลงในไซต์ของคุณ', info: 'ข้อมูล' },
|
|
16
|
+
vi: { search: 'Tìm kiếm', question: 'Câu hỏi', forum: 'Diễn đàn', blog: 'Blog', characterChat: 'Trò chuyện nhân vật', translate: 'Dịch', tarot: 'Tarot', psychology: 'Tâm lý học', ads: 'Quảng cáo', novel: 'Tiểu thuyết', openSearch: 'Mở tìm kiếm', addToWidget: 'Thêm vào tiện ích', closeSearch: 'Đóng tìm kiếm', changeLanguage: 'Đổi ngôn ngữ', images: 'Hình ảnh', searchPlaceholder: 'Tìm kiếm...', alreadyAdded: 'Trang này đã được thêm vào tiện ích.', currentPage: 'Trang hiện tại', codeCopied: 'Đã sao chép mã. Vui lòng dán vào trang web của bạn.', info: 'Thông tin' },
|
|
17
|
+
id: { search: 'Cari', question: 'Pertanyaan', forum: 'Forum', blog: 'Blog', characterChat: 'Obrolan Karakter', translate: 'Terjemahkan', tarot: 'Tarot', psychology: 'Psikologi', ads: 'Iklan', novel: 'Novel', openSearch: 'Buka Pencarian', addToWidget: 'Tambah ke Widget', closeSearch: 'Tutup Pencarian', changeLanguage: 'Ubah Bahasa', images: 'Gambar', searchPlaceholder: 'Cari...', alreadyAdded: 'Halaman ini sudah ditambahkan ke widget.', currentPage: 'Halaman Saat Ini', codeCopied: 'Kode disalin. Silakan tempel di situs Anda.', info: 'Informasi' },
|
|
18
|
+
tr: { search: 'Ara', question: 'Soru', forum: 'Forum', blog: 'Blog', characterChat: 'Karakter Sohbeti', translate: 'Çevir', tarot: 'Tarot', psychology: 'Psikoloji', ads: 'Reklamlar', novel: 'Roman', openSearch: 'Aramayı Aç', addToWidget: 'Widget\'a Ekle', closeSearch: 'Aramayı Kapat', changeLanguage: 'Dili Değiştir', images: 'Görseller', searchPlaceholder: 'Ara...', alreadyAdded: 'Bu sayfa zaten widget\'a eklenmiş.', currentPage: 'Mevcut Sayfa', codeCopied: 'Kod kopyalandı. Lütfen sitenize yapıştırın.', info: 'Bilgi' },
|
|
19
|
+
ur: { search: 'تلاش', question: 'سوال', forum: 'فورم', blog: 'بلاگ', characterChat: 'کردار چیٹ', translate: 'ترجمہ', tarot: 'ٹیرو', psychology: 'نفسیات', ads: 'اشتہارات', novel: 'ناول', openSearch: 'تلاش کھولیں', addToWidget: 'ویجیٹ میں شامل کریں', closeSearch: 'تلاش بند کریں', changeLanguage: 'زبان تبدیل کریں', images: 'تصاویر', searchPlaceholder: 'تلاش کریں...', alreadyAdded: 'یہ صفحہ پہلے ہی ویجیٹ میں شامل ہے۔', currentPage: 'موجودہ صفحہ', codeCopied: 'کوڈ کاپی ہوگیا ہے۔ براہ کرم اسے اپنی سائٹ پر چسپاں کریں۔', info: 'معلومات' }
|
|
20
20
|
};
|