fixed tvcom http vs https
This commit is contained in:
parent
0fedb4e6b4
commit
5137ddd44e
@ -24,7 +24,7 @@ import lombok.extern.log4j.Log4j2;
|
||||
|
||||
@Log4j2
|
||||
public class BasketballServer {
|
||||
private static final String VERSION = "1.0.1";
|
||||
private static final String VERSION = "1.0.2";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
log.info("Starting Basketball Server...");
|
||||
|
||||
@ -247,7 +247,17 @@ function renderMatches(matches) {
|
||||
}
|
||||
}
|
||||
|
||||
const tvUrl = match.links.tvcom && match.links.tvcom.url;
|
||||
let tvUrl = match.links.tvcom && match.links.tvcom.url;
|
||||
if (tvUrl) {
|
||||
if (tvUrl.startsWith('//')) {
|
||||
tvUrl = 'https:' + tvUrl;
|
||||
} else if (tvUrl.startsWith('http://embed')) {
|
||||
tvUrl = tvUrl.replace('http://', 'https://');
|
||||
} else if (!tvUrl.startsWith('http://') && !tvUrl.startsWith('https://')) {
|
||||
tvUrl = 'https://' + tvUrl;
|
||||
}
|
||||
}
|
||||
|
||||
const liveUrl = match.links.live && match.links.live.url;
|
||||
|
||||
tr.innerHTML = `
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user