diff -r 4d682779bd29 -r f81fe8250ed9 misc/flags_js.xhtml --- a/misc/flags_js.xhtml Tue Aug 22 22:19:28 2023 +0200 +++ b/misc/flags_js.xhtml Thu Aug 24 20:12:28 2023 +0200 @@ -142,15 +142,19 @@ var flag_compare = function(a, b) { if (a === "hedgewars") - return false; + return -1; else if (b === "hedgewars") - return true; + return 1; else if (a.startsWith("cm_") && !b.startsWith("cm_")) - return true; + return 1; else if (!a.startsWith("cm_") && b.startsWith("cm_")) - return false; + return -1; + else if (a > b) + return 1; + else if (a < b) + return -1; else - return a > b; + return 0; } flags.sort(flag_compare); @@ -204,7 +208,6 @@ img.id = "__flag_"+flag; h.lastChild.style.backgroundImage = 'url("'+h.href+'")'; - h.lastChild.lastChild.data = flag; h.title = flag; if (j%17 === 16 || i === flags.length-1)