mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed search crashing in client-mode
This commit is contained in:
@@ -95,8 +95,8 @@ var Channel = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Helper.tabs('.chatTabs');
|
Helper.tabs('.chatTabs');
|
||||||
Helper.tabs('.results-tabs');
|
|
||||||
}
|
}
|
||||||
|
Helper.tabs('.results-tabs');
|
||||||
var sidenavElem = document.getElementsByClassName("sidenav")[0];
|
var sidenavElem = document.getElementsByClassName("sidenav")[0];
|
||||||
M.Sidenav.init(sidenavElem, {
|
M.Sidenav.init(sidenavElem, {
|
||||||
menuWidth: 310,
|
menuWidth: 310,
|
||||||
@@ -259,6 +259,8 @@ var Channel = {
|
|||||||
if(!client) {
|
if(!client) {
|
||||||
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
||||||
if(Player.player === "" || Player.player === undefined || Helper.mobilecheck()) Player.loadPlayer();
|
if(Player.player === "" || Player.player === undefined || Helper.mobilecheck()) Player.loadPlayer();
|
||||||
|
} else {
|
||||||
|
Player.loadSoundCloudPlayer();
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
|||||||
@@ -245,6 +245,8 @@ window.addEventListener("DOMContentLoaded", function() {
|
|||||||
firstScriptTagSC = document.getElementsByTagName('script')[0];
|
firstScriptTagSC = document.getElementsByTagName('script')[0];
|
||||||
firstScriptTagSC.parentNode.insertBefore(tagSC, firstScriptTagSC);
|
firstScriptTagSC.parentNode.insertBefore(tagSC, firstScriptTagSC);
|
||||||
}
|
}
|
||||||
|
} else if(window.location.pathname == "/" && client) {
|
||||||
|
Player.loadSoundCloudPlayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Helper.mobilecheck()) {
|
if(Helper.mobilecheck()) {
|
||||||
|
|||||||
@@ -990,6 +990,11 @@ var Player = {
|
|||||||
firstScriptTag = document.getElementsByTagName('script')[0];
|
firstScriptTag = document.getElementsByTagName('script')[0];
|
||||||
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
|
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) {
|
if(document.querySelectorAll("script[src='https://connect.soundcloud.com/sdk/sdk-3.3.0.js']").length == 1) {
|
||||||
try {
|
try {
|
||||||
Player.soundcloudReady();
|
Player.soundcloudReady();
|
||||||
@@ -1016,7 +1021,6 @@ var Player = {
|
|||||||
firstScriptTagSC = document.getElementsByTagName('script')[0];
|
firstScriptTagSC = document.getElementsByTagName('script')[0];
|
||||||
firstScriptTagSC.parentNode.insertBefore(tagSC, firstScriptTagSC);
|
firstScriptTagSC.parentNode.insertBefore(tagSC, firstScriptTagSC);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user