qmetrics.net

Pangu.js

CJK and Latin text spacing for the web

Browsers & ExtensionsDesktop/CLI app
Pangu.js screenshot

Pangu.js inserts spaces between CJK characters and half-width Latin letters, digits, and symbols. A DOM-aware build targets HTML pages; a Chrome extension can space entire sites automatically.

Overview

Pangu.js is a JavaScript library for opinionated automatic text spacing between Chinese, Japanese, or Korean characters and alphabetical, numeric, or symbolic half-width characters. The goal is readable mixed Chinese–English copy on webpages and in plain text.

The browser build is DOM-aware: functions such as spaceNode and autoSpacePage walk HTML and insert whitespace without breaking layout semantics. TypeScript types ship with the ESM browser entry so bundlers resolve it consistently.

The same project ships a Google Chrome extension that spaces every page you browse. An optional AI Spacing mode calls Chrome’s on-device Prompt API running Gemini Nano to decide spacing when simple regex rules cannot distinguish meanings of symbols like plus or minus in context; processing stays local to the machine.

Node.js can use the core spacing helpers on plain strings. The authors warn against using Pangu.js to space Markdown documents because it is aimed at HTML and unmarked plain text. A command-line interface is also available.

Key features

  • Automatic CJK-to-ANS whitespace insertion
  • DOM-aware page and node spacing
  • Chrome extension for all visited pages
  • On-device AI spacing via Prompt API
  • TypeScript types for browser ESM
  • Plain-text spacing for Node.js
  • Command-line interface

Use cases

  • Improving mixed Chinese–English web copy
  • Batch spacing plain text in Node
  • Browser-wide automatic spacing
  • Context-sensitive symbol spacing with AI

Tags

Similar software

uBlock

Lean wide-spectrum content blocker for Chromium and Firefox

uBlock Origin is a browser extension that blocks ads, trackers, miners, popups, malware sites, and similar content using filter lists and custom rules.

★ 69.8k⟳ todayGPL-3.0
Browsers & ExtensionsDesktop/CLI app

Ladybird

Independent web browser with a new standards-based engine

Ladybird is a web browser built around a novel rendering engine written from scratch, not forked from Chromium, Gecko, or WebKit. Alpha builds are offered for macOS and Linux.

★ 69.7k⟳ todayBSD-2-Clause
Browsers & ExtensionsDesktop/CLI app
Open Source Alternative to:Google Chrome

Pake

Lightweight desktop shells for websites via Tauri

Pake wraps any website into a small native desktop app on macOS, Windows, and Linux. A free CLI packages URLs with one command; a separate paid desktop app offers a graphical builder.

★ 64.1k⟳ 2 days agoGPL-3.0
Build & DeploymentDesktop/CLI app

PDF.js

HTML5 platform for parsing and rendering PDFs

PDF.js is a JavaScript PDF viewer and parser built on web standards. Mozilla supports the project, and Firefox ships a built-in viewer from recent releases.

★ 54.2k⟳ todayApache-2.0
PublishingDesktop/CLI app

Zen Browser

Firefox-based browser focused on productivity and privacy

Zen Browser is an open-source, Firefox-based browser built around productivity and privacy. It adds tab organization and layout features on top of standard web browsing.

★ 46k⟳ todayMPL-2.0
Browsers & ExtensionsDesktop/CLI app
Open Source Alternative to:Google Chrome

github-chinese

Userscript localization of the GitHub web interface

GitHub 中文化插件 translates GitHub’s English UI into Chinese using a maintained dictionary and regex rules. It runs as a browser userscript with optional machine translation for repository descriptions.

★ 39.5k⟳ 5 days agoGPL-3.0
Browsers & ExtensionsDesktop/CLI app