diff --git a/src/features/scrollWheelVolumeControl/index.ts b/src/features/scrollWheelVolumeControl/index.ts index e6c60b59..08863b3f 100644 --- a/src/features/scrollWheelVolumeControl/index.ts +++ b/src/features/scrollWheelVolumeControl/index.ts @@ -41,7 +41,12 @@ export default async function adjustVolumeOnScrollWheel(): Promise { // Adjust the volume based on the scroll direction const scrollDelta = getScrollDirection(wheelEvent.deltaY); - + // Wait for the "options" message from the content script + const optionsData = await waitForSpecificMessage("options", "request_data", "content"); + if (!optionsData) return; + const { + data: { options } + } = optionsData; // Adjust the volume based on the scroll direction and options const { newVolume } = await adjustVolume(scrollDelta, options.volume_adjustment_steps);