Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- #%DIV_ID% .__lxG__splash-counter {background-color: transparent; color: #48647F;}
- #%DIV_ID% .__lxG__splash {background-color: white}
- </style>
- <script>
- (function() {
- var adContainerId = '%DIV_ID%';
- var parentSelector = '#' + adContainerId + '.__lxG__multi:not(.__lxG__splash-container)';
- var adContainer = document.querySelector(parentSelector);
- var viadsSelector = '.WfSayC[data-vads-ui-element="player"], div[data-vads-zone="6445"]';
- var lowerIndex = "2147483646";
- if (!adContainer) return;
- var styleTagId = 'style-for-' + adContainerId;
- if (!document.getElementById(styleTagId)) {
- var cssRules = `
- ${parentSelector} {
- visibility: hidden !important;
- opacity: 0 !important;
- }
- ${parentSelector}.splash-is-visible {
- visibility: visible !important;
- opacity: 1 !important;
- }
- `;
- var styleElement = document.createElement('style');
- styleElement.id = styleTagId;
- styleElement.innerHTML = cssRules;
- document.head.appendChild(styleElement);
- }
- var fixViadsZIndex = function() {
- var targetViads = document.querySelector(viadsSelector);
- if (targetViads) {
- targetViads.style.setProperty('--vads-player-z-index', lowerIndex, 'important');
- targetViads.style.setProperty('z-index', lowerIndex, 'important');
- }
- };
- var showContainer = function() {
- fixViadsZIndex();
- adContainer.classList.add('splash-is-visible');
- };
- if (adContainer.querySelector('.__lxG__not_empty_block')) {
- showContainer();
- return;
- }
- var observer = new MutationObserver(function(mutations) {
- fixViadsZIndex();
- if (adContainer.querySelector('.__lxG__not_empty_block')) {
- showContainer();
- }
- });
- observer.observe(document.body, {
- childList: true,
- subtree: true
- });
- fixViadsZIndex();
- })();
- </script>
Advertisement
Add Comment
Please, Sign In to add comment