@@ -165,6 +165,22 @@ async function addLevelIndicators() {
165165 const showTagsInEnglish = JSON . parse ( await getPrefs ( 'show_tags_in_english' , 'false' ) )
166166
167167 if ( document . querySelector ( ".label-success" ) || nick === "solvedac" ) {
168+ if ( levelData . algorithms ) {
169+ problemInfo . appendChild ( document . createElement ( "br" ) )
170+ }
171+ for ( var j = 0 ; j < levelData . algorithms . length ; j ++ ) {
172+ var algo = levelData . algorithms [ j ]
173+ var algorithmTag = document . createElement ( "a" )
174+ algorithmTag . setAttribute ( "href" , "https://solved.ac/problems/algorithms/" + algo . algorithm_id )
175+ if ( showTagsInEnglish ) {
176+ algorithmTag . innerText = algo . full_name_en
177+ } else {
178+ algorithmTag . innerText = algo . full_name_ko
179+ }
180+ algorithmTag . className = "algorithm_tag"
181+ problemInfo . appendChild ( algorithmTag )
182+ }
183+
168184 if ( levelData . level != 0 && ! standard ) {
169185 var difficultyVotesContainer = document . createElement ( "div" ) ;
170186 difficultyVotesContainer . className = "difficulty_vote_container"
@@ -186,26 +202,30 @@ async function addLevelIndicators() {
186202 + "</a> ➔ " + levelLabel ( vote . voted_level )
187203 difficultyVote . appendChild ( document . createElement ( "br" ) )
188204
189- var voteComment = document . createElement ( "div" )
205+ var voteCommentContainer = document . createElement ( "div" )
206+ var voteComment = document . createElement ( "span" )
207+ voteComment . className = "comment"
190208 voteComment . innerText = vote . comment
191209 if ( ! vote . comment ) {
192- voteComment . classList . add ( "comment_none" )
210+ voteCommentContainer . classList . add ( "comment_none" )
193211 voteComment . innerText = "난이도 의견을 입력하지 않았습니다"
194212 }
213+ difficultyVote . appendChild ( voteCommentContainer )
214+ voteCommentContainer . appendChild ( voteComment )
195215 if ( vote . algorithms ) {
196216 for ( var j = 0 ; j < vote . algorithms . length ; j ++ ) {
197217 var algo = vote . algorithms [ j ]
198- var algorithmTag = document . createElement ( "div" )
218+ var algorithmTag = document . createElement ( "a" )
219+ algorithmTag . setAttribute ( "href" , "https://solved.ac/problems/algorithms/" + algo . algorithm_id )
199220 if ( showTagsInEnglish ) {
200221 algorithmTag . innerText = algo . full_name_en
201222 } else {
202223 algorithmTag . innerText = algo . full_name_ko
203224 }
204225 algorithmTag . className = "algorithm_tag"
205- voteComment . appendChild ( algorithmTag )
226+ voteCommentContainer . appendChild ( algorithmTag )
206227 }
207228 }
208- difficultyVote . appendChild ( voteComment )
209229 difficultyVotesContainer . appendChild ( difficultyVote )
210230 }
211231 problemInfo . appendChild ( difficultyVotesContainer )
0 commit comments