Last active
August 29, 2015 14:11
-
-
Save starlocke/89b5ac41a82958c923de to your computer and use it in GitHub Desktop.
Dell Chat Ping SFX
This file contains hidden or 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
/***** | |
* Adds a "ping" sound whenever a Dell agent responds in the chat | |
* - @author Victor Yap <[email protected]> | |
* NOTES: | |
* - Uses HTML5's <audio> tag (future proof?) | |
* - Originally targetted Chrome with "Custom Javascript for websites" plugin. | |
*****/ | |
/***** | |
* Audio clip from: http://soundbible.com/1441-Elevator-Ding.html | |
* Audio clip License: Sampling Plus 1.0 | Recorded by Corsica | |
*****/ | |
if(document.URL.match('dell/naclient.aspx')){ | |
var chattext = document.getElementById("chattext"); | |
if(chattext){ | |
chattext.innerHTML += '<audio id="playsnd" src="https://www.dropbox.com/s/so62xy1nm13q1j1/elevator-ding.mp3?raw=1" style="display: none;"></audio>'; | |
} | |
playsound = function(){ | |
var aud = document.getElementById('playsnd'); | |
aud.load(); aud.currentTime = 0; aud.play(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment