mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
Fix web icons ignoring web_root (#291)
Fix the URLs for the item icons in the web interface ignoring the web_root config option. [travis skip]
This commit is contained in:
1 parent
ef6441ca46
commit
15ad64e356
1 file changed
+2
-2
+2
-2
@@ -187,7 +187,7 @@ function replaceAll(target, search, replacement) {
|
||||
|
||||
function getImageFromName(name){
|
||||
if(imagelinks[name]){
|
||||
return imagelinks[name];
|
||||
return root + imagelinks[name].slice(1);
|
||||
} else if(imagedata[name]) {
|
||||
return "https://wiki.factorio.com/images/" + imagedata[name] + ".png";
|
||||
} else if(factorioLocale["entity-name"] && factorioLocale["entity-name"][name]){
|
||||
@@ -201,7 +201,7 @@ function getImageFromName(name){
|
||||
} else return `${root}pictures/unknown-item.png`;
|
||||
}
|
||||
window.factorioLocale = {};
|
||||
$.getJSON("/api/getFactorioLocale", (locale) => {
|
||||
$.getJSON(`${root}api/getFactorioLocale`, (locale) => {
|
||||
window.factorioLocale = locale;
|
||||
});
|
||||
// image data
|
||||
|
||||
Reference in new issue
Block a user