Threaded comments (Reply UI)

This commit is contained in:
2018-11-05 20:57:37 +09:00
parent 08497f0c37
commit 960b1e4b92
14 changed files with 133 additions and 46 deletions

View File

@ -1,5 +1,5 @@
import AnimeNotifier from "../AnimeNotifier"
import { delay, requestIdleCallback, findAllInside } from "../Utils"
import { delay, requestIdleCallback } from "../Utils"
// Search page reference
var emptySearchHTML = ""
@ -172,20 +172,10 @@ function showResponseInElement(arn: AnimeNotifier, url: string, typeName: string
}
await arn.innerHTML(element, html)
showSearchResults(arn, element)
arn.onNewContent(element)
}
}
export function showSearchResults(arn: AnimeNotifier, element: HTMLElement) {
// Do the same as for the content loaded event,
// except here we are limiting it to the element.
arn.app.ajaxify(element.getElementsByTagName("a"))
arn.lazyLoad(findAllInside("lazy", element))
arn.mountMountables(findAllInside("mountable", element))
arn.assignTooltipOffsets(findAllInside("tip", element))
}
export function searchBySpeech(arn: AnimeNotifier, element: HTMLElement) {
if(recognition) {
recognition.stop()