mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-22 05:30:05 +00:00
Clean up semicolons, whitespace and a typo
This commit is contained in:
parent
9bfe3d6d99
commit
0060f37e6c
@ -5,7 +5,7 @@ var today = new Date();
|
|||||||
// so 11 is Dec. of this year, and 12 is Jan. of the next
|
// so 11 is Dec. of this year, and 12 is Jan. of the next
|
||||||
var christmasBegin = new Date(today.getFullYear(), 11, 23);
|
var christmasBegin = new Date(today.getFullYear(), 11, 23);
|
||||||
var christmasEnd = new Date(today.getFullYear(), 12, 8);
|
var christmasEnd = new Date(today.getFullYear(), 12, 8);
|
||||||
var sf
|
var sf;
|
||||||
|
|
||||||
if((today >= christmasBegin && today <= christmasEnd)) {
|
if((today >= christmasBegin && today <= christmasEnd)) {
|
||||||
console.log("Christmas Activated.");
|
console.log("Christmas Activated.");
|
||||||
|
@ -40,10 +40,10 @@ function onResize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function launchGame() {
|
function launchGame() {
|
||||||
gameRunning = true
|
gameRunning = true;
|
||||||
|
|
||||||
var sel = document.getElementById("of-serverselector");
|
var sel = document.getElementById("of-serverselector");
|
||||||
sel.remove()
|
sel.remove();
|
||||||
|
|
||||||
document.body.style.overflow = "hidden";
|
document.body.style.overflow = "hidden";
|
||||||
|
|
||||||
@ -75,6 +75,6 @@ function launchGame() {
|
|||||||
var div = document.getElementById('client');
|
var div = document.getElementById('client');
|
||||||
object.appendChild(embed);
|
object.appendChild(embed);
|
||||||
div.appendChild(object);
|
div.appendChild(object);
|
||||||
document.title = "OpenFusion"
|
document.title = "OpenFusion";
|
||||||
onResize();
|
onResize();
|
||||||
}
|
}
|
@ -3,9 +3,9 @@ var remotefs = remote.require('fs-extra');
|
|||||||
var dns = remote.require('dns');
|
var dns = remote.require('dns');
|
||||||
|
|
||||||
var userdir = remote.require('app').getPath('userData');
|
var userdir = remote.require('app').getPath('userData');
|
||||||
var versionarray
|
var versionarray;
|
||||||
var serverarray
|
var serverarray;
|
||||||
var config
|
var config;
|
||||||
|
|
||||||
function enableServerListButtons() {
|
function enableServerListButtons() {
|
||||||
$('#of-connect-button').removeClass('disabled');
|
$('#of-connect-button').removeClass('disabled');
|
||||||
@ -35,7 +35,7 @@ function addServer() {
|
|||||||
server['version'] = $("#addserver-versionselect option:selected").text();
|
server['version'] = $("#addserver-versionselect option:selected").text();
|
||||||
//server['endpoint'] =
|
//server['endpoint'] =
|
||||||
|
|
||||||
jsontomodify['servers'].push(server)
|
jsontomodify['servers'].push(server);
|
||||||
|
|
||||||
remotefs.writeFileSync(userdir+"\\servers.json", JSON.stringify(jsontomodify, null, 4));
|
remotefs.writeFileSync(userdir+"\\servers.json", JSON.stringify(jsontomodify, null, 4));
|
||||||
loadServerList();
|
loadServerList();
|
||||||
@ -99,13 +99,13 @@ function loadServerList() {
|
|||||||
$.each(serverarray, function( key, value ) {
|
$.each(serverarray, function( key, value ) {
|
||||||
// Create the row, and populate the cells
|
// Create the row, and populate the cells
|
||||||
var row = document.createElement('tr');
|
var row = document.createElement('tr');
|
||||||
row.className = 'server-listing-entry'
|
row.className = 'server-listing-entry';
|
||||||
row.setAttribute('id', value.uuid);
|
row.setAttribute('id', value.uuid);
|
||||||
var cellName = document.createElement('td');
|
var cellName = document.createElement('td');
|
||||||
cellName.textContent = value.description
|
cellName.textContent = value.description;
|
||||||
var cellVersion = document.createElement('td');
|
var cellVersion = document.createElement('td');
|
||||||
cellVersion.textContent = value.version
|
cellVersion.textContent = value.version;
|
||||||
cellVersion.className = 'text-monospace'
|
cellVersion.className = 'text-monospace';
|
||||||
|
|
||||||
row.appendChild(cellName);
|
row.appendChild(cellName);
|
||||||
row.appendChild(cellVersion);
|
row.appendChild(cellVersion);
|
||||||
@ -157,7 +157,7 @@ function setGameInfo(serverUUID) {
|
|||||||
|
|
||||||
remotefs.writeFileSync(__dirname+"\\assetInfo.php", asseturl);
|
remotefs.writeFileSync(__dirname+"\\assetInfo.php", asseturl);
|
||||||
if (result.hasOwnProperty('endpoint')) {
|
if (result.hasOwnProperty('endpoint')) {
|
||||||
var httpendpoint = result.endpoint.replace("https://", "http://")
|
var httpendpoint = result.endpoint.replace("https://", "http://");
|
||||||
remotefs.writeFileSync(__dirname+"\\rankurl.txt", httpendpoint+"getranks");
|
remotefs.writeFileSync(__dirname+"\\rankurl.txt", httpendpoint+"getranks");
|
||||||
// Write these out too
|
// Write these out too
|
||||||
remotefs.writeFileSync(__dirname+"\\sponsor.php", httpendpoint+"upsell/sponsor.png");
|
remotefs.writeFileSync(__dirname+"\\sponsor.php", httpendpoint+"upsell/sponsor.png");
|
||||||
@ -179,7 +179,7 @@ function setGameInfo(serverUUID) {
|
|||||||
address = result.ip.substr(0, sepPos);
|
address = result.ip.substr(0, sepPos);
|
||||||
port = result.ip.substr(sepPos + 1);
|
port = result.ip.substr(sepPos + 1);
|
||||||
} else {
|
} else {
|
||||||
address = result.ip
|
address = result.ip;
|
||||||
port = 23000 // default
|
port = 23000 // default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div class="row flex-fill">
|
<div class="row flex-fill">
|
||||||
<div class="col"><button class="btn btn-primary border rounded border-primary pb-1 pt-1 mr-2 pl-2 pr-2" data-toggle="tooltip" data-bs-tooltip="" type="button" title="Github Page" onclick="window.open('https://github.com/OpenFusionProject/OpenFusion','_blank');"><i class="fab fa-github" style="font-size: 24px;"></i></button><button class="btn btn-primary border rounded border-primary pb-1 pt-1 pl-2 pr-2" data-toggle="tooltip" data-bs-tooltip="" type="button" title="DIscord Chat" onclick="window.open('https://discord.gg/DYavckB','_blank');"><i class="fab fa-discord" style="font-size: 24px; position:relative; top: 1px;"></i></button></div>
|
<div class="col"><button class="btn btn-primary border rounded border-primary pb-1 pt-1 mr-2 pl-2 pr-2" data-toggle="tooltip" data-bs-tooltip="" type="button" title="Github Page" onclick="window.open('https://github.com/OpenFusionProject/OpenFusion','_blank');"><i class="fab fa-github" style="font-size: 24px;"></i></button><button class="btn btn-primary border rounded border-primary pb-1 pt-1 pl-2 pr-2" data-toggle="tooltip" data-bs-tooltip="" type="button" title="Discord Chat" onclick="window.open('https://discord.gg/DYavckB','_blank');"><i class="fab fa-discord" style="font-size: 24px; position:relative; top: 1px;"></i></button></div>
|
||||||
<div class="col text-right"><button class="btn btn-primary border rounded border-primary" type="button" data-dismiss="modal">Close</button></div>
|
<div class="col text-right"><button class="btn btn-primary border rounded border-primary" type="button" data-dismiss="modal">Close</button></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user