Home computickets Modal window appears later download DOM

Modal window appears later download DOM




There is a website with wallpaper , after a certain time, there pops out the model in order to disable adblock. There is an extension for Chrome User CSS and JS, which allows you to apply JS and CSS users to the page. Renate to DOM when it is loaded. There in the Count JS prescribe the following document.QuerySelector (‘. Adblock’). RemoveAttribute (‘Style’), but the attribute is not deleted, why is it going on? If this is prescribed in the Console of the developer’s panel in Chrome, everything is struck, because there all the DOM has already been loaded

watched … Div himself with Adblock boots later downloading the main DOM. Tried through DomContentLoaded … failed. How to be?

Answer 1

found a way to track the change of DOM. MutationObserver

var MutationObserver = New MutationObserver (FUNCTION (Mutations) {
 Mutations.Foreach (Function (Mutation) {
  Mutation.Target.RemoveAttribute ('Style')
MutationObserver.ObServe (Document, {
 attributes: true,
 CharacterData: True,
 AttributeoldValue: True,
 CharacterDataoldValue: True.

Thank you to those who tried to help

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions