PageSourceSearch

https://capital.ba/wp-content/plugins/ad-refresh-manager/assets/frontend.js?ver=1.3.0

js capital.ba collected 2026-10-02 06:09:29 UTC 1,204 bytes, 44 lines download raw bytes

1/**
2 * Ad Refresh Manager - frontend.
3 *
4 * Refreshuje samo GPT slotove koje je urednik dodao na admin stranici,
5 * i to tek kada slot stvarno postane viewable (impressionViewable event),
6 * nakon čega čeka konfigurisani broj sekundi prije poziva refresh().
7 *
8 * Ne diramo postojeći googletag setup u temi - samo dodajemo event listener
9 * na već postojeći googletag.pubads() objekat.
10 */
11(function () {
12	if ( typeof ARM_CONFIG === 'undefined' || ! ARM_CONFIG.slots || ! ARM_CONFIG.slots.length ) {
13		return;
14	}
15
16	window.googletag = window.googletag || { cmd: [] };
17
18	var slotMap = {};
19	ARM_CONFIG.slots.forEach( function ( s ) {
20		if ( s.divId ) {
21			slotMap[ s.divId ] = parseInt( s.interval, 10 ) || 60;
22		}
23	} );
24
25	googletag.cmd.push( function () {
26		googletag.pubads().addEventListener( 'impressionViewable', function ( event ) {
27			var slot = event.slot;
28			var divId = slot.getSlotElementId();
29
30			if ( ! slotMap.hasOwnProperty( divId ) ) {
31				return;
32			}
33
34			var intervalMs = slotMap[ divId ] * 1000;
35
36			setTimeout( function () {
37				if ( ARM_CONFIG.pauseHidden && document.hidden ) {
38					return;
39				}
40				googletag.pubads().refresh( [ slot ] );
41			}, intervalMs );
42		} );
43	} );
44})();

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.