fix
This commit is contained in:
@@ -92,15 +92,16 @@ document.getElementById('serverForm').addEventListener('submit', async (e) => {
|
||||
`).join('')}
|
||||
`;
|
||||
|
||||
// Determine port for widget: use SRV-resolved port if available, else user-provided or default
|
||||
let widgetPort = port;
|
||||
if (result.srvPort) {
|
||||
widgetPort = result.srvPort;
|
||||
// Use SRV-resolved host and port if available, else user-provided or default
|
||||
if (host.includes("my-mc.link")){
|
||||
host = "my-mc.link"
|
||||
}
|
||||
let widgetHost = host;
|
||||
let widgetPort = result.srvPort || port;
|
||||
|
||||
// Show widget section and set widget code with static my-mc.link hostname
|
||||
// Show widget section and set widget code
|
||||
widgetSection.classList.remove('hidden');
|
||||
const widgetIframe = `<iframe src="https://my-mc.link/widget/${edition}/my-mc.link/${widgetPort}" width="280" height="145" frameborder="0" scrolling="no"></iframe>`;
|
||||
const widgetIframe = `<iframe src="https://my-mc.link/widget/${edition}/${widgetHost}/${widgetPort}" width="280" height="145" frameborder="0" scrolling="no"></iframe>`;
|
||||
widgetCode.textContent = widgetIframe;
|
||||
} else {
|
||||
statusContent.innerHTML = `
|
||||
|
Reference in New Issue
Block a user