A powerful userscript that enhances your WTR-Lab reading experience with customizable reader width, navigation panel controls, and font styling options. Create the perfect reading environment on wtr-lab.com with this feature-rich userscript.
For end users, we recommend installing directly from GreasyFork for automatic updates:
π Install from GreasyFork - Ready!
GreasyFork provides automatic updates and easy management through userscript managers (Tampermonkey, Violentmonkey, etc.).
For developers who want to modify the script or contribute:
- Prerequisites: Node.js 16+ and npm
- Clone the repository:
git clone https://github.com/MasuRii/wtr-lab-enhancer.git cd wtr-lab-enhancer - Install dependencies:
npm install
- Build the userscript:
npm run build
- Install the generated file: The built script will be available at
dist/wtr-lab-enhancer.user.js- Open your userscript manager dashboard
- Click "Create a new script"
- Replace the default content with the contents of
dist/wtr-lab-enhancer.user.js - Save the script
- Reader Width: Adjust the main content reading area width (300-1200px)
- Navigation Panel: Customize the bottom navigation panel width
- Background Constraint: Option to constrain navigation background to match content width
- Custom Fonts: Choose from Google Fonts collection
- Font Categories: Browse recommended serif and sans-serif fonts
- Dynamic Loading: Fonts are loaded on-demand for optimal performance
- Font Toggle: Enable/disable custom fonts as needed
- Toolbar Controls: Hide/show individual toolbar buttons (Book, Text, TTS, Settings, List)
- Add Term Button: Option to hide the floating "Add Term" button for distraction-free reading
- Debug Mode: Detailed console logging for troubleshooting
- Settings Persistence: All preferences saved locally via GM_* APIs
- Responsive Design: Works across different screen sizes
- Touch Optimization: Enhanced touch controls for mobile devices
https://wtr-lab.com/en/novel/*/*/chapter-*
# Development build with source maps
npm run dev
# Production build (minified)
npm run buildwtr-lab-enhancer/
βββ src/
β βββ index.js # Main entry point
β βββ modules/
β β βββ config.js # Configuration management
β β βββ features.js # Feature implementations
β β βββ fontManager.js # Font loading and management
β β βββ logger.js # Debug logging
β β βββ styles.js # CSS injection
β β βββ ui.js # UI component management
β βββ styles/
β βββ panel.css # Configuration panel styling
βββ dist/ # Built userscript output
βββ webpack.config.js # Build configuration
βββ package.json # Project metadata
βββ README.md # This file
- Webpack 5 for modern bundling
- webpack-userscript plugin for userscript header generation
- CSS Modules with style-loader and css-loader
- Production optimization with minification and source maps
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly with
npm run dev - Build with
npm run buildto ensure production compatibility - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Semantic Versioning: Following semver (MAJOR.MINOR.PATCH)
- GreasyFork Compatible: Optimized for GreasyFork submission and approval
- Auto-updates: Configured for seamless updates via @updateURL
- Primary: GreasyFork (automatic updates)
- Backup: GitHub releases (manual installation)
- Development: Direct from source (built locally)
This script is fully compliant with GreasyFork policies:
- β Single-file output: All code bundled into one installable file
- β Proper metadata: All required headers including @updateURL, @homepageURL, @supportURL
- β MIT License: Open source license properly declared
- β Minification allowed: Production builds are optimized
- β No obfuscation: Clean, readable source code available
- β Documented permissions: GM_* functions properly justified
The script uses the following userscript manager APIs:
GM_addStyle- Inject custom CSS stylesGM_getValue/GM_setValue- Persist user settingsGM_registerMenuCommand- Add settings menu entryGM_xmlhttpRequest- Load font resources from Google Fonts API
All permissions are minimal and necessary for core functionality.
- Report bugs: GitHub Issues
- Feature requests: GitHub Issues
- General support: GitHub Discussions
This project is licensed under the MIT License - see the LICENSE file for details.
- WTR-Lab platform for providing an excellent reading experience
- GreasyFork community for userscript hosting and distribution
- Open source libraries and tools that made this project possible
Made with β€οΈ for better reading experiences on WTR-Lab
For the latest updates and detailed documentation, visit our GitHub repository.


