Last active
December 11, 2017 18:06
-
-
Save mysy00/b5d584ab83a68b1630eea3a52ac8505b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Shoutbox New Message Sound | |
// @version 0.1 | |
// @description Play a sound when someone sends a message in the shoutbox | |
// @match http://mg-s.us/mybb/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
dvz_shoutbox.awayTime = 0; | |
dvz_shoutbox.callbacks['update'].push(function(){ | |
if ($('#shoutbox .entry.new').length) { | |
var audio = new Audio('http://priv.nowitam.pl/upload/dvz_shoutbox.mp3'); | |
audio.volume = 0.2; | |
audio.play(); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment