Greasy Fork is available in English.

WebinarGeek Message Pling

Play a sound when a message arrives

// ==UserScript==
// @name         WebinarGeek Message Pling
// @description  Play a sound when a message arrives
// @author       Wilco Verhoef
// @version      2.0
// @namespace    wilcoverhoef.nl
// @match        https://*.webinargeek.com/webinar/*
// @grant        none
// @license      This is free and unencumbered software released into the public domain. unlicense.org
// ==/UserScript==

(function() {

    /* global $, Chat */

    // Pling on message:
    $(window).on('newMessage', () => pling.play());

    // Force scroll to bottom on message:
    $(window).on('newMessage', (_,{channel_id}) => Chat.UI.Channel.scrollToNewest(channel_id, true));

    // The "pling" sound to use:
    var pling = new Audio("data:audio/mpeg;base64,//OEZAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAAMAAAHOAAdHR0dHR0dHWBgYGBgYGBgjIyMjIyMjIzAwMDAwMDAwMDm5ubm5ubm5unp6enp6enp7e3t7e3t7e3t8fHx8fHx8fH09PT09PT09Pj4+Pj4+Pj4+Pz8/Pz8/Pz8//////////8AAAA5TEFNRTMuOThyAm4AAAAALE0AABRGJANoTgAARgAABzhFpwsfAAAAAAAAAAAAAAAAAAAA//OEZAANNLs8sqC8AA25dkwBQFgA1GgOmeQMAM2/rGyvffpSnzTXvf//FKU+b7o/fx9wGBWODGaCglV8dSFsQhFhqBMEY3p9n3TwHkSnhv49FezxxACA0EFh/U4TjgfeIDhQ5/Ln+GP8P/4Y/ydRwocWfn+XD8QDQQcD58u8g9/7P2V/////D3v2IGhxMdhMVN1ygbCYVgIAiFiZufv2MYze98G595QEIIf4P8p/////////4YWQZjUZjMaDEZjM//PUZAocrcGLL8XREaVa6s5fhaECajYVhrrrxHCvjyeINE94soV0UIktXEJAubIiKRSWo28cgLRw94MuihjQihAh0kl8cIBooBxUGjkDWbgN79J92qL34HchhCYAx48LZABAQTABkJ3ZG3+HbDwhjUSAgYhYSiIwGUezsiksx/4sQmAeqKcNAWA3D5A7YpAiolMgxRFdEJhkQxeA5MBsBQsgMTiChMf/jkE2XiqZGzlw6XioYm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