No comment.

This commit is contained in:
Danielv123 committed 2017-07-09 17:18:54 +02:00
1 parent 7ce788e146
commit dd9e8d5029
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -61,6 +61,10 @@ Date.prototype.yyyymmdd = function(time) { // http://stackoverflow.com/questions
return this.getFullYear()+""+mm+""+dd+ ""; // padding
};
var date = new Date();
String.prototype.replaceAll = function(search, replacement) {
var target = this;
return target.split(search).join(replacement);
};
// image data
// key is the name of the item in the database, value is the name of the image on wiki.factorio.com/images/*
+1 -1
View File
@@ -9,7 +9,7 @@ function drawcontents(data) {
} else if(imagelinks[data[i].name]) {
img = imagelinks[data[i].name];
} else {
img = "https://wiki.factorio.com/images/" + capitalizeFirstLetter(data[i].name.replace('-','_')) + ".png";
img = "https://wiki.factorio.com/images/" + capitalizeFirstLetter(data[i].name.replaceAll('-','_')) + ".png";
}
var searchField = document.querySelector("#search");
if(!searchField.value || data[i].name.includes(searchField.value)) {