const url = "set.666x.cc:8089"; function getNmqsAPI() { if (window.location.protocol === 'https:') { return `https://${url}`; } return `http://${url}`; } function getNmqsWebsocket() { if (window.location.protocol === 'https:') { return `wss://${url}`; } return `ws://${url}`; }