diff --git a/fancy-settings/manifest.js b/fancy-settings/manifest.js index 64e4136..26c67bf 100755 --- a/fancy-settings/manifest.js +++ b/fancy-settings/manifest.js @@ -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", diff --git a/fancy-settings/settings.js b/fancy-settings/settings.js index 379bd77..165a7c9 100755 --- a/fancy-settings/settings.js +++ b/fancy-settings/settings.js @@ -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(); }); });