Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
off = () => {
delegate.off(evt, target, cb)
let idx = listeners.indexOf(cb)
if (idx >= 0) listeners.splice(idx, 1)
}
}
return () => {
document.removeEventListener('touchend', toggleOnTouch)
document.removeEventListener('click', toggleOnTouch)
document.removeEventListener('keyup', dismissOnEscape)
document.removeEventListener('gestureend', throttledReposition)
window.removeEventListener('scroll', throttledReposition)
window.removeEventListener('resize', throttledResize)
off('mouseover', SELECTOR_FOOTNOTE, showOnHover)
off('mouseout', SELECTOR_FOOTNOTE, hideOnHover)
}
}
off = () => {
delegate.off(evt, target, cb)
let idx = listeners.indexOf(cb)
if (idx >= 0) listeners.splice(idx, 1)
}
}
return () => {
document.removeEventListener('touchend', toggleOnTouch)
document.removeEventListener('click', toggleOnTouch)
document.removeEventListener('keyup', dismissOnEscape)
document.removeEventListener('gestureend', throttledReposition)
window.removeEventListener('scroll', throttledReposition)
window.removeEventListener('resize', throttledResize)
off('mouseover', SELECTOR_FOOTNOTE, showOnHover)
off('mouseout', SELECTOR_FOOTNOTE, hideOnHover)
}
}
onUnload() {
off('click', '#stream ol .op .reply', onClickReply)
off('click', '#stream ol .op .repost', onClickRepost)
},
}
onUnload() {
off('click', `.${CLASSNAME_CONTAINER} .op .reply`, onClickReply)
off('click', `.${CLASSNAME_CONTAINER} .op .repost`, onClickRepost)
},
}
onUnload() {
off('click', '#stream ol .op .reply', onClickReply)
off('click', '#stream ol .op .repost', onClickRepost)
},
}
onUnload() {
off('click', `.${CLASSNAME_CONTAINER} .op .reply`, onClickReply)
off('click', `.${CLASSNAME_CONTAINER} .op .repost`, onClickRepost)
},
}
onUnload() {
removeIndicators()
off('click', SELECTOR_KEYWORD_LINK, onClick, { capture: true })
unregisterBroadcastListener(onBroadcast)
},
}