PageSourceSearch

https://www.gazetadopovo.com.br/assets2/legacy-scripts/slider-script-01.js

js gazetadopovo.com.br collected 2026-09-24 07:54:54 UTC 10,076 bytes, 98 lines download raw bytes

1window.emAdsVideoSlider.load = function() {
2    var self = this,
3        div = document.getElementById(this.target),
4        css = `#` + window.emAdsVideoSlider.target + `{ position: fixed; z-index:99999999999; ` + (window.emAdsVideoSlider.bottom !== undefined ? 'bottom:' + window.emAdsVideoSlider.bottom + 'px;' : '') + (window.emAdsVideoSlider.right !== undefined ? 'right:' + window.emAdsVideoSlider.right + 'px;' : (window.emAdsVideoSlider.left !== undefined ? 'left:' + window.emAdsVideoSlider.left + 'px;' : 'right:0px;')) + `; } #` + window.emAdsVideoSlider.target + `{ width: ` + window.emAdsVideoSlider.player[0][0] + `px !important; height: ` + window.emAdsVideoSlider.player[0][1] + `px !important; } @media only screen and (max-width: 480px) { #` + window.emAdsVideoSlider.target + `{ width: ` + window.emAdsVideoSlider.player[1][0] + `px !important; height: ` + window.emAdsVideoSlider.player[1][1] + `px !important; } } .` + window.emAdsVideoSlider.target + `-close{ width: 20px; height: 20px; border: 1px solid #d0d0d0; text-align: center; cursor: pointer; background-color: #fff; font-family: Arial,sans-serif; font-size: 16px; position: absolute; font-weight: bold; ` + (window.emAdsVideoSlider.close !== undefined ? window.emAdsVideoSlider.close : 'left:0px;') + ` } .` + window.emAdsVideoSlider.target + `-close::before { content: "X"; }`;
5    document.body.insertAdjacentHTML('beforeend', '<style>' + css + '</style>');
6    this["mobile"] = navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad|android)/) ? true : false;
7    setTimeout(function() {
8        div.style.height = "auto";
9        div.style.display = "none";
10        self.visible = true;
11        self.init();
12    }, self.timeout !== undefined ? self.timeout : 1);
13};
14window.emAdsVideoSlider.init = function() {
15    if (this.adUnit != "" && this.target != "" && this.player != "") {
16        if (document.getElementById(this.target)) {
17            var self = this,
18                sizes = "";
19            if (this.keyValues === undefined) {
20                this["keyValues"] = [];
21            }
22            this.sizes.forEach(function(b, c) {
23                sizes += b.join("x") + (c < self.sizes.length - 1 ? "|" : "");
24            });
25            this.sizes = sizes;
26            this.action();
27        } else {
28            this["status"] = "not found";
29        }
30    }
31};
32window.emAdsVideoSlider.dimension = function() {
33    var ds = document.documentElement,
34        lm = this.screenLimit !== undefined ? (this.screenLimit > 0 ? this.screenLimit : 0) : 0;
35    ds = ds.clientWidth || window.innerWidth;
36    return ((lm > 0 && ds <= lm) || this.mobile) ? this.player[1] : this.player[0];
37};
38window.emAdsVideoSlider.action = function() {
39    if (this.started === undefined) {
40        this.started = true;
41        var self = this,
42            position = (function() {
43                if (self.positionKeyValue !== undefined) {
44                    if (self.positionKeyValue.key !== undefined) {
45                        return (self.mobile === false && self.positionKeyValue.desktop !== undefined) ? self.positionKeyValue.key + "%3D" + self.positionKeyValue.desktop + "%26" : ((self.mobile === true && self.positionKeyValue.mobile !== undefined) ? self.positionKeyValue.key + "%3D" + self.positionKeyValue.mobile + "%26" : "");
46                    } else {
47                        return "";
48                    }
49                } else {
50                    return "";
51                }
52            })(),
53            addKeyValue = position,
54            googleTag = window.top.googletag;
55        if (googleTag) {
56            if (typeof(googleTag.pubads) === "function") {
57                googleTag = googleTag.pubads();
58                if (typeof(googleTag.getTargetingKeys) === "function") {
59                    googleTag.getTargetingKeys().forEach(function(a) {
60                        googleTag.getTargeting(a).length > 0 ? (addKeyValue += a + "%3D" + googleTag.getTargeting(a) + ((self.keyValues.length > 0 && a == "Keywords") ? "," + self.keyValues.join(",") : "") + "%26") : "";
61                    });
62                }
63            }
64        }
65        var html = `<html> <head>
66<link rel="stylesheet" href="https://www.gazetadopovo.com.br/assets2/legacy-scripts/slider-script-02.css">
67<link rel="stylesheet" href="https://www.gazetadopovo.com.br/assets2/legacy-scripts/slider-script-03.css">
68<style>body{margin: 0; padding: 0;} .video-container {width: 100%; height: auto; } #player {width: 100%; } .video-container h1 {margin: 20px auto; text-align: center; } .video-js .vjs-big-play-button {top: 50%; left: 50%; transform: translate(-50%, -50%); } .container-new-video {pition: fixed; bottom: 5px; right: 5px; width: ` + this.dimension()[0] + `px; height: ` + this.dimension()[1] + `px; background: #0f3c61; } .blueBar {width: 100%; height: 25px; background: #0f3c61; pition: absolute; z-index: 1112; } .blueBar.top {top: 0; } .blueBar.bottom{bottom: 0; height: 15px; } .video-container.active-sticker {width: ` + this.dimension()[0] + `px; height: ` + this.dimension()[1] + `px; z-index: 5; background: #000;} .content_video-dimensions {width: ` + (this.dimension()[0] - 2) + `px;height: ` + this.dimension()[1] + `px; margin:0 auto;} .content_video_ima-controls-div{height: 1.4em !important;} .ima-controls-div{overflow:unset}.ima-mute-div{ display: block !important; z-index: 1200; top: -40px; height: 30px; left: 0px; width: 30px; }</style>
69<script src="https://imasdk.googleapis.com/js/sdkloader/ima3.js"></script>
70<script src="https://www.gazetadopovo.com.br/assets2/legacy-scripts/slider-script-04.js"></script>
71<script src="https://www.gazetadopovo.com.br/assets2/legacy-scripts/slider-script-05.js"></script>
72<script src="https://www.gazetadopovo.com.br/assets2/legacy-scripts/slider-script-06.js"></script>
73<script src="https://www.gazetadopovo.com.br/assets2/legacy-scripts/slider-script-07.js"></script> </head> <body>
74<script type="text/javascript"> var urlVast = "https://pubads.g.doubleclick.net/gampad/ads?sz=` + encodeURIComponent(this.sizes) + `&iu=` + encodeURIComponent(this.adUnit) + `&description_url="+encodeURIComponent(window.location.href)+"&vpmute=1&vpos=preroll&env=vp&vad_type=linear&gdfp_req=1&output=vast&unviewed_position_start=1&cust_params=` + addKeyValue + `&correlator="+Math.random()*99999999999999; </script>
75<div class="video-container active-sticker">
76<video id="content_video" class="video-js vjs-default-skin" poster="" preload="auto" playsinline>
77<source src="https://www.gazetadopovo.com.br/assets2/legacy-scripts/217003594435880914" type="video/mp4"></source> </video> </div>
78<script type="text/javascript"> var autoplayAllowed = false, autoplayRequiresMute = false, player = {}, wrapperDiv = "", startEvent = "click", verificationControl = 0; function verifyAd(){ if(verificationControl < 10){ var wf = window.frameElement; if(player.ads.isAdPlaying() !== false || player.ads.inAdBreak() !== false || player.ads.adType !== null){ wf !== null ? wf.parentNode.style.display = "block" : ""; verificationControl++; } else{ verificationControl++; setTimeout(verifyAd,500); } if (verificationControl === 1 && (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/Android/i))) { videojs("content_video").ready(function() { this.muted(true); this.play(); }); } } } function checkUnmutedAutoplaySupport(urlVast) { canAutoplay.video({timeout: 2000, muted: false}).then(({result, error}) => { if(result === false) { checkMutedAutoplaySupport(urlVast); } else { autoplayAllowed = true; autoplayRequiresMute = true; initPlayer(urlVast); } }); }; function checkMutedAutoplaySupport(urlVast) { canAutoplay.video({timeout: 2000, muted: true}).then(({result, error}) => { if(result === false) { autoplayAllowed = false; autoplayRequiresMute = false; } else { autoplayAllowed = true; autoplayRequiresMute = true; } initPlayer(urlVast); }); }; function initAdDisplayContainer() { player.ima.initializeAdDisplayContainer(); wrapperDiv.removeEventListener(startEvent, initAdDisplayContainer); }; function observerPlayer() { /*var mutationObserver = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (document.querySelector("#content_video_ima-ad-container")) { if (document.querySelector("#content_video_ima-ad-container").style.display === "none") { } } }); }); mutationObserver.observe(document.querySelector("#content_video_ima-ad-container"), {attributes: true}); */ }; function initPlayer(urlVast) { var vjsOptions = { autoplay: autoplayAllowed, muted: auto
78playRequiresMute, debug: true }; player = videojs("content_video", vjsOptions); var imaOptions = { id: "content_video", adTagUrl: urlVast }; player.ima(imaOptions); if (!autoplayAllowed) { if (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/Android/i)) { startEvent = "touchend"; } wrapperDiv = document.getElementById("content_video"); wrapperDiv.addEventListener(startEvent, initAdDisplayContainer); } observerPlayer(); verifyAd(); }; function endedVideo(){ var wf = window.frameElement; wf !== null ? wf.parentNode.parentNode.removeChild(wf.parentNode) : ""; } setTimeout(function(){ checkUnmutedAutoplaySupport(window.urlVast); },2000); </script> </body> </html>`,
79            ifr = document.createElement("iframe");
80        if (this.adUnit !== null && this.adUnit != "") {
81            ifr.width = this.dimension()[0];
82            ifr.height = this.dimension()[1];
83            ifr.frameBorder = "no";
84            ifr.scrolling = "no";
85            ifr.marginWidth = "0";
86            ifr.marginHeight = "0";
87            ifr.vspace = "0";
88            ifr.hspace = "0";
89            ifr.src = "about:blank";
90            document.getElementById(this.target).appendChild(ifr);
91            ifrd = ifr.contentWindow ? ifr.contentWindow.document : ((ifr.contentDocument) ? ifr.contentDocument.document : ifr.contentDocument);
92            ifrd.open();
93            ifrd.write(html);
94            ifrd.close();
95        }
96    }
97};
98window.emAdsVideoSlider.load();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.