PageSourceSearch

https://www.playstationlifestyle.net/wp-content/plugins/wp-evolve-gpt/js/pb.gpt-builder.js?ver=2.0.1

js playstationlifestyle.net collected 2026-10-02 02:53:01 UTC 3,836 bytes, 119 lines download raw bytes

1(function (win) {
2    var GAMinfo = win.GAMinfo || [];
3    var PB = win.PB || {};
4
5    PB.evGPTBuilder = (function () {
6
7        var buildTag = function (opts) {
8            var adResolve;
9            var adPromise = new Promise(function (resolve) {
10                adResolve = resolve;
11            });
12
13            var googletag = win.googletag;
14
15            // If the ad has the resize option initialize the controller
16            if (opts.resize) {
17                adResize(opts);
18            }
19
20            googletag.cmd.push(function () {
21                var adSize = JSON.parse(opts.sizeStr);
22
23                PB.gptAds[opts.adDiv] = googletag
24                    .defineSlot(opts.adUnit, adSize, opts.adDiv)
25                    .addService(googletag.pubads());
26
27                if (typeof amazon_uam !== "undefined" && amazon_uam === true) {
28                    amznSlots.push({
29                        slotID: opts.adDiv,
30                        slotName: opts.adUnit,
31                        sizes: adSize
32                    });
33                }
34
35                // Include each of the targeting options in the tag
36                Object.entries(opts.targeting || {}).forEach(function ([key, val]) {
37                    PB.gptAds[opts.adDiv].setTargeting(key, val);
38                });
39
40                // Include the mapping functionality if it exists
41                if (opts.mapping && opts.mapping.length > 0) {
42                    adMapping(opts);
43                }
44
45                googletag.pubads().enableSingleRequest();
46
47                // Include AudienceScience callback parameters
48                if (opts.asBool) {
49                    adAudienceScience(opts, adResolve);
50                } else {
51                    adResolve();
52                }
53            });
54
55            return adPromise;
56        };
57
58        var adResize = function (ad) {
59            PB.Core.start('resize-iframe', ad);
60        };
61
62        var adMapping = function (opts) {
63            var googletag = win.googletag;
64            var sizeMapping = googletag.sizeMapping();
65
66            (opts.mapping || []).forEach(function (val) {
67                sizeMapping = sizeMapping.addSize(
68                    JSON.parse(val.viewport),
69                    JSON.parse(val.sizes)
70                );
71            });
72
73            sizeMapping = sizeMapping.build();
74
75            PB.gptAds[opts.adDiv].defineSizeMapping(sizeMapping);
76        };
77
78        var adAudienceScience = function (opts, resolve) {
79            if (typeof win.asiVars !== "undefined") {
80                if (typeof win.asiVars[opts.asID] !== "undefined") {
81                    PB.gptAds[opts.adDiv].setTargeting('gwd', win.asiVars[opts.asID]);
82                }
83                resolve();
84            } else {
85                var i = 0;
86                var asCheck = setInterval(function () {
87                    if (typeof win.asiVars !== "undefined" || i >= 9) {
88                        PB.waitForAS = false;
89                        if (typeof win.asiVars !== "undefined") {
90                            PB.gptAds[opts.adDiv].setTargeting('gwd', win.asiVars[opts.asID]);
91                        }
92                        resolve();
93                        clearInterval(asCheck);
94                    }
95                    i++;
96                }, 200);
97            }
98        };
99
100        return {
101            adPromises: [],
102
103            enqueueAd: function (opts) {
104                if (PB.gptAds[opts.adDiv]) {
105                    console.warn('Ad slot already defined:', opts.adDiv);
106                    return;
107                }
108                var ad = buildTag(opts);
109                this.adPromises.push(ad);
110            },
111
112            onLoad: function () {
113                return Promise.all(this.adPromises);
114            }
115        };
116    })();
117
118    win.PB = PB;
119})(window);

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.