This script modifies image posts to link directly to their high-resolution version. The link is available as soon as a box appears around an image. The color of the box indicates the image height. Secondly, the script displays the post timestamp in the upper-right corner.
< Feedback on BDSMLR - clickable links to original high-res images and display timestamps
Hi Monkeyboy.
Thanks - much appreciated.
I do not get any notification sounds from bdsmlr.
There's a profile setting: "Disable sound notification when receiving a new message"
Hi Marp!
Thanks for the response! Yes, I'm aware of that setting. Sorry, I should have been more clear.
I actually DO want to hear the notfication sound. I keep the site up in a separate tab and go about other things. It would just be good to be able to control the volume or replace the sound with another more subtle notification sound.
Found this in one of the inline script sections: <audio id="notify" src="/assets/notification.mp3" preload="auto"></audio>
I could change the src attribute but not sure how to reload the sound after the page has loaded.
Ok. I figured this out myself. Feel free to add this or even put a GUI to it if you care.
You can change the volume of the native web audio element itself but it has no effect. As it turns out the notification script is triggering the audio via the howler.js code. Turns out there is a global parameter for howler that lets you read and set the volume. So I simply added Howler.volume(0.5);
to your script and cut the volume in half. The value ranges from 0.0 to 1.0. Simple as that.
(You could include the command set at 1.0 for full volume and let people know in the documentation to change it themselves if they like.)
Interesting... I'll have a look the next time I work on the script.
Changing HTML as well as executing JS is straight-forward with GreaseMonkey - changing existing JS is another matter entirely due to the browser making that difficult for security reasons.
...but if it is sufficient to simply execute a few Howler calls regularly from a different scope (page scope vs. GreaseMonkey scope) then that seems quite easy to do... I'll have a look next time...
Hmmm... easier said than done.
I could not get a single notification sound to work for me - I am trying to trigger them myself to be able to use for testing.
Do you have a process that you can execute on your own that leads to a notification sound to trigger for you?
Unfortunately, I have run into the same issue. This is what I have come to understand:
The webaudio element is declared in the html document as <audio id="notify" src="/assets/notification.mp3" preload="auto"></audio>
You can play this audio via the console with notify.play()
You can modify the volume with notify.volume = 0.5
The problem is that these commands have no effect on the notification that is triggered by howler when a new notification arrives. I have not been able to find exactly where this sound is declared in the Howler
or Howl
context.
If it was declared as the Howler API suggests: var sound = new Howl({ src:['sound.mp3'] });
Then I could trigger the sound with sound.play()
I have simply set the volume with the global parameter Howler.volume()
and that works for me. If you'd like me to send you messages on bdsmlr to trigger the notification sound, let me know. I'd be happy to help.
If it were only for investigation... but for testing purposes, I have to find a way to trigger notifications myself.
I guess I'll look into how to best creating a separate account...
From what I can see, BDSMLR's usage of the Howler API seems very basic - that gives a good chance that volume manipulation might be possible in a consistent manner.
Great script! Works really well since the last update!
I was wondering... not sure if you're open to feature requests... is there anything you can do about the notification sound for new messages? I find it REALLY loud.
I have looked into it. It is a single element and they also use the howler.js script to handle web audio. I can code in javascript but not sure how to modify this audio since it is "preloaded". It would be great to either point to a different sound or simply set the volume lower.