Persistent Volume of OTOTOY

Using Tampermonkey to save audio volume at OTOTOY across webpages.

Summary

This post:

  • using (base) JavaScript + Tampermonkey to save OTOTOY Audio Volume

Motivation

  • OTOTOY does not save the volume of previewing music.
  • For every new webpage, volume is set to 100%, too loud for me.

What is OTOTOY?

OTOTOY is a DRM-free, lose-less Music Online Store of Japanese Music.

About OTOTOY:

OTOTOY is not a simple store, it is also an online magazine about music.

We’ve already published interviews and reviews about more than 20,000 different artists. We strive to inform you about the vibrant Japanese music scene and its most unique artists. Our readers are able to listen to an extract of every work discussed about in these articles and buy them.

The albums are available to buy in a variety of formats, all DRM-free: from the simple MP3 and AAC, to WAV, FLAC, ALAC in CD-quality or High-Resolution —24bit/44.1kHz and higher—, to DSD (Direct Stream Digital) files.

Solution

A simple JavaScript is written to:

  • Inject into the OTOTOY webpage, with url started with https://ototoy.jp/_/default/p/
  • Use previous volume
    • If not found, fallback to DEFAULT_VOL = 0.1 (10%)
  • If the volume is changed, save it

Source Code

GitLab: https://gitlab.com/noop-blog/ototoy-persistent-volume

License: MIT

Requirements

  • Chrome / Firefox, reasonable up to date
    • Only Firefox is tested
  • “Tampermonkey” extension

Installation

  1. Install Browser Extension Tampermonkey
  1. Copy the following link
  • https://gitlab.com/noop-blog/ototoy-persistent-volume/-/raw/master/ototoy_persistent_volume.js
  • ⚠️ Check the file content for security first
  1. Open Tampermonkey Dashboard

Open Tampermonkey Dashboard

  1. Navigate to “Utilities”
  2. Paste the link to “Install from URL” and click “Install”
  3. Click “Install” in the new page

Install script to Tampermonkey Confirm install script to Tampermonkey

Verify

Volume saved across pages

=> Notice the volume is same for all pages.

Script is running

=> Notice the red 1 on the top-right corner of the extension icon.

Contact

Anything wrong?

Email me: adam \a\ 2isk.in, replace \a\ with @