mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 16:23:12 +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){
|
function getImageFromName(name){
|
||||||
if(imagelinks[name]){
|
if(imagelinks[name]){
|
||||||
return imagelinks[name];
|
return root + imagelinks[name].slice(1);
|
||||||
} else if(imagedata[name]) {
|
} else if(imagedata[name]) {
|
||||||
return "https://wiki.factorio.com/images/" + imagedata[name] + ".png";
|
return "https://wiki.factorio.com/images/" + imagedata[name] + ".png";
|
||||||
} else if(factorioLocale["entity-name"] && factorioLocale["entity-name"][name]){
|
} else if(factorioLocale["entity-name"] && factorioLocale["entity-name"][name]){
|
||||||
@@ -201,7 +201,7 @@ function getImageFromName(name){
|
|||||||
} else return `${root}pictures/unknown-item.png`;
|
} else return `${root}pictures/unknown-item.png`;
|
||||||
}
|
}
|
||||||
window.factorioLocale = {};
|
window.factorioLocale = {};
|
||||||
$.getJSON("/api/getFactorioLocale", (locale) => {
|
$.getJSON(`${root}api/getFactorioLocale`, (locale) => {
|
||||||
window.factorioLocale = locale;
|
window.factorioLocale = locale;
|
||||||
});
|
});
|
||||||
// image data
|
// image data
|
||||||
|
|||||||
Reference in new issue
Block a user