mirror of
https://github.com/MCSManager/MCSManager.git
synced 2025-01-18 15:04:04 +08:00
11 lines
325 B
JavaScript
11 lines
325 B
JavaScript
//标准的URL定位器
|
|
if(window.MCSERVER == undefined) window.MCSERVER = {};
|
|
|
|
MCSERVER.URL = function(url, protocol) {
|
|
var _protocol = protocol || 'http://';
|
|
var hostName = window.location.host;
|
|
// var port = 23333;
|
|
var openURL = hostName + '/' + url;
|
|
console.log('转换URL:', openURL)
|
|
return _protocol + openURL;
|
|
}; |