diff --git a/public/index.html b/public/index.html index a3cdc8c..1da311d 100644 --- a/public/index.html +++ b/public/index.html @@ -29,8 +29,8 @@
manufacturer:
mpn:
family:
-
datasheet:
-
page:
+
datasheet:
+
page:
location:
stock:
diff --git a/public/partdb.js b/public/partdb.js index d94dbd5..5c5fa3f 100644 --- a/public/partdb.js +++ b/public/partdb.js @@ -109,14 +109,16 @@ function select_part() } // set URLs for (const field of urls) { - const a = document.getElementById('url_' + field); - if (null == a) { - continue; - } - if (undefined === part[field]) { - a.href = null; + const span = document.getElementById('url_' + field); + const text = span.innerText; + span.innerHTML = null; + if (undefined === part[field] || null == part[field]) { + span.innerHTML = text; } else { + const a = document.createElement('a'); a.href = part[field]; + a.innerText = text; + span.appendChild(a); } } // set distributors