Fix for unclosed link in https://sushigirl.us/ announcement.

This commit is contained in:
ccd0 2020-02-03 00:19:40 -08:00
parent 1bb967d4ab
commit 4f20d47b97
2 changed files with 8 additions and 0 deletions

View File

@ -344,6 +344,9 @@ Main =
posts = []
errors = []
try
g.SITE.preParsingFixes?(board)
Main.addThreadsObserver = new MutationObserver Main.addThreads
Main.addPostsObserver = new MutationObserver Main.addPosts
Main.addThreadsObserver.observe board, {childList: true}

View File

@ -168,6 +168,11 @@ SW.tinyboard =
isFileURL: (url) ->
/\/src\/[^\/]+/.test(url.pathname)
preParsingFixes: (board) ->
# fixes effects of unclosed link in announcement
if (broken = $('a > input[name="board"]', board))
$.before broken.parentNode, broken
parseNodes: (post, nodes) ->
# Add vichan's span.poster_id around the ID if not already present.
return if nodes.uniqueID