Match same letter without accent in autocomplete

Also, this CL adds the medium version of the Open Sans font so it's
loaded correctly in the autocomplete box and elsewhere in the web.

The autocomplete also works when inputting any number of characters now,
it is no longer necessary to write at least 3 characters before it
worked.

Change-Id: I6ba3a33596bde0ae95bed1f198722f4fd164591d
diff --git a/index.php b/index.php
index 65baf23..d72121b 100644
--- a/index.php
+++ b/index.php
@@ -18,7 +18,9 @@
 		<meta name="apple-mobile-web-app-capable" content="yes">
 		<meta name="apple-mobile-web-app-status-bar-style" content="green">
 
-		<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
+		<link rel="preconnect" href="https://fonts.googleapis.com">
+		<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+		<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;1,400;1,500" rel="stylesheet">
 
 		<link rel="stylesheet" href="./css/basic.css" />
 		<link rel="stylesheet" href="./css/login.css" />
diff --git a/js/autocomplete.js b/js/autocomplete.js
index d3885d9..c756789 100644
--- a/js/autocomplete.js
+++ b/js/autocomplete.js
@@ -8,17 +8,19 @@
     /*close any already open lists of autocompleted values*/
     clearLists();
     document.querySelector(".md-google-search__empty-btn").style.display = (val ? "block" : "none");
-    if (!val || val.length < 3) return false;
+    if (!val) val = "";
     currentFocus = -1;
     var is_empty = true;
 
     /*for each item in the object...*/
     for (node in obj) {
       var nomNode = obj[node].nomcomplet;
+      var nomNodeNormalized = nomNode.normalize('NFD').replace(/\p{Diacritic}/gu, '').toUpperCase();
+      var valNormalized = val.normalize('NFD').replace(/\p{Diacritic}/gu, '').toUpperCase();
 
-      if (nomNode.toUpperCase().includes(val.toUpperCase())) {
+      if (nomNodeNormalized.includes(valNormalized)) {
         is_empty = false;
-        var parts = nomNode.toUpperCase().split(val.toUpperCase());
+        var parts = nomNodeNormalized.split(valNormalized);
 
         /*create a DIV element for each matching element:*/
         b = document.createElement("div");
diff --git a/killer-chat.php b/killer-chat.php
index 3d9a422..eeda409 100644
--- a/killer-chat.php
+++ b/killer-chat.php
@@ -9,7 +9,9 @@
 ?>
 
 <head>
-<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;1,400;1,500" rel="stylesheet">
 <link rel="stylesheet" href="./css/basic.css" />
 <link rel="stylesheet" href="./css/main.css" />
 
diff --git a/main.php b/main.php
index c4e370d..4c995f1 100644
--- a/main.php
+++ b/main.php
@@ -21,8 +21,9 @@
 		<meta name="apple-mobile-web-app-capable" content="yes">
 		<meta name="apple-mobile-web-app-status-bar-style" content="green">
 
-
-		<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
+		<link rel="preconnect" href="https://fonts.googleapis.com">
+		<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+		<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;1,400;1,500" rel="stylesheet">
 
 		<link rel="stylesheet" href="./css/basic.css" />
 		<link rel="stylesheet" href="./css/main.css" />
diff --git a/ranking.php b/ranking.php
index 0bb3d72..8f2e557 100644
--- a/ranking.php
+++ b/ranking.php
@@ -1,7 +1,9 @@
 <html>
 <head>
 	<meta name="viewport" content="width=device-width, initial-scale=1">
-	<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
+	<link rel="preconnect" href="https://fonts.googleapis.com">
+	<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+	<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;1,400;1,500" rel="stylesheet">
 	<link rel="stylesheet" href="./css/ranking.css" />
 </head>
 
diff --git a/victim-chat.php b/victim-chat.php
index 193b738..b50d506 100644
--- a/victim-chat.php
+++ b/victim-chat.php
@@ -9,7 +9,9 @@
 ?>
 
 <head>
-<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
+<link rel="preconnect" href="https://fonts.googleapis.com">
+<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
+<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;1,400;1,500" rel="stylesheet">
 <link rel="stylesheet" href="./css/basic.css" />
 <link rel="stylesheet" href="./css/main.css" />