PageSourceSearch

https://polygraph.org/includes/functions/vcenter.js

js polygraph.org collected 2026-10-02 07:44:34 UTC 861 bytes, 37 lines download raw bytes

1console.log('Script: Vcenter');
2function vert_center(){
3	var DT = '';
4	var WW = $(window).width();
5	$('.vcenter').each(function(){
6		var DT = $(this).data('to');
7		var LM = $(this).css('margin-left');
8		var RM = $(this).css('margin-right');
9		$(this).css('margin','0px')
10		var PH = 0; //parent height reset
11		var PH = $(this).parent().height();
12		var TH = $(this).height();
13		var NM = (PH - TH)/2;
14		if(LM == RM){
15			var AM = NM + 'px ' + LM ;
16		} else {
17			var AM = NM + 'px ' + RM + ' ' + NM + 'px ' + LM;
18		}
19		console.log('DT: ' + DT);
20		if(typeof DT != 'undefined'){	
21			if(WW>=DT){
22				$(this).css('margin', AM);
23			} else {
24				$(this).css('margin','auto ' + RM + ' auto' + LM);
25			}
26		} else {
27			$(this).css('margin', AM);
28		}
29	});
30}
31$(window).resize(function(){
32	vert_center();
33});
34$(window).load(function(){
35	vert_center();
36});
37console.log('----go');

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.