Typescript for frontend code.
This commit is contained in:
18
client/common-client-plugin.ts
Normal file
18
client/common-client-plugin.ts
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
'use strict'
|
||||
|
||||
function register ({ registerHook }: RegisterOptions): void {
|
||||
registerHook({
|
||||
target: 'action:router.navigation-end',
|
||||
handler: () => {
|
||||
const container = document.querySelector('#peertube-plugin-livechat-container')
|
||||
if (container) {
|
||||
container.remove()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
register
|
||||
}
|
Reference in New Issue
Block a user