PageSourceSearch

https://www.nbclosangeles.com/wp-content/plugins/ad-layers-nbc/js/ad-layers.js?ver=0.0.10

js nbclosangeles.com collected 2026-09-24 08:29:14 UTC 1,440 bytes, 45 lines download raw bytes

1/*
2The AdLayersAPI class provides a suite of functions for manipulating ads on the client side.
3This abstracts the functionality from the specific ad server in use.
4Each ad server will be required to provide functionality for the below functions.
5If any of the functions do not exist, they will simply do nothing.
6*/
7AdLayersAPI = function() {
8	// Create an object for the active ad server
9	this.adServer = null;
10
11	// Create an instance of the ad server class, if it exists
12	if (
13		'string' === typeof adLayersAdServer.jsAPIClass
14		&& 'AdLayersAPI' !== adLayersAdServer.jsAPIClass // prevents infinite loop.
15		&& 'function' === typeof window[ adLayersAdServer.jsAPIClass ]
16	) {
17		this.adServer = new window[ adLayersAdServer.jsAPIClass ];
18	}
19}
20
21// Refreshes a specific ad unit
22AdLayersAPI.prototype.refresh = function( ad_unit ) {
23	if ( this.functionExists( 'refresh' ) ) {
24		this.adServer.refresh( ad_unit );
25	}
26}
27
28// Refreshes all ad units
29AdLayersAPI.prototype.refreshAll = function( args ) {
30	if ( this.functionExists( 'refreshAll' ) ) {
31		this.adServer.refreshAll( args );
32	}
33}
34
35// Lazy load an ad
36AdLayersAPI.prototype.lazyLoadAd = function( args ) {
37	if ( this.functionExists( 'lazyLoadAd' ) ) {
38		return this.adServer.lazyLoadAd( args );
39	}
40};
41
42// Determines if the enabled ad server has implemented a function
43AdLayersAPI.prototype.functionExists = function( name ) {
44	return ( null !== this.adServer && name in this.adServer );
45}

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.