Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- (function() {
- if (window.Element && !Element.prototype.closest) {
- Element.prototype.closest = function(s) {
- var matches = (this.document || this.ownerDocument).querySelectorAll(s),
- i, el = this;
- do {
- i = matches.length;
- while (--i >= 0 && matches.item(i) !== el) {};
- } while ((i < 0) && (el = el.parentElement));
- return el;
- };
- }
- window.isNativeFormClicked = false;
- window.isNativeFormFilled = false;
- window.isNativeFormSubmitted = false;
- document.addEventListener('click', function(event) {
- console.log('event.target - ', event.target);
- var nativeFormField = event.target.closest('.lobby-tabs-content .tab-pane');
- if (nativeFormField) {
- window.isNativeFormClicked = true;
- }
- setTimeout(function() {
- var nativeFormField = document.querySelector('.lobby-tabs-content .tab-pane .selected-data-exists');
- if (nativeFormField) {
- window.isNativeFormFilled = true;
- }
- }, 250);
- var nativeFormSubmited = event.target.closest('.lobby-tabs-content .tab-pane .search-wrapper-button');
- if (nativeFormSubmited) {
- window.isNativeFormSubmitted = true;
- }
- });
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement