peertube-plugin-livechat/client/common-client-plugin.js

22 lines
455 B
JavaScript
Raw Normal View History

'use strict'
function register ({ registerHook, _peertubeHelpers }) {
registerHook({
target: 'action:router.navigation-end',
handler: () => {
2021-02-20 15:03:44 +00:00
const el = document.querySelector('.peertube-plugin-livechat-init')
if (el) {
el.classList.remove('peertube-plugin-livechat-init')
}
document.querySelectorAll('.peertube-plugin-livechat-stuff')
.forEach(dom => dom.remove())
}
})
}
export {
register
}