Added effects to user lists

This commit is contained in:
Eduard Urbach 2017-07-19 13:21:01 +02:00
parent e57e67610f
commit 39e6853d7d
2 changed files with 11 additions and 3 deletions

View File

@ -20,4 +20,5 @@ component Users(users []*arn.User)
.user-avatars
each user in users
Avatar(user)
.mountable
Avatar(user)

View File

@ -468,19 +468,26 @@ export class AnimeNotifier {
}
modifyDelayed(className: string, func: (element: HTMLElement) => void) {
const delay = 20
const maxDelay = 1000
const delay = 20
let time = 0
let start = Date.now()
let maxTime = start + maxDelay
let collection = document.getElementsByClassName(className)
let mutations = []
let mountableTypes = {
general: start
}
let collection = document.getElementsByClassName(className)
if(collection.length === 0) {
return
}
// let delay = Math.min(maxDelay / collection.length, 20)
for(let i = 0; i < collection.length; i++) {
let element = collection.item(i) as HTMLElement
let type = element.dataset.mountableType || "general"