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

@ -9,9 +9,9 @@ import Analytics from "./Analytics"
import SideBar from "./SideBar"
import InfiniteScroller from "./InfiniteScroller"
import ServiceWorkerManager from "./ServiceWorkerManager"
import { displayAiringDate, displayDate, displayTime } from "./DateView"
import { findAll, canUseWebP, requestIdleCallback, swapElements, delay } from "./Utils"
import { checkNewVersionDelayed } from "./NewVersionCheck"
import { displayAiringDate, displayDate, displayTime } from "./DateView"
import { findAll, canUseWebP, requestIdleCallback, swapElements, delay, findAllInside } from "./Utils"
import * as actions from "./Actions"
export default class AnimeNotifier {
@ -954,6 +954,15 @@ export default class AnimeNotifier {
})
}
onNewContent(element: HTMLElement) {
// Do the same as for the content loaded event,
// except here we are limiting it to the element.
this.app.ajaxify(element.getElementsByTagName("a"))
this.lazyLoad(findAllInside("lazy", element))
this.mountMountables(findAllInside("mountable", element))
this.assignTooltipOffsets(findAllInside("tip", element))
}
scrollTo(target: HTMLElement) {
const duration = 250.0
const fullSin = Math.PI / 2