From e2e858c4f24346278238c8a138fdd137c7367dc6 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 1 Jun 2021 12:50:24 +0200 Subject: unicode: We're finding codepoints, not characters --- modules/unicode/index.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'modules/unicode/index.html') diff --git a/modules/unicode/index.html b/modules/unicode/index.html index 1832fe8..7b385ef 100644 --- a/modules/unicode/index.html +++ b/modules/unicode/index.html @@ -63,12 +63,12 @@ function handleResponse(json, input) { document.getElementById("index_input").innerHTML = input; elem = document.getElementById("index"); elem.innerHTML = ""; - elem.appendChild(makeCharacterDiv(json["index"])); + elem.appendChild(makeCodepointDiv(json["index"])); } else if (!index_container.classList.contains("invisible")) { index_container.classList.add("invisible"); } - var keys = ["chars", "search"]; + var keys = ["codepoints", "search"]; for (var i = 0; i < keys.length; i++) { document.getElementById(keys[i] + "_num").innerHTML = "(" + json[keys[i]].length + ")"; @@ -76,19 +76,18 @@ function handleResponse(json, input) { elem = document.getElementById(keys[i]); elem.innerHTML = ""; for (var j = 0; j < json[keys[i]].length; j++) { - elem.appendChild(makeCharacterDiv(json[keys[i]][j])); + elem.appendChild(makeCodepointDiv(json[keys[i]][j])); } } } -function makeCharacterDiv(row) { +function makeCodepointDiv(row) { var div = document.createElement("div"); - div.classList.add("character"); - populateCharacter(div, row); + populateCodepoint(div, row); return div; } -function populateCharacter(div, row) { +function populateCodepoint(div, row) { var span = document.createElement("span"); span.setAttribute("style", "display: inline-block; width: 7em; font-weight: bold;"); span.appendChild(document.createTextNode("U+" + row[0])); @@ -128,8 +127,8 @@ window.addEventListener("load", function() {
-

Characters

-
+

Codepoints

+

Found in descriptions

-- cgit v1.2.3-70-g09d2