PageSourceSearch

https://notesfromthedigitalunderground.net/wp-content/themes/enfold/js/avia-compat.js?ver=4.9.2.3

js notesfromthedigitalunderground.net collected 2026-10-10 00:02:52 UTC 2,127 bytes, 66 lines download raw bytes

1/*
2	this prevents dom flickering for elements hidden with js, needs to be outside of dom.ready event.also adds several extra classes for better browser support
3	this is a separate file that needs to be loaded at the top of the page. other js functions are loaded before the closing body tag to make the site render faster
4*/
5"use strict";
6
7var avia_is_mobile = false;
8if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) && 'ontouchstart' in document.documentElement)
9{
10	avia_is_mobile = true;
11	document.documentElement.className += ' avia_mobile ';
12}
13else
14{
15	document.documentElement.className += ' avia_desktop ';
16}
17
18document.documentElement.className += ' js_active ';
19
20(function()
21{
22	//set transform property
23	var prefix = ['-webkit-','-moz-', '-ms-', ""],
24		transform = "";
25
26	for( var i in prefix )
27	{
28		// http://artsy.github.io/blog/2012/10/18/so-you-want-to-do-a-css3-3d-transform/
29		if( prefix[i]+'transform' in document.documentElement.style )
30		{
31			document.documentElement.className += " avia_transform ";
32			transform = prefix[i]+'transform';
33		}
34
35		if( prefix[i]+'perspective' in document.documentElement.style )
36		{
37			document.documentElement.className += " avia_transform3d ";
38		}
39	}
40
41	//set parallax position to prevent jump at pageload
42	if( typeof document.getElementsByClassName == 'function' && typeof document.documentElement.getBoundingClientRect == "function" && avia_is_mobile == false )
43	{
44		if( transform && window.innerHeight > 0 )
45		{
46			setTimeout(function()
47			{
48				var y = 0,
49					offsets = {},
50					transY = 0,
51					parallax = document.getElementsByClassName("av-parallax"),
52					winTop = window.pageYOffset || document.documentElement.scrollTop;
53
54				for( y = 0; y < parallax.length; y++ )
55				{
56					parallax[y].style.top = "0px";
57					offsets	= parallax[y].getBoundingClientRect();
58					transY	= Math.ceil( (window.innerHeight + winTop - offsets.top) * 0.3 );
59					parallax[y].style[transform] = "translate(0px, "+transY+"px)";
60					parallax[y].style.top = "auto";
61					parallax[y].className += ' enabled-parallax ';
62				}
63			}, 50);
64		}
65	}
66})();

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.