Added notification sound preview.

This commit is contained in:
Kerrick Long
2011-07-19 10:21:27 -05:00
parent c553c77bf2
commit b0e675056d
2 changed files with 11 additions and 2 deletions
+7
View File
@@ -81,6 +81,13 @@ this.manifest = {
"type": "checkbox",
"label": "Play a sound when you have an orangered"
},
{
"tab": "Preferences",
"group": "Orangered Notifications",
"name": "mailSoundPreview",
"type": "button",
"text": "Preview the notification sound"
},
{
"tab": "Preferences",
"group": "Orangered Notifications",
+4 -2
View File
@@ -1,8 +1,10 @@
window.addEvent("domready", function () {
// Option 1: Use the manifest:
new FancySettings.initWithManifest(function (settings) {
settings.manifest.myButton.addEvent("action", function () {
alert("You clicked me!");
pop = document.createElement('audio');
pop.src = '/pix/pop.ogg';
settings.manifest.mailSoundPreview.addEvent("action", function () {
pop.play();
});
});