From d47dd81f4624de81e6762549cd7d4c24d6a97d13 Mon Sep 17 00:00:00 2001 From: winlin Date: Thu, 13 Jan 2022 11:10:11 +0800 Subject: [PATCH] Refine the running homepage. v4.0.221 --- trunk/research/api-server/static-dir/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trunk/research/api-server/static-dir/index.html b/trunk/research/api-server/static-dir/index.html index 6c8f0f0e9..d54b70289 100755 --- a/trunk/research/api-server/static-dir/index.html +++ b/trunk/research/api-server/static-dir/index.html @@ -62,8 +62,9 @@ // The player url. if (true) { const prefix = `players/?schema=${window.location.protocol.replace(':', '')}`; + const httpPort = window.location.port || (window.location.protocol === 'http:' ? 80 : 443); // If not 8080, user should proxy to the default port. - const query = parseInt(window.location.port) === 8080 ? '' : `&port=${window.location.port}`; + const query = parseInt(window.location.port) === 8080 ? '' : `&port=${httpPort}`; document.getElementById("enPlayer").setAttribute('href', `${prefix}${query}`); document.getElementById("cnPlayer").setAttribute('href', `${prefix}${query}`); }