Fixed search crashing in client-mode

This commit is contained in:
Kasper Rynning-Tønnesen
2018-08-12 14:41:11 +02:00
parent 0a8194263a
commit cc60c48cc4
3 changed files with 10 additions and 2 deletions

View File

@@ -990,6 +990,11 @@ var Player = {
firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
}
Player.loadSoundCloudPlayer();
},
loadSoundCloudPlayer: function() {
if(document.querySelectorAll("script[src='https://connect.soundcloud.com/sdk/sdk-3.3.0.js']").length == 1) {
try {
Player.soundcloudReady();
@@ -1016,7 +1021,6 @@ var Player = {
firstScriptTagSC = document.getElementsByTagName('script')[0];
firstScriptTagSC.parentNode.insertBefore(tagSC, firstScriptTagSC);
}
}
};