@hlfan commented on this pull request.
> + icon: ["P8972", "P154", "P14"].reduce((out, prop) => out ??
> entity.claims[prop]?.[0]?.mainsnak?.datavalue?.value, null),
+ description: localizedProperty("descriptions", langs)?.value,
+ article: localizedProperty("sitelinks", wikis)
+ };
+ return data;
+ }
+
+ function renderWikidataResponse(data, $btn) {
+ const cell = $("<td>")
+ .attr("colspan", 2)
+ .addClass("bg-body-tertiary");
+
+ if (data.icon && OSM.WIKIMEDIA_COMMONS_URL) {
+ $("<a>")
+ .attr("href", OSM.WIKIMEDIA_COMMONS_URL + "File:" + data.icon)
+ .append($("<img>").attr({ src: OSM.WIKIMEDIA_COMMONS_URL +
"Special:FilePath/" + data.icon, height: "32" }))
That worked out well, didn't it?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6127#discussion_r2214364546
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6127/review/3031115...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev