@@ -1600,13 +1632,13 @@ function launch(){
`);
// For "Link Planning / Edit Link" screen
- $("#airplaneModelDetails > div").before(`
`);
+ document.querySelector("#airplaneModelDetails > div").insertAdjacentHTML('beforebegin', `
`);
_updateChartOptionsIfNeeded();
_updateLatestOilPriceInHeader();
};
-$(document).ready(() => setTimeout(() => launch(), 1000));
+document.addEventListener('DOMContentLoaded', () => setTimeout(() => launch(), 1000)); // Replaced $(document).ready()
// Begin Cost per PAX
@@ -1659,10 +1691,10 @@ function _getPlaneCategoryFor(plane) {
let initialAirplaneModelStatsLoading = true;
unsafeWindow.updateAirplaneModelTable = function(sortProperty, sortOrder) {
- let distance = parseInt($("#flightRange").val(), 10);
- let runway = parseInt($("#runway").val(), 10);
- let min_capacity = parseInt($("#min_capacity").val(), 10);
- let min_circulation = parseInt($("#min_circulation").val(), 10);
+ let distance = parseInt(document.getElementById("flightRange").value, 10);
+ let runway = parseInt(document.getElementById("runway").value, 10);
+ let min_capacity = parseInt(document.getElementById("min_capacity").value, 10);
+ let min_circulation = parseInt(document.getElementById("min_circulation").value, 10);
let owned_only = document.getElementById("owned_only").checked;
let use_flight_total =document.getElementById("use_flight_total").checked;
@@ -1731,47 +1763,52 @@ unsafeWindow.updateAirplaneModelTable = function(sortProperty, sortOrder) {
}
if (!sortProperty && !sortOrder) {
- var selectedSortHeader = $('#airplaneModelSortHeader .cell.selected')
- sortProperty = selectedSortHeader.data('sort-property')
+ var selectedSortHeader = document.querySelector('#airplaneModelSortHeader .cell.selected');
+ sortProperty = selectedSortHeader.dataset.sortProperty;
if (sortProperty === 'capacity') {
sortProperty = 'max_capacity';
} else if (sortProperty === 'cpp' && use_flight_total) {
sortProperty = 'fuel_total';
}
- sortOrder = selectedSortHeader.data('sort-order')
+ sortOrder = selectedSortHeader.dataset.sortOrder;
}
//sort the list
loadedModelsOwnerInfo.sort(sortByProperty(sortProperty, sortOrder == "ascending"));
- var airplaneModelTable = $("#airplaneModelTable")
- airplaneModelTable.children("div.table-row").remove()
+ var airplaneModelTable = document.getElementById("airplaneModelTable");
+ airplaneModelTable.querySelectorAll("div.table-row").forEach(el => el.remove());
var cppValues = loadedModelsOwnerInfo.filter(l => l.shouldShow).map(l => l.cpp);
var cppMax = Math.max(...cppValues);
var cppMin = Math.max(Math.min(...cppValues), 0);
- $.each(loadedModelsOwnerInfo, function(index, modelOwnerInfo) {
+ loadedModelsOwnerInfo.forEach(function(modelOwnerInfo) { // Replaced $.each
if (!modelOwnerInfo.shouldShow) {
return;
}
- var row = $("
")
+ var row = document.createElement('div');
+ row.className = 'table-row clickable';
+ row.style.cssText = (modelOwnerInfo.isOwned ? "background: green;" : '');
+ row.dataset.modelId = modelOwnerInfo.id;
+ row.setAttribute('onclick', 'selectAirplaneModel(loadedModelsById[' + modelOwnerInfo.id + '])');
+
if (modelOwnerInfo.isFavorite) {
- row.append("
" + modelOwnerInfo.name + "
")
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.name + "
");
} else {
- row.append("
" + modelOwnerInfo.name + "
")
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.name + "
");
}
- row.append("
" + modelOwnerInfo.family + "
")
- row.append("
" + commaSeparateNumber(modelOwnerInfo.price) + "
")
- row.append("
" + modelOwnerInfo.capacity + " (" + (modelOwnerInfo.capacity * modelOwnerInfo.max_rotation) + ")
")
- row.append("
" + modelOwnerInfo.range + " km
")
- row.append("
" + modelOwnerInfo.fuelBurn + "
")
- row.append("
" + modelOwnerInfo.lifespan / 52 + " yrs
")
- row.append("
" + modelOwnerInfo.speed + " km/h
")
- row.append("
" + modelOwnerInfo.runwayRequirement + " m
")
- row.append("
" + modelOwnerInfo.assignedAirplanes.length + "/" + modelOwnerInfo.availableAirplanes.length + "/" + modelOwnerInfo.constructingAirplanes.length + "
")
- row.append("
" + modelOwnerInfo.max_rotation + "
")
- row.append("
" + commaSeparateNumber(Math.round(modelOwnerInfo.cpp)) + "
")
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.family + "
");
+ row.insertAdjacentHTML('beforeend', "
" + commaSeparateNumber(modelOwnerInfo.price) + "
");
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.capacity + " (" + (modelOwnerInfo.capacity * modelOwnerInfo.max_rotation) + ")
");
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.range + " km
");
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.fuelBurn + "
");
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.lifespan / 52 + " yrs
");
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.speed + " km/h
");
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.runwayRequirement + " m
");
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.assignedAirplanes.length + "/" + modelOwnerInfo.availableAirplanes.length + "/" + modelOwnerInfo.constructingAirplanes.length + "
");
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.max_rotation + "
");
+ row.insertAdjacentHTML('beforeend', "
" + commaSeparateNumber(Math.round(modelOwnerInfo.cpp)) + "
");
let discountTier;
if (modelOwnerInfo.discountPercent > 40) {
@@ -1783,15 +1820,15 @@ unsafeWindow.updateAirplaneModelTable = function(sortProperty, sortOrder) {
} else {
discountTier = 3;
}
- row.append("
" + modelOwnerInfo.discountPercent + "
")
- row.append("
" + modelOwnerInfo.in_use + "
")
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.discountPercent + "
");
+ row.insertAdjacentHTML('beforeend', "
" + modelOwnerInfo.in_use + "
");
if (selectedModelId == modelOwnerInfo.id) {
- row.addClass("selected")
+ row.classList.add("selected")
selectAirplaneModel(modelOwnerInfo)
}
- airplaneModelTable.append(row)
+ airplaneModelTable.appendChild(row)
});
}
@@ -1817,17 +1854,17 @@ if (columnWidthPercents.reduce((sum, val) => sum += val, 0) !== 100) {
}
-$("#airplaneModelSortHeader").append("
⏲
");
-$("#airplaneModelSortHeader").append("
$/🧍
");
-$("#airplaneModelSortHeader").append("
%🔽
");
-$("#airplaneModelSortHeader").append("
#✈
");
+document.getElementById("airplaneModelSortHeader").insertAdjacentHTML('beforeend', "
⏲
");
+document.getElementById("airplaneModelSortHeader").insertAdjacentHTML('beforeend', "
$/🧍
");
+document.getElementById("airplaneModelSortHeader").insertAdjacentHTML('beforeend', "
%🔽
");
+document.getElementById("airplaneModelSortHeader").insertAdjacentHTML('beforeend', "
#✈
");
const headerCells = document.querySelectorAll('#airplaneModelSortHeader .cell');
for (var i = 0; i < headerCells.length; i++) {
- headerCells[i].style = `width: ${columnWidthPercents[i]}%`
+ headerCells[i].style.width = `${columnWidthPercents[i]}%`;
}
-$('#airplaneModelTable .table-header').html(`
+document.querySelector('#airplaneModelTable .table-header').innerHTML = `
@@ -1842,9 +1879,9 @@ $('#airplaneModelTable .table-header').html(`
-`);
+`;
-$("#airplaneCanvas .mainPanel .section .table .table-header:first").append(`
+document.querySelector("#airplaneCanvas .mainPanel .section .table .table-header:first").insertAdjacentHTML('beforeend', `
Distance:
Runway length:
Min. Capacity:
@@ -1856,10 +1893,10 @@ $("#airplaneCanvas .mainPanel .section .table .table-header:first").append(`
`);
-$("#airplaneCanvas .mainPanel .section .detailsGroup .market.details").attr({style: 'width: 100%; height: calc(100% - 30px); display: block;'});
+document.querySelector("#airplaneCanvas .mainPanel .section .detailsGroup .market.details").style.cssText = 'width: 100%; height: calc(100% - 30px); display: block;';
-$('[data-sort-property="totalOwned"]').text('Owned')
-$('[data-sort-property="totalOwned"]').attr({style: 'width: 6%;'});
+document.querySelector('[data-sort-property="totalOwned"]').textContent = 'Owned';
+document.querySelector('[data-sort-property="totalOwned"]').style.width = '6%';
var newDataFilterElements = [
@@ -1872,7 +1909,7 @@ var newDataFilterElements = [
]
for (var el of newDataFilterElements) {
- $(el).change(function(){unsafeWindow.updateAirplaneModelTable()});
+ document.querySelector(el).addEventListener('change', function(){unsafeWindow.updateAirplaneModelTable()});
}
//* Link Cost Preview
@@ -1933,7 +1970,7 @@ unsafeWindow.updateModelInfo = function(modelId) {
let linkModel = activeLink.modelPlanLinkInfo.find(plane => plane.modelId == modelId);
//console.log({loadedModelsById, model, linkModel})
- let serviceLevel = parseInt($("#planLinkServiceLevel").val());
+ let serviceLevel = parseInt(document.getElementById("planLinkServiceLevel").value);
let frequency = 0;
let plane_category = _getPlaneCategoryFor(model);
@@ -2018,9 +2055,9 @@ unsafeWindow.updateModelInfo = function(modelId) {
let maintenance = 0;
let depreciationRate = 0;
- for (let row of $(".frequencyDetail .airplaneRow")) {
- let airplane = $(row).data("airplane");
- let freq = parseInt($(row).children(".frequency").val());
+ document.querySelectorAll(".frequencyDetail .airplaneRow").forEach(function(row) { // Replaced jQuery selector and iteration
+ let airplane = $(row).data("airplane"); // Keep .data()
+ let freq = parseInt(row.querySelector(".frequency").value); // Replaced .children(".frequency").val()
let futureFreq = freq - airplane.frequency;
let flightTime = freq * 2 * (linkModel.duration + model.turnaroundTime);
@@ -2036,7 +2073,7 @@ unsafeWindow.updateModelInfo = function(modelId) {
maintenance += model.capacity * 100 * utilisation;
frequency += freq;
- }
+ });
if (frequency == 0){
let maxFlightMinutes = 4 * 24 * 60;
@@ -2067,17 +2104,17 @@ unsafeWindow.updateModelInfo = function(modelId) {
let staffTotal = Math.floor(basic + staffPerFrequency * frequency + staffPer1000Pax * model.capacity * frequency / 1000);
- $('#airplaneModelDetails #FCPF').text("$" + commaSeparateNumber(Math.floor(fuelCost)));
- $('#airplaneModelDetails #CCPF').text("$" + commaSeparateNumber(Math.floor(crewCost)));
- $('#airplaneModelDetails #AFPF').text("$" + commaSeparateNumber(airportFees));
- $('#airplaneModelDetails #depreciation').text("$" + commaSeparateNumber(Math.floor(depreciationRate)));
- $('#airplaneModelDetails #SSPF').text("$" + commaSeparateNumber(Math.floor(servicesCost)));
- $('#airplaneModelDetails #maintenance').text("$" + commaSeparateNumber(Math.floor(maintenance)));
- $('#airplaneModelDetails #cpp').text("$" + commaSeparateNumber(Math.floor(cost / (model.capacity * frequency))) + " * " + (model.capacity * frequency));
- $('#airplaneModelDetails #cps').text("$" + commaSeparateNumber(Math.floor(cost / staffTotal)) + " * " + staffTotal);
+ document.getElementById('FCPF').textContent = "$" + commaSeparateNumber(Math.floor(fuelCost));
+ document.getElementById('CCPF').textContent = "$" + commaSeparateNumber(Math.floor(crewCost));
+ document.getElementById('AFPF').textContent = "$" + commaSeparateNumber(airportFees);
+ document.getElementById('depreciation').textContent = "$" + commaSeparateNumber(Math.floor(depreciationRate));
+ document.getElementById('SSPF').textContent = "$" + commaSeparateNumber(Math.floor(servicesCost));
+ document.getElementById('maintenance').textContent = "$" + commaSeparateNumber(Math.floor(maintenance));
+ document.getElementById('cpp').textContent = "$" + commaSeparateNumber(Math.floor(cost / (model.capacity * frequency))) + " * " + (model.capacity * frequency);
+ document.getElementById('cps').textContent = "$" + commaSeparateNumber(Math.floor(cost / staffTotal)) + " * " + staffTotal;
}
-$("#airplaneModelDetails #speed").parent().after(`
+document.getElementById("speed").parentElement.insertAdjacentHTML('afterend', `
@@ -2140,48 +2177,56 @@ $("#airplaneModelDetails #speed").parent().after(`
unsafeWindow.researchFlight = async function researchFlight(fromAirportId, toAirportId) {
if (fromAirportId && toAirportId) {
- $('body .loadingSpinner').show();
- const result = await _request("research-link/" + fromAirportId + "/" + toAirportId).finally(() => $('body .loadingSpinner').hide());
+ document.querySelector('body .loadingSpinner').style.display = '';
+ const result = await _request("research-link/" + fromAirportId + "/" + toAirportId).finally(() => document.querySelector('body .loadingSpinner').style.display = 'none');
- $("#searchCanvas").data(result);
+ $("#searchCanvas").data(result); // Keep .data()
var fromAirport = result.fromAirport;
var toAirport = result.toAirport;
loadAirportImage(fromAirport.id, $('#researchSearchResult img.fromAirport'));
loadAirportImage(toAirport.id, $('#researchSearchResult img.toAirport'));
- $("#researchSearchResult .fromAirportText").text(result.fromAirportText).attr("onclick", `showAirportDetails(${fromAirport.id})`);
- $("#researchSearchResult .fromAirport .population").text(commaSeparateNumber(result.fromAirport.population));
- $("#researchSearchResult .fromAirport .incomeLevel").text(result.fromAirport.incomeLevel);
- $("#researchSearchResult .toAirportText").text(result.toAirportText).attr("onclick", `showAirportDetails(${toAirport.id})`);
+ document.querySelector("#researchSearchResult .fromAirportText").textContent = result.fromAirportText;
+ document.querySelector("#researchSearchResult .fromAirportText").setAttribute("onclick", `showAirportDetails(${fromAirport.id})`);
+ document.querySelector("#researchSearchResult .fromAirport .population").textContent = commaSeparateNumber(result.fromAirport.population);
+ document.querySelector("#researchSearchResult .fromAirport .incomeLevel").textContent = result.fromAirport.incomeLevel;
+ document.querySelector("#researchSearchResult .toAirportText").textContent = result.toAirportText;
+ document.querySelector("#researchSearchResult .toAirportText").setAttribute("onclick", `showAirportDetails(${toAirport.id})`);
populateNavigation($("#researchSearchResult"));
- $("#researchSearchResult .toAirport .population").text(commaSeparateNumber(result.toAirport.population));
- $("#researchSearchResult .toAirport .incomeLevel").text(result.toAirport.incomeLevel);
- $("#researchSearchResult .relationship").html(getCountryFlagImg(result.fromAirport.countryCode) + " vs " + getCountryFlagImg(result.toAirport.countryCode) + getCountryRelationshipDescription(result.mutualRelationship));
- $("#researchSearchResult .distance").text(result.distance);
- $("#researchSearchResult .flightType").text(result.flightType);
- $("#researchSearchResult .demand").text(toLinkClassValueString(result.directDemand));
-
- var $breakdown = $("#researchSearchResult .directDemandBreakdown");
- $breakdown.find(".fromAirport .airportLabel").empty().append(getAirportSpan(fromAirport));
- $breakdown.find(".fromAirport .businessDemand").text(toLinkClassValueString(result.fromAirportBusinessDemand));
- $breakdown.find(".fromAirport .touristDemand").text(toLinkClassValueString(result.fromAirportTouristDemand));
- $breakdown.find(".toAirport .airportLabel").empty().append(getAirportSpan(toAirport));
- $breakdown.find(".toAirport .businessDemand").text(toLinkClassValueString(result.toAirportBusinessDemand));
- $breakdown.find(".toAirport .touristDemand").text(toLinkClassValueString(result.toAirportTouristDemand));
-
- $("#researchSearchResult .table.links .table-row").remove();
+ document.querySelector("#researchSearchResult .toAirport .population").textContent = commaSeparateNumber(result.toAirport.population);
+ document.querySelector("#researchSearchResult .toAirport .incomeLevel").textContent = result.toAirport.incomeLevel;
+ document.querySelector("#researchSearchResult .relationship").innerHTML = getCountryFlagImg(result.fromAirport.countryCode) + " vs " + getCountryFlagImg(result.toAirport.countryCode) + getCountryRelationshipDescription(result.mutualRelationship);
+ document.querySelector("#researchSearchResult .distance").textContent = result.distance;
+ document.querySelector("#researchSearchResult .flightType").textContent = result.flightType;
+ document.querySelector("#researchSearchResult .demand").textContent = toLinkClassValueString(result.directDemand);
+
+ var breakdownEl = document.querySelector("#researchSearchResult .directDemandBreakdown");
+ var fromAirportLabel = breakdownEl.querySelector(".fromAirport .airportLabel");
+ fromAirportLabel.innerHTML = '';
+ fromAirportLabel.appendChild(getAirportSpan(fromAirport));
+ breakdownEl.querySelector(".fromAirport .businessDemand").textContent = toLinkClassValueString(result.fromAirportBusinessDemand);
+ breakdownEl.querySelector(".fromAirport .touristDemand").textContent = toLinkClassValueString(result.fromAirportTouristDemand);
+ var toAirportLabel = breakdownEl.querySelector(".toAirport .airportLabel");
+ toAirportLabel.innerHTML = '';
+ toAirportLabel.appendChild(getAirportSpan(toAirport));
+ breakdownEl.querySelector(".toAirport .businessDemand").textContent = toLinkClassValueString(result.toAirportBusinessDemand);
+ breakdownEl.querySelector(".toAirport .touristDemand").textContent = toLinkClassValueString(result.toAirportTouristDemand);
+
+ document.querySelectorAll("#researchSearchResult .table.links .table-row").forEach(el => el.remove());
const usedModels = [];
- $.each(result.links, function(index, link) {
- var $row = $("
" + link.airlineName + "
" + link.modelName + "
" + toLinkClassValueString(link.price, "$") + "
" + toLinkClassValueString(link.capacity) + "
" + link.computedQuality + "
" + link.frequency + "
");
- $('#researchSearchResult .table.links').append($row);
+ result.links.forEach(function(link) { // Replaced $.each
+ var row = document.createElement('div');
+ row.className = 'table-row';
+ row.innerHTML = `
${link.airlineName}
${link.modelName}
${toLinkClassValueString(link.price, "$")}
${toLinkClassValueString(link.capacity)}
${link.computedQuality}
${link.frequency}
`;
+ document.querySelector('#researchSearchResult .table.links').appendChild(row);
usedModels.push(link.modelId);
});
if (result.links.length == 0) {
- $('#researchSearchResult .table.links').append("
");
+ document.querySelector('#researchSearchResult .table.links').insertAdjacentHTML('beforeend', "
");
}
assignAirlineColors(result.consumptions, "airlineId");
plotPie(result.consumptions, null, $("#researchSearchResult .linksPie"), "airlineName", "soldSeats");
- $('#researchSearchResult').show();
+ document.getElementById('researchSearchResult').style.display = '';
const minRunway = Math.min(fromAirport.runwayLength, toAirport.runwayLength);
const distance = result.distance;
@@ -2190,21 +2235,24 @@ unsafeWindow.researchFlight = async function researchFlight(fromAirportId, toAir
var arrayModels = Object.values(loadedModelsById).map(model => ({ ...model, used: usedModels.includes(model.id) }));
arrayModels = sortPreserveOrder(arrayModels, "used", false);
- var $select = $("#researchFlightModelSelect").empty();
+ var selectEl = document.getElementById("researchFlightModelSelect");
+ selectEl.innerHTML = ''; // Replaced .empty()
var selectedModelId = result.links.length > 0 ? result.links[0].modelId : null;
- $.each(arrayModels, function(id, model) {
+ arrayModels.forEach(function(model) { // Replaced $.each
if (model.range >= distance && model.runwayRequirement <= minRunway) {
if (selectedModelId === null) selectedModelId = model.id;
let flightDuration = calcFlightTime(model, distance);
let maxFlightMinutes = 4 * 24 * 60;
let frequency = Math.floor(maxFlightMinutes / ((flightDuration + model.turnaroundTime) * 2));
- var $option = $("
").attr("value", model.id).text(model.name + " (" + frequency + ")");
- if(model.used) $option.addClass("highlight-text");
- $select.append($option);
+ var option = document.createElement("option");
+ option.value = model.id;
+ option.textContent = model.name + " (" + frequency + ")";
+ if(model.used) option.classList.add("highlight-text");
+ selectEl.appendChild(option);
}
});
if (selectedModelId) {
- $select.val(selectedModelId);
+ selectEl.value = selectedModelId;
researchUpdateModelInfo(selectedModelId);
}
}
@@ -2212,10 +2260,10 @@ unsafeWindow.researchFlight = async function researchFlight(fromAirportId, toAir
function _genericUpdateModelInfo(modelId, routeInfo, containerSelector, serviceLevel) {
let model = loadedModelsById[modelId];
- let $container = $(containerSelector);
+ let containerEl = document.querySelector(containerSelector);
- $container.find('.selectedModel').val(modelId);
- $container.find('#modelName').text(model.name);
+ containerEl.querySelector('.selectedModel').value = modelId;
+ containerEl.querySelector('#modelName').textContent = model.name;
// Basic model details
let detailsHtml = `
@@ -2277,34 +2325,40 @@ function _genericUpdateModelInfo(modelId, routeInfo, containerSelector, serviceL
Cost per PAX: $${commaSeparateNumber(Math.floor(costPerPax))}
`;
- $container.find('#cpp-costs-container').html(detailsHtml);
+ containerEl.querySelector('#cpp-costs-container').innerHTML = detailsHtml;
- $container.find('.manufacturer').html(`
${model.manufacturer} `).append(getCountryFlagImg(model.countryCode));
- $container.find('.price').text("$" + commaSeparateNumber(model.price));
- $container.find('#lifespan').text(model.lifespan / 52 + " years");
+ var manufacturerEl = containerEl.querySelector('.manufacturer');
+ manufacturerEl.innerHTML = `
${model.manufacturer} `;
+ manufacturerEl.appendChild(getCountryFlagImg(model.countryCode));
+ containerEl.querySelector('.price').textContent = "$" + commaSeparateNumber(model.price);
+ containerEl.querySelector('#lifespan').textContent = model.lifespan / 52 + " years";
+ var deliveryEl = containerEl.querySelector('.delivery');
+ var addBtn = containerEl.querySelector('.add');
if (model.constructionTime == 0) {
- $container.find('.delivery').text("immediate").removeClass('warning');
- $container.find('.add').text('Purchase');
+ deliveryEl.textContent = "immediate";
+ deliveryEl.classList.remove('warning');
+ addBtn.textContent = 'Purchase';
} else {
- $container.find('.delivery').text(model.constructionTime + " weeks").addClass('warning');
- $container.find('.add').text('Place Order');
+ deliveryEl.textContent = model.constructionTime + " weeks";
+ deliveryEl.classList.add('warning');
+ addBtn.textContent = 'Place Order';
}
- model.rejection ? disableButton($container.find('.add'), model.rejection) : enableButton($container.find('.add'));
+ model.rejection ? disableButton(addBtn, model.rejection) : enableButton(addBtn);
}
unsafeWindow.researchUpdateModelInfo = function(modelId) {
- let routeInfo = $("#searchCanvas").data();
+ let routeInfo = $("#searchCanvas").data(); // Keep .data()
_genericUpdateModelInfo(modelId, routeInfo, '#researchAirplaneModelDetails', 40); // 40 is default service level
};
unsafeWindow.linkUpdateModelInfo = function(modelId) {
- let routeInfo = $("#detailsPanel").data();
+ let routeInfo = $("#detailsPanel").data(); // Keep .data()
_genericUpdateModelInfo(modelId, routeInfo, '#airplaneModelDetails', routeInfo.rawQuality);
};
if (REMOVE_MOVING_BACKGROUND === true) {
setTimeout(() => {
- $('body').attr({style:`background: ${SOLID_BACKGROUND_COLOR};background-color: ${SOLID_BACKGROUND_COLOR};background-image: none;`});
+ document.body.style.cssText = `background: ${SOLID_BACKGROUND_COLOR};background-color: ${SOLID_BACKGROUND_COLOR};background-image: none;`;
},1500);
}