Just after finishing Rising Kaka, another Super Rabbit comes rushing in. However, Super Rabbit's shooting skills really need to be improved.
Still the same problem: when a user who has installed the Super Rabbit IE toolbar purchases an automatically shipped product, the purchase reminder box in the form of a LightBox disappears as soon as it is displayed. The gray masking layer is still displayed, and the user cannot continue to operate.
According to research, Super Rabbit’s blocking principle for blocking ads is more arbitrary. As long as a code similar to “div.style.position=absolute” appears in the JavaScript code, the div will be hidden. Not only that, Super Rabbit will also check the elements on the page, as long as an element has the position style attribute and any matching top/left attribute set inline, such as "
xxx
", it will also be hidden.
But the difference with Rising Kaka is that Super Rabbit will not erase the absolutely positioned elements from the DOM. Instead, set the element's style.visibility = hidden. This is why the auto-ship purchase reminder box disappears.
How to avoid blind shooting with Super Rabbit’s gun? It's actually very simple. Just don't use JavaScript or set the CSS properties related to absolute positioning inline. These CSS properties can be defined directly in the style sheet file or in the form of class or id (this is what should be done).
If you have to use JavaScript to set absolute positioning attributes, such as some menu/animation effects. It needs to be solved through scripting. Do you still remember the difference between Super Rabbit and Rising Kaka's handling of floating ads? The pseudo code may be as follows:
I also hate floating ads, but Taobao’s page is really clean, isn’t it
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn