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 // 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.");

View File

@ -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();
} }

View File

@ -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
} }

View File

@ -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(&#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 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>