Clean up semicolons, whitespace and a typo

This commit is contained in:
dongresource 2022-06-29 00:57:30 +02:00
parent 9bfe3d6d99
commit 0060f37e6c
4 changed files with 27 additions and 27 deletions

View File

@ -5,7 +5,7 @@ var today = new Date();
// so 11 is Dec. of this year, and 12 is Jan. of the next
var christmasBegin = new Date(today.getFullYear(), 11, 23);
var christmasEnd = new Date(today.getFullYear(), 12, 8);
var sf
var sf;
if((today >= christmasBegin && today <= christmasEnd)) {
console.log("Christmas Activated.");

View File

@ -40,10 +40,10 @@ function onResize() {
}
function launchGame() {
gameRunning = true
gameRunning = true;
var sel = document.getElementById("of-serverselector");
sel.remove()
sel.remove();
document.body.style.overflow = "hidden";
@ -75,6 +75,6 @@ function launchGame() {
var div = document.getElementById('client');
object.appendChild(embed);
div.appendChild(object);
document.title = "OpenFusion"
document.title = "OpenFusion";
onResize();
}

View File

@ -3,9 +3,9 @@ var remotefs = remote.require('fs-extra');
var dns = remote.require('dns');
var userdir = remote.require('app').getPath('userData');
var versionarray
var serverarray
var config
var versionarray;
var serverarray;
var config;
function enableServerListButtons() {
$('#of-connect-button').removeClass('disabled');
@ -35,7 +35,7 @@ function addServer() {
server['version'] = $("#addserver-versionselect option:selected").text();
//server['endpoint'] =
jsontomodify['servers'].push(server)
jsontomodify['servers'].push(server);
remotefs.writeFileSync(userdir+"\\servers.json", JSON.stringify(jsontomodify, null, 4));
loadServerList();
@ -99,13 +99,13 @@ function loadServerList() {
$.each(serverarray, function( key, value ) {
// Create the row, and populate the cells
var row = document.createElement('tr');
row.className = 'server-listing-entry'
row.className = 'server-listing-entry';
row.setAttribute('id', value.uuid);
var cellName = document.createElement('td');
cellName.textContent = value.description
cellName.textContent = value.description;
var cellVersion = document.createElement('td');
cellVersion.textContent = value.version
cellVersion.className = 'text-monospace'
cellVersion.textContent = value.version;
cellVersion.className = 'text-monospace';
row.appendChild(cellName);
row.appendChild(cellVersion);
@ -157,7 +157,7 @@ function setGameInfo(serverUUID) {
remotefs.writeFileSync(__dirname+"\\assetInfo.php", asseturl);
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");
// Write these out too
remotefs.writeFileSync(__dirname+"\\sponsor.php", httpendpoint+"upsell/sponsor.png");
@ -179,7 +179,7 @@ function setGameInfo(serverUUID) {
address = result.ip.substr(0, sepPos);
port = result.ip.substr(sepPos + 1);
} else {
address = result.ip
address = result.ip;
port = 23000 // default
}

View File

@ -62,7 +62,7 @@
</div>
<div class="modal-footer">
<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(&#39;https://github.com/OpenFusionProject/OpenFusion&#39;,&#39;_blank&#39;);"><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(&#39;https://discord.gg/DYavckB&#39;,&#39;_blank&#39;);"><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(&#39;https://github.com/OpenFusionProject/OpenFusion&#39;,&#39;_blank&#39;);"><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(&#39;https://discord.gg/DYavckB&#39;,&#39;_blank&#39;);"><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>
</div>