15 lines
458 B
TypeScript
15 lines
458 B
TypeScript
import registerEvents from 'utilities/registerEvents';
|
|
import { reportEventHandler } from './report';
|
|
|
|
export default (): void => {
|
|
const entries: NodeList = document.querySelectorAll('.inbox-entry:not(.js-initialized)');
|
|
|
|
entries.forEach((element: HTMLElement) => {
|
|
registerEvents([
|
|
{ type: 'click', target: element.querySelector('[name=ib-report]'), handler: reportEventHandler }
|
|
]);
|
|
|
|
element.classList.add('js-initialized');
|
|
});
|
|
}
|