-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChannelMemberDisplayFix.plugin.js
More file actions
34 lines (33 loc) · 984 Bytes
/
ChannelMemberDisplayFix.plugin.js
File metadata and controls
34 lines (33 loc) · 984 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//META{"name":"ChannelMemberDisplayFix"}*//
class ChannelMemberDisplayFix {
start () {
let visible = false
let check = setInterval(() => {
if ($('[class*="scroller-"].channel-members').length) {
if (!visible) {
visible = true
let element = $('[class*="scroller-"].channel-members')
element.on('scroll.ChannelMemberDisplayFix', e => {
if (e.currentTarget.scrollTop < 3) element.scrollTop(2)
})
element.scrollTop(2)
}
} else {
visible = false
}
}, 1000)
}
load () {}
unload () {}
stop () {
$('[class*="scroller-"].channel-members').off('scroll.ChannelMemberDisplayFix')
}
onMessage () {}
onSwitch () {}
observer () {}
getSettingsPanel () { return '' }
getName () { return 'ChannelMemberDisplayFix' }
getDescription () { return 'Fixes a weird display bug with the channel member list not expanding fully in certain conditions.' }
getVersion () { return '1.0.0' }
getAuthor () { return 'skildust' }
}