@@ -27,6 +27,10 @@ function setup() {
2727 let label = document . createElement ( 'label' ) ;
2828 label . setAttribute ( 'for' , id ) ;
2929 label . innerText = profiles . rows [ i ] . obj [ "Name" ] ;
30+ let link = document . createElement ( 'a' ) ;
31+ link . href = "#" + database [ profiles . rows [ i ] . obj [ "Name" ] ] . title . replace ( " " , "" ) ;
32+ link . setAttribute ( 'onclick' , 'checkMe(' + ( i + 1 ) + ')' ) ;
33+ label . append ( link ) ;
3034 div . append ( btn , label , document . createElement ( 'br' ) ) ;
3135 list . append ( div ) ;
3236 }
@@ -38,6 +42,7 @@ function setup() {
3842 document . getElementById ( 'board' ) . append ( math ) ;
3943 let title = document . createElement ( 'h4' ) ;
4044 title . innerHTML = database [ elt . obj [ "Name" ] ] . title ;
45+ title . id = title . innerHTML . replace ( " " , "" ) ;
4146 let main = document . createElement ( 'div' ) ;
4247 math . append ( title , main ) ;
4348 let pic = document . createElement ( 'img' ) ;
@@ -70,4 +75,8 @@ function setup() {
7075 mathjax . src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" ;
7176 mathjax . defer = true ;
7277 document . head . appendChild ( mathjax ) ;
78+ }
79+
80+ function checkMe ( index ) {
81+ document . getElementById ( 'radio' + index ) . checked = true ;
7382}
0 commit comments