Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(markets): replace the href=# controls with real buttons that retry in place

nirholas25995e752cb5
diff --git a/src/category-page.js b/src/category-page.js
index 4d4ac5af3..65823d0f5 100644
--- a/src/category-page.js
+++ b/src/category-page.js
@@ -321,10 +321,13 @@ function renderError() {
<h1 class="cv-h1">Category data unavailable</h1>
<div class="cv-empty" style="text-align:left">
<p style="margin:0">The market data source is temporarily unreachable. This usually clears in
- under a minute. <a href="#" data-action="reload">Reload the page</a> or head back to the
+ under a minute. <button type="button" class="cv-linkbtn" data-action="retry">Try again</button> or head back to the
<a href="/categories">categories index</a>.</p>
</div>`;
clearBelowHero();
+ // Re-run the real load rather than reloading the document: the skeletons come
+ // back and a recovered API repaints in place.
+ $('cat-hero').querySelector('[data-action="retry"]').addEventListener('click', () => main());
}
// ── SEO / document metadata ──────────────────────────────────────────────────
diff --git a/src/coin-page.js b/src/coin-page.js
index b592ba019..05a4de587 100644
--- a/src/coin-page.js
+++ b/src/coin-page.js
@@ -1017,11 +1017,14 @@ function renderError() {
<h1 class="cv-h1">Market data unavailable</h1>
<div class="cv-empty" style="text-align:left">
<p style="margin:0">The market data source is temporarily unreachable. This usually clears in
- under a minute. <a href="#" data-action="reload">Reload the page</a> or head back to the
+ under a minute. <button type="button" class="cv-linkbtn" data-action="retry">Try again</button> or head back to the
<a href="/coins">markets index</a>.</p>
</div>`;
$('cv-chart').innerHTML = '';
$('cv-stats').innerHTML = '';
+ // Re-run the real load rather than reloading the document: the skeletons come
+ // back and a recovered API repaints in place.
+ $('cv-head').querySelector('[data-action="retry"]').addEventListener('click', () => main());
}
// ── Data provenance ─────────────────────────────────────────────────────────
diff --git a/src/coin-pages.css b/src/coin-pages.css
index e0c22ce96..d884ca9c7 100644
--- a/src/coin-pages.css
+++ b/src/coin-pages.css
@@ -867,7 +867,10 @@ html.cv-page,
box-shadow: var(--cv-shadow-dropdown);
overflow: hidden;
}
-.cv-search-pop a {
+/* Options are anchors on /coins (each one navigates to a coin page) and plain
+ elements on /compare (picking one adds a column, it navigates nowhere).
+ Style the role, not the tag, so both listboxes look identical. */
+.cv-search-pop [role='option'] {
display: flex;
align-items: center;
gap: 0.625rem;
@@ -875,9 +878,10 @@ html.cv-page,
text-decoration: none;
color: var(--cv-text);
font-size: 0.875rem;
+ cursor: pointer;
}
-.cv-search-pop a:hover,
-.cv-search-pop a[data-active='1'] {
+.cv-search-pop [role='option']:hover,
+.cv-search-pop [role='option'][data-active='1'] {
background: var(--cv-surface-2);
}
.cv-search-pop img {
@@ -959,6 +963,30 @@ html.cv-page,
color: var(--cv-accent);
}
+/* An in-prose control that acts on this page (retry, clear a filter) is a button,
+ not a link: it navigates nowhere. It still reads as a link so the sentence it
+ sits in keeps working, and it gets the keyboard and focus behaviour a native
+ button already carries. */
+.cv-linkbtn {
+ appearance: none;
+ background: none;
+ border: 0;
+ padding: 0;
+ font: inherit;
+ color: var(--cv-accent);
+ cursor: pointer;
+ text-decoration: underline;
+ text-underline-offset: 2px;
+}
+.cv-linkbtn:hover {
+ color: var(--cv-accent-hover);
+}
+.cv-linkbtn:focus-visible {
+ outline: 2px solid var(--cv-accent);
+ outline-offset: 2px;
+ border-radius: 2px;
+}
+
.cv-skel {
position: relative;
overflow: hidden;
diff --git a/src/derivatives.js b/src/derivatives.js
index d25e43b61..7a559f436 100644
--- a/src/derivatives.js
+++ b/src/derivatives.js
@@ -174,9 +174,8 @@ function renderTable() {
const rows = sortedTickers();
if (!rows.length) {
- el.innerHTML = `<div class="cv-empty">No perpetual markets for ${esc(state.filter)}. <a href="#" id="dv-clear">Clear filter</a></div>`;
- $('dv-clear')?.addEventListener('click', (e) => {
- e.preventDefault();
+ el.innerHTML = `<div class="cv-empty">No perpetual markets for ${esc(state.filter)}. <button type="button" class="cv-linkbtn" id="dv-clear">Clear filter</button></div>`;
+ $('dv-clear')?.addEventListener('click', () => {
state.filter = 'all';
buildFilters();
renderTable();
diff --git a/src/stablecoins.js b/src/stablecoins.js
index 8b5e17bbf..6850a0c42 100644
--- a/src/stablecoins.js
+++ b/src/stablecoins.js
@@ -162,9 +162,8 @@ function renderTable() {
return;
}
if (!rows.length) {
- el.innerHTML = `<div class="cv-empty">No stablecoins match this filter. <a href="#" data-reset="1">Show all</a>.</div>`;
- el.querySelector('[data-reset]')?.addEventListener('click', (e) => {
- e.preventDefault();
+ el.innerHTML = `<div class="cv-empty">No stablecoins match this filter. <button type="button" class="cv-linkbtn" data-reset="1">Show all</button>.</div>`;
+ el.querySelector('[data-reset]')?.addEventListener('click', () => {
setFilter('all');
});
return;