ozilla.org/sound;1"].getService(Ci.nsISound); gSound.init(); } catch (ex) {} } } export function playSound(event) { if (!lazy.isSoundEnabled) { return; } initSound(); if (!gSound) { return; } let soundUrl; switch (event) { case "not-found": soundUrl = lazy.notFoundSoundURL; break; case "wrapped": soundUrl = lazy.wrappedSoundURL; break; default: return; } if (soundUrl === "") { return; } if (soundUrl == "beep") { gSound.beep(); } else { if (soundUrl == "default") { soundUrl = "chrome://global/content/notfound.wav"; } gSound.play(Services.io.newURI(soundUrl)); } } PK