Skip to content

Commit e857eab

Browse files
release: update version to 3.6.3 and sync desktop resources
1 parent 2831d38 commit e857eab

6 files changed

Lines changed: 543 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ Non-code commits (documentation, planning, README-only updates) are excluded.
55

66
---
77

8+
## v3.6.3
9+
10+
- **Description:** Updated application version to 3.6.3 and rotated cache namespace. Adjusted the font sizes of import, export, and language selector options in the header dropdowns to match the stats-container. Unified the language selector formatting across web and mobile layouts by displaying full language names on all devices instead of country flags on mobile.
11+
- **Date:** 2026-05-27
12+
- **URL:** https://github.com/ThisIs-Developer/Markdown-Viewer/commit/v3.6.3
13+
14+
---
15+
816
## v3.6.2
917

1018
- **Description:** Systematically remediated and stabilized major performance bottlenecks across both web and desktop environments. Eliminated forced synchronous layout calculations (layout thrashing) in editor line gutter updates by implementing an in-memory `lineCache` Map inside `script.js` to store monospace text wrapping heights, dropping Total Blocking Time (TBT) during rapid typing from over 1500ms to under 15ms. Optimized initial payload weight by removing three heavy, unused dependencies (`html2pdf.bundle.min.js`, `pdfmake.min.js`, and `vfs_fonts.js`) from `index.html`, saving approximately 3.0 MB. Deferred the loading of all remaining external JavaScript libraries inside `<head>` to unblock HTML parsing, reducing First Contentful Paint (FCP) to under 0.6 seconds. Established early network preconnections and DNS prefetching for `cdnjs.cloudflare.com` and `cdn.jsdelivr.net`. Implemented an offline-first Progressive Web App (PWA) architecture by deploying `sw.js` (Service Worker) to cache local shell files and all external CDN stylesheets and scripts, yielding full offline functionality and instant Subsequent Time to Interactive (TTI) on mobile and desktop viewports. Refactored the Service Worker (sw.js) to employ a Stale-While-Revalidate (SWR) caching strategy for local application files (index.html, script.js, styles.css), serving assets instantly from the disk cache while asynchronously retrieving updates from the network. Maintained a strict Cache-First strategy for versioned stable third-party CDN libraries to avoid redundant network checks. Configured version-keyed cache namespaces (markdown-viewer-cache-v3.6.2) to support clean cache activation and stale cache invalidation in the background.

desktop-app/resources/index.html

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,23 @@
99
<link rel="dns-prefetch" href="https://cdnjs.cloudflare.com">
1010
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
1111

12+
<!-- Canonical Link -->
13+
<link rel="canonical" href="https://markdownviewer.pages.dev/">
14+
15+
<!-- Multilingual Hreflang Tags for Search Crawlers -->
16+
<link rel="alternate" hreflang="x-default" href="https://markdownviewer.pages.dev/" />
17+
<link rel="alternate" hreflang="en" href="https://markdownviewer.pages.dev/?lang=en" />
18+
<link rel="alternate" hreflang="zh-Hans" href="https://markdownviewer.pages.dev/?lang=zh" />
19+
<link rel="alternate" hreflang="ja" href="https://markdownviewer.pages.dev/?lang=ja" />
20+
<link rel="alternate" hreflang="ko" href="https://markdownviewer.pages.dev/?lang=ko" />
21+
22+
<!-- Asian Search Engine Verification Meta Tags -->
23+
<meta name="baidu-site-verification" content="baidu_verification_code_placeholder" />
24+
<meta name="naver-site-verification" content="naver_verification_code_placeholder" />
25+
26+
<!-- PWA Web Manifest -->
27+
<link rel="manifest" href="manifest.json">
28+
1229
<!-- Primary Meta Tags -->
1330
<meta name="title" content="Markdown Viewer">
1431
<meta name="description" content="Markdown Viewer is a powerful GitHub-style Markdown rendering tool with live preview, LaTeX math, Mermaid diagrams, syntax highlighting, dark mode, and export options to PDF, HTML, and MD—all fully client-side and secure.">
@@ -33,6 +50,31 @@
3350
<meta property="twitter:description" content="Markdown Viewer is a powerful GitHub-style Markdown rendering tool with live preview, LaTeX math, Mermaid diagrams, syntax highlighting, dark mode, and export options to PDF, HTML, and MD—all fully client-side and secure.">
3451
<meta property="twitter:image" content="https://markdownviewer.pages.dev/assets/icon.jpg">
3552

53+
<!-- JSON-LD Structured Data Schema for Search Rich Snippets -->
54+
<script type="application/ld+json">
55+
{
56+
"@context": "https://schema.org",
57+
"@type": "WebApplication",
58+
"name": "Markdown Viewer",
59+
"url": "https://markdownviewer.pages.dev/",
60+
"image": "https://markdownviewer.pages.dev/assets/icon.jpg",
61+
"description": "A powerful GitHub-style Markdown rendering tool with live preview, LaTeX, Mermaid, syntax highlighting, and PDF export.",
62+
"applicationCategory": "DeveloperApplication",
63+
"operatingSystem": "All",
64+
"browserRequirements": "Requires HTML5 compatible browser",
65+
"author": {
66+
"@type": "Organization",
67+
"name": "ThisIs-Developer",
68+
"url": "https://github.com/ThisIs-Developer"
69+
},
70+
"offers": {
71+
"@type": "Offer",
72+
"price": "0.00",
73+
"priceCurrency": "USD"
74+
}
75+
}
76+
</script>
77+
3678
<title>Markdown Viewer</title>
3779
<link href="/assets/icon.jpg" rel="icon" type="image/jpg">
3880
<!-- Updated libraries to latest versions with Subresource Integrity (SRI) -->
@@ -81,13 +123,13 @@ <h1 class="h4 mb-0 me-2">Markdown Viewer</h1>
81123
</a>
82124
<div id="stats-container" class="stats-container d-flex align-items-center d-none d-md-flex">
83125
<div class="stat-item me-3">
84-
<i class="bi bi-clock me-1"></i> <span id="reading-time">0</span> Min Read
126+
<i class="bi bi-clock me-1"></i> <span id="reading-time">0</span> <span id="lbl-min-read">Min Read</span>
85127
</div>
86128
<div class="stat-item me-3">
87-
<i class="bi bi-text-paragraph me-1"></i> <span id="word-count">0</span> Words
129+
<i class="bi bi-text-paragraph me-1"></i> <span id="word-count">0</span> <span id="lbl-words">Words</span>
88130
</div>
89131
<div class="stat-item">
90-
<i class="bi bi-fonts me-1"></i> <span id="char-count">0</span> Chars
132+
<i class="bi bi-fonts me-1"></i> <span id="char-count">0</span> <span id="lbl-chars">Chars</span>
91133
</div>
92134
</div>
93135
</div>
@@ -139,6 +181,18 @@ <h1 class="h4 mb-0 me-2">Markdown Viewer</h1>
139181
<i class="bi bi-share"></i> <span class="btn-text">Share</span>
140182
</button>
141183

184+
<div class="dropdown me-1">
185+
<button class="tool-button dropdown-toggle" type="button" id="languageDropdown" data-bs-toggle="dropdown" aria-expanded="false" title="Switch Language">
186+
<i class="bi bi-translate"></i> <span id="current-lang-label" class="btn-text">English</span>
187+
</button>
188+
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="languageDropdown">
189+
<li><a class="dropdown-item lang-select-item active" href="#" data-lang="en">🇺🇸 English</a></li>
190+
<li><a class="dropdown-item lang-select-item" href="#" data-lang="zh">🇨🇳 简体中文</a></li>
191+
<li><a class="dropdown-item lang-select-item" href="#" data-lang="ja">🇯🇵 日本語</a></li>
192+
<li><a class="dropdown-item lang-select-item" href="#" data-lang="ko">🇰🇷 한국어</a></li>
193+
</ul>
194+
</div>
195+
142196
<button id="theme-toggle" class="tool-button" title="Toggle Dark Mode">
143197
<i class="bi bi-moon"></i>
144198
</button>
@@ -192,13 +246,13 @@ <h5>Menu</h5>
192246

193247
<div class="mobile-stats-container mb-3">
194248
<div class="stat-item mb-2">
195-
<i class="bi bi-clock me-1"></i> <span id="mobile-reading-time">0</span> Min Read
249+
<i class="bi bi-clock me-1"></i> <span id="mobile-reading-time">0</span> <span id="lbl-mobile-min-read">Min Read</span>
196250
</div>
197251
<div class="stat-item mb-2">
198-
<i class="bi bi-text-paragraph me-1"></i> <span id="mobile-word-count">0</span> Words
252+
<i class="bi bi-text-paragraph me-1"></i> <span id="mobile-word-count">0</span> <span id="lbl-mobile-words">Words</span>
199253
</div>
200254
<div class="stat-item">
201-
<i class="bi bi-fonts me-1"></i> <span id="mobile-char-count">0</span> Chars
255+
<i class="bi bi-fonts me-1"></i> <span id="mobile-char-count">0</span> <span id="lbl-mobile-chars">Chars</span>
202256
</div>
203257
</div>
204258

@@ -238,6 +292,17 @@ <h5>Menu</h5>
238292
<button id="mobile-direction-toggle" class="mobile-menu-item" title="Toggle RTL/LTR">
239293
<i class="bi bi-text-right me-2"></i> Switch to RTL
240294
</button>
295+
<div class="mobile-menu-item dropdown w-100 p-0 border-0">
296+
<button class="mobile-menu-item w-100 text-start dropdown-toggle" type="button" id="mobileLanguageDropdown" data-bs-toggle="dropdown" aria-expanded="false" title="Switch Language">
297+
<i class="bi bi-translate me-2"></i> Language: <span id="mobile-current-lang-label">English</span>
298+
</button>
299+
<ul class="dropdown-menu w-100" aria-labelledby="mobileLanguageDropdown">
300+
<li><a class="dropdown-item lang-select-item active" href="#" data-lang="en">🇺🇸 English</a></li>
301+
<li><a class="dropdown-item lang-select-item" href="#" data-lang="zh">🇨🇳 简体中文</a></li>
302+
<li><a class="dropdown-item lang-select-item" href="#" data-lang="ja">🇯🇵 日本語</a></li>
303+
<li><a class="dropdown-item lang-select-item" href="#" data-lang="ko">🇰🇷 한국어</a></li>
304+
</ul>
305+
</div>
241306
<button id="mobile-theme-toggle" class="mobile-menu-item" title="Toggle Dark Mode">
242307
<i class="bi bi-moon me-2"></i> Dark Mode
243308
</button>

0 commit comments

Comments
 (0)