Browse Source

Bug 11431: (QA followup) Allow https in sound URLs

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
3.22.x
Kyle Hall 9 years ago
committed by Tomas Cohen Arazi
parent
commit
b8dd899738
  1. 3
      koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js

3
koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js

@ -122,8 +122,7 @@ function confirmDelete(message) {
}
function playSound( sound ) {
// This is way faster than substring
if ( ! ( sound.charAt(4) == ':' && sound.charAt(5) == '/' && sound.charAt(6) == '/' ) ) {
if ( ! ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) {
sound = AUDIO_ALERT_PATH + sound;
}
document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';

Loading…
Cancel
Save