/
githubmirror
/
obsidian-help
Обзор
Документация
Войти
/
githubmirror
/
obsidian-help
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
th/publish.strings.js
27 строк
1 KB
kepano
Add language search
05 авг 2026, 01:35
05 авг 2026, 01:35
b254ef7
Код
Авторство
О чём код?
// Locale UI strings — Thai window.LANG_SWITCHER_STRINGS = { search: "เปลี่ยนภาษา...", noResults: "ไม่พบผลลัพธ์" }; (function () { function apply() { var el; el = document.querySelector('.search-bar'); if (!el) return false; el.placeholder = 'ค้นหา...'; el = document.querySelector('.site-footer a'); if (el) { el.textContent = 'สร้างด้วย Obsidian Publish'; el.href = 'https://obsidian.md/th/publish'; } el = document.querySelector('.graph-view-outer span:last-child'); if (el) el.textContent = 'กราฟเชิงโต้ตอบ'; el = document.querySelector('.graph-expand'); if (el) el.setAttribute('aria-label', 'ขยาย'); el = document.querySelector('.graph-global'); if (el) el.setAttribute('aria-label', 'กราฟทั้งหมด'); el = document.querySelector('.outline-view-outer span:last-child'); if (el) el.textContent = 'ในหน้านี้'; return true; } function poll() { if (!apply()) requestAnimationFrame(poll); } poll(); var blText = 'ลิงก์ไปยังหน้านี้'; function applyBl() { document.querySelectorAll('.backlinks span:last-child').forEach(function(e) { if (e.textContent !== blText) e.textContent = blText; }); } new MutationObserver(applyBl).observe(document.body, { childList: true, subtree: true }); applyBl(); })();