Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/satohshi/superthanks-converter
UserScript for YouTube Studio that converts SuperThanks to your preferred currency.
https://github.com/satohshi/superthanks-converter
userscript youtube
Last synced: 2 days ago
JSON representation
UserScript for YouTube Studio that converts SuperThanks to your preferred currency.
- Host: GitHub
- URL: https://github.com/satohshi/superthanks-converter
- Owner: satohshi
- Created: 2024-10-07T21:04:57.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-12-09T11:04:35.000Z (about 2 months ago)
- Last Synced: 2024-12-09T12:19:41.381Z (about 2 months ago)
- Topics: userscript, youtube
- Language: TypeScript
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SuperThanks Converter
User script for YouTube Studio that converts SuperThanks amount to your preferred currency.
This script uses [fawazahmed0's API](https://github.com/fawazahmed0/exchange-api) to get the exchange rate.
## Installation
Copy-and-past the content of `dist/index.js` onto your userscript manager.
Don't forget to change the following lines at the top:```js
var LOCALE = 'YOUR_LOCALE' // BCP 47 language tag (e.g. ja-JP)
var CURRENCY = 'YOUR_CURRENCY' // ISO 4217 currency code (e.g. JPY)
```> [!NOTE]
> I highly recommend using [Tampermonkey](https://www.tampermonkey.net/) to run the script, as it supports `window.onurlchange` for SPAs like YouTube Studio.
> Although I have added a fallback method for other userscript managers, it's not as efficient or reliable.## Development
Create `.env` file in the root directory with the following content:
| Variable | Description |
| ---------- | ----------------------------------- |
| `LOCALE` | BCP 47 language tag (e.g. `ja-JP`) |
| `CURRENCY` | ISO 4217 currency code (e.g. `JPY`) |Then run:
```bash
pnpm run dev
```It will start esbuild in watch mode and automatically update `dev/index.js` whenever you make changes.