Changed DOM event listeners to MutationObserver on body element. Thanks @Stebalien!