Use double quotes

Convert existing mix of double quotes and single quotes to only use
double quotes unless the string contains double quotes.
This commit is contained in:
Hornwitser committed 2020-06-17 20:53:18 +02:00
1 parent efd759bec5
commit 34aaeee354
48 files changed
+708 -712

No files matched your search

+1 -1
View File
@@ -104,7 +104,7 @@ function doleDivider({
object.count /= ((_doleDivisionFactor[object.name]||0)+doleDivisionRetardation)/doleDivisionRetardation;
object.count = Math.round(object.count);
if (logItemTransfers) {
console.info(`Serving ${object.count}/${originalCount} ${object.name} from ${itemCount} ${object.name} with dole division factor ${(_doleDivisionFactor[object.name]||0)} (real=${((_doleDivisionFactor[object.name]||0)+doleDivisionRetardation)/doleDivisionRetardation}), item is ${itemCount > object.count?'stocked':'short'}.`);
console.info(`Serving ${object.count}/${originalCount} ${object.name} from ${itemCount} ${object.name} with dole division factor ${(_doleDivisionFactor[object.name]||0)} (real=${((_doleDivisionFactor[object.name]||0)+doleDivisionRetardation)/doleDivisionRetardation}), item is ${itemCount > object.count?"stocked":"short"}.`);
}
// Update existing items if item name already exists
+7 -7
View File
@@ -7,8 +7,8 @@ function drawcontents(data) {
// allow searching for multiple criteria separated by space
var searchArgs = document.querySelector("#search").value;
searchArgs = searchArgs.trim();
searchArgs = '(' + searchArgs.replace(/ +/g,")|(") + ')';
const search = new RegExp(searchArgs, 'i');
searchArgs = "(" + searchArgs.replace(/ +/g,")|(") + ")";
const search = new RegExp(searchArgs, "i");
data = data.filter(function(item) {
return search.test(item.name);
})
@@ -25,7 +25,7 @@ function drawcontents(data) {
let row = rows[i];
if(!row) {
row = document.createElement('tr');
row = document.createElement("tr");
row.innerHTML = "<td><div></div></td><td class=name></td><td class=count></td>";
table.appendChild(row);
}
@@ -51,13 +51,13 @@ function drawcontents(data) {
}
}
const name = row.querySelector('.name');
const name = row.querySelector(".name");
if(name.textContent !== localeName) {
name.textContent = localeName;
}
const count = row.querySelector('.count');
if(count.textContent !== ''+item.count) {
const count = row.querySelector(".count");
if(count.textContent !== ""+item.count) {
count.textContent = item.count;
}
});
@@ -93,6 +93,6 @@ function sortByKey(array, key) {
});
}
document.querySelector("#search").addEventListener('input', function() {
document.querySelector("#search").addEventListener("input", function() {
drawcontents();
});
+4 -4
View File
@@ -1,7 +1,7 @@
// These are libraries that does not have any units test, they are
// required here in order to track coverage for them.
require('../instance');
require('../master');
require('../dole');
require('../dole_nn_base');
require("../instance");
require("../master");
require("../dole");
require("../dole_nn_base");