๐Ÿ“ฆ sglkc / moegi

๐ŸŽต A Spotify web extension for Chromium browsers to style, translate, and romanize lyrics. Supports Chinese, Japanese, Korean, Cyrillic, and more!

โ˜… 42 stars โ‘‚ 2 forks ๐Ÿ‘ 42 watching โš–๏ธ MIT License
chromechrome-extensionchromiumchromium-extensioncyrillicjapanesejavascriptkoreanlyricsromanizationspotifytranslationtypescript
๐Ÿ“ฅ Clone https://github.com/sglkc/moegi.git
HTTPS git clone https://github.com/sglkc/moegi.git
SSH git clone git@github.com:sglkc/moegi.git
CLI gh repo clone sglkc/moegi
Seya Seya fix(observer): change early return to continue ce64207 1 months ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ assets
๐Ÿ“ components
๐Ÿ“ docs
๐Ÿ“ entrypoints
๐Ÿ“ modules
๐Ÿ“ public
๐Ÿ“ utils
๐Ÿ“„ .gitignore
๐Ÿ“„ LICENSE
๐Ÿ“„ package.json
๐Ÿ“„ pnpm-lock.yaml
๐Ÿ“„ README.md
๐Ÿ“„ tsconfig.json
๐Ÿ“„ uno.config.ts
๐Ÿ“„ wxt.config.ts
๐Ÿ“„ README.md

Moegi


MIT License Issues Pull Requests Latest Release

An extension for Chromium browsers to customize lyrics in Spotify Web Player.

Report a Bug ยท Request a Feature

Features lyrics translation for over 100 languages powered by Google Translate and \ romanization for Chinese, Korean, Japanese, Cyrillic, and many more non-latin scripts! \ Tested on Google Chrome (135.0.7049.52) and Brave Browser (137.1.79.119) on Linux


What's New in Version 2?

Most of the changes affects developer experience instead of users, you may not notice anything different from version 1 except some layout or text changes. My main focus is to migrate the framework from CRXJS to WXT for more streamlined development.

There are some things to do:

  • Rework to WXT ๐Ÿ’š
  • Auto-release on new tags (ci/cd) ๐Ÿ’š
  • Reset defaults button
  • DeepL translation ๐Ÿ’” (https://github.com/sglkc/moegi/pull/20)
  • Reimplement fullscreen handling ๐Ÿ’š
  • Implement active lyric listener
  • Picture-in-picture lyrics
  • Update README, video, and screenshots

Getting Started

Chromium browsers doesn't support installing extensions directly outside of Chrome Web Store, so follow these steps carefully:

  • Download the latest release (moegi-x.x.x.zip) archive from https://github.com/sglkc/moegi/releases/latest
  • Extract and remember the location of the extracted folder (moegi-x.x.x)
  • Open Chrome extensions page at chrome://extensions
  • Toggle developer mode at the topmost bar
  • Click on the new Load unpacked button
  • Find and select the folder you extracted earlier (moegi-x.x.x)
  • Moegi should be added to the list and switched on, pin the extension for easy access
  • Click on the puzzle piece icon on the top-right
  • Find Moegi and click on the pin icon
  • Open Spotify Web Player (https://open.spotify.com)
  • Play any song and open the lyrics page by clicking the microphone icon on bottom-right
  • If you click on Moegi, it should now display a popup, nice!
Steps screenshot Moegi installation Moegi loaded

Features

Show full extension features screenshot Moegi all features

Lyrics Styling

The most basic feature to customize your Spotify lyrics screen:

FeatureDefaultOptions
Text AlignLeftLeft, Center, Right
Font Size1em0.5-2.5em
Spacing0px0-64px
ColorsNoneBackground, Passed, Active, Inactive, Translation, Romanization
There is an integration issue with the colors, so if you want to reset the colors, use the Reset to defaults button

Translation

Library used: google-translate-api-x

Translate lyrics line-by-line using Google Translate, successful translations are cached temporarily in storage to avoid Google Translate limit. Note that translations are not accurate and should not be used literally! Read about privacy policy.

FeatureDefaultOptions
Font Size1em0.5-1.5em
Language TargetautoOver 100 languages

Romanization

Romanize lyrics automatically by detecting the script of each text segment. The extension will apply the appropriate romanization system based on the detected Unicode script.

Supported scripts:

Other scripts will use the Any-ASCII fallback.

FeatureDefaultOptions
Auto-detectionEnabledAutomatic based on Unicode script
Font Size1em0.5-1.5em

Japanese

Libraries used: @sglkc/kuroshiro, @sglkc/kuroshiro-analyzer-kuromoji

Note that Japanese romanization may not be accurate, particularly on kanji!

FeatureDefaultOptions
ToRomajiRomaji, Hiragana, Katakana
ModeSpacedNormal, Spaced, Okurigana, Furigana
Romaji SystemHepburnNippon, Passport, Hepburn
Okurigana Delimiter( )Custom delimiters
Differences between each mode in hiragana

Original Text: ๆ„Ÿใ˜ๅ–ใ‚ŒใŸใ‚‰ๆ‰‹ใ‚’็น‹ใ”ใ†ใ€้‡ใชใ‚‹ใฎใฏไบบ็”Ÿใฎใƒฉใ‚คใƒณ and ใƒฌใƒŸใƒชใ‚ขๆœ€้ซ˜๏ผ

  • Normal: \
ใ‹ใ‚“ใ˜ใจใ‚ŒใŸใ‚‰ใฆใ‚’ใคใชใ”ใ†ใ€ใ‹ใ•ใชใ‚‹ใฎใฏใ˜ใ‚“ใ›ใ„ใฎใƒฉใ‚คใƒณ and ใƒฌใƒŸใƒชใ‚ขใ•ใ„ใ“ใ†๏ผ

  • Spaced: \
ใ‹ใ‚“ใ˜ใจใ‚Œ ใŸใ‚‰ ใฆ ใ‚’ ใคใชใ” ใ† ใ€ ใ‹ใ•ใชใ‚‹ ใฎ ใฏ ใ˜ใ‚“ใ›ใ„ ใฎ ใƒฉใ‚คใƒณ and ใƒฌใƒŸ ใƒชใ‚ข ใ•ใ„ใ“ใ† ๏ผ

  • Okurigana: \
ๆ„Ÿ(ใ‹ใ‚“)ใ˜ๅ–(ใจ)ใ‚ŒใŸใ‚‰ๆ‰‹(ใฆ)ใ‚’็น‹(ใคใช)ใ”ใ†ใ€้‡(ใ‹ใ•)ใชใ‚‹ใฎใฏไบบ็”Ÿ(ใ˜ใ‚“ใ›ใ„)ใฎใƒฉใ‚คใƒณ and ใƒฌใƒŸใƒชใ‚ขๆœ€้ซ˜(ใ•ใ„ใ“ใ†)๏ผ

  • Furigana: \
ๆ„Ÿ(ใ‹ใ‚“)ใ˜ๅ–(ใจ)ใ‚ŒใŸใ‚‰ๆ‰‹(ใฆ)ใ‚’็น‹(ใคใช)ใ”ใ†ใ€้‡(ใ‹ใ•)ใชใ‚‹ใฎใฏไบบ็”Ÿ(ใ˜ใ‚“ใ›ใ„)ใฎใƒฉใ‚คใƒณ and ใƒฌใƒŸใƒชใ‚ขๆœ€้ซ˜(ใ•ใ„ใ“ใ†)๏ผ

Read about romaji romanization systems (for nerds).

Korean

Library used: @romanize/korean

FeatureDefaultOptions
Hangul SystemRevisedRevised, McCune, Yale
Differences between each romanization system

Original Text: ์šฐ๋‘์ปค๋‹ˆ ๊ทธ ์ž๋ฆฌ์— ์„œ์„œ ๊ธฐ๋‹ค๋ฆฌ๋ ค๋‚˜ ๋ด

udukeoni geu jarie seoseo gidariryeona bwa

utuk'ลni kลญ carie sลsล kitariryลna pwa

utukheni ku caliey sese kitalilyena pwa

Cyrillic

Library used: cyrillic-to-translit-js

FeatureDefaultOptions
LanguageRussianRussian, Ukrainian

Chinese

Library used: pinyin-pro

FeatureDefaultOptions
Ruby textOFFON, OFF

Any

Library used: any-ascii

Provides a lot of conversions at the cost of accuracy, read more from the package repository.

Development

Prerequisites

npm install -g pnpm

Steps

If you wish to make modifications or just want to build the extension yourself:

  • Clone the repository
git clone https://github.com/sglkc/moegi.git
  cd moegi

  • Install dependencies using pnpm
pnpm install

  • Start extension development and launch test browser
pnpm dev

  • Build extension
pnpm build

Contributing

Any kind of contributions are greatly appreciated! You can start by forking this repository then create a pull request.

  • Fork the repository
  • Clone the forked repository to your machine
  • Create your branch (git checkout -b feat/new-feature)
  • Commit your changes (git commit -m 'feat: add this and that')
  • Push to the branch (git push origin feat/new-feature)
  • Open a pull request

Disclaimer

Moegi is not affiliated with Spotify in any way. Moegi is for educational purposes only and should not be used to violate Spotify's terms of service.

Privacy Policy

  • Moegi does not track your listening habits, your IP address, or any other personal information.
Everything is done locally in the web browser, except for the translation feature.

  • The translation feature uses Google Translate, which is a third-party service.
Google may collect some data about your use of the translation feature, such as the text you translate and the language you translate it to. For more information about Google's privacy policy, please see https://policies.google.com/privacy.

  • Moegi uses a small amount of storage space on your computer to store the options that you have customized and lyrics you have translated.
It is not used to store any other personal information.

License

Distributed under the MIT License. See LICENSE for more information.