[openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

Anton Khorev notifications at github.com
Tue Jul 15 16:39:42 UTC 2025


@AntonKhorev commented on this pull request.



> @@ -101,4 +112,108 @@
       scrollableList.scrollLeft = scrollableList.scrollWidth - scrollableList.offsetWidth;
     }
   }
+
+  function previewWikidataValue($btn) {
+    if (!OSM.WIKIDATA_API_URL) return;
+    const items = $btn.data("qids");
+    if (!items?.length) return;
+    $btn.addClass("disabled").removeClass("wdt-preview");

Was [this](https://github.com/openstreetmap/openstreetmap-website/pull/6127#discussion_r2180631919) about that a disabled button still gets a focus outline? Then this:

```suggestion
    $btn.prop("disabled", true).removeClass("wdt-preview");
```

and later
```js
      .catch(() => $btn.prop("disabled", false).addClass("wdt-preview"));
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6127#pullrequestreview-3021220913
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6127/review/3021220913 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250715/9599cc52/attachment.htm>


More information about the rails-dev mailing list