PageSourceSearch

https://www.familyhandyman.com/wp-content/plugins/tmbi-permutive/js/permutive-ay-integration.js?ver=2.0.0

js familyhandyman.com collected 2026-10-01 08:57:08 UTC 1,112 bytes, 51 lines download raw bytes

1/**
2 * Send ad_density data to Assertive Yield.
3 */
4( function () {
5	var MAX_ATTEMPTS = 3;
6	var RETRY_DELAY_MS = 100;
7
8	function getCohorts() {
9		var raw = window.localStorage.getItem( '_pdfps' );
10		if ( ! raw ) {
11			return null;
12		}
13		try {
14			var parsed = JSON.parse( raw );
15			var hasValue = Array.isArray( parsed )
16				? parsed.length > 0
17				: parsed && 'object' === typeof parsed && Object.keys( parsed ).length > 0;
18			return hasValue ? parsed : null;
19		} catch ( error ) {
20			console.error( 'Error parsing Permutive data from localStorage:', error );
21			return null;
22		}
23	}
24
25	function updateAYTargeting( cohorts ) {
26
27		if ( null !== cohorts && window.tmbi_ay_ad_targeting && 'object' === typeof window.tmbi_ay_ad_targeting) {
28			window.tmbi_ay_ad_targeting['permutive'] =  cohorts || [];
29		}
30	}
31
32	function attempt( count ) {
33		var cohorts = getCohorts();
34
35		if ( cohorts ) {
36			updateAYTargeting( cohorts );
37			return;
38		}
39
40		if ( count >= MAX_ATTEMPTS ) {
41			updateAYTargeting( null );
42			return;
43		}
44
45		setTimeout( function () {
46			attempt( count + 1 );
47		}, RETRY_DELAY_MS );
48	}
49
50	attempt( 0 );
51} )();

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.