PageSourceSearch

https://www.usal.edu.ar/wp-content/plugins/usal_general/js/all.js?ver=7.1

js usal.edu.ar collected 2026-09-24 18:29:39 UTC 3,054 bytes, 116 lines download raw bytes

1
2document.addEventListener("DOMContentLoaded", ActualizaEstilosBloquesDePropuesta);
3
4function ActualizaEstilosBloquesDePropuesta(ev) {
5	
6	const containers = document.querySelectorAll('.clickeable, .container-propuesta, .container-sede, .boton-main, .boton-menu' );
7	
8	if(containers) containers.forEach((el) => {
9		const a = el.querySelector('a');
10		if (a && a.href) {
11			el.style.cursor = "pointer";
12			
13			el.addEventListener("click", 
14				function(e){ 
15					e.preventDefault(); 
16					if(a.target == '_blank') {
17						window.open(a.href,'_blank'); 
18					} else {
19						location.href = a.href;
20					}
21					
22				}
23			);
24
25			
26
27		}
28	});
29}
30
31// Hacer scroll cuando se hace click en un link interno (#)
32document.addEventListener("DOMContentLoaded", FixLinks);
33function FixLinks(ev) {
34
35	const header = document.querySelector("header");
36	
37	document.querySelectorAll('a[href^="#"]').forEach(anchor => {
38		
39		if(anchor.href.endsWith("#")) return;
40		
41		anchor.addEventListener('click',  
42   
43			function () {		
44				// Ocultar el heacer ?
45				//header.style.top = "-250px";
46				
47			   setTimeout(function() {
48					window.scrollTo(0,window.pageYOffset-header.offsetHeight-50);
49			   }, 100);
50		   
51			}
52	  
53		);
54	});
55}
56
57document.addEventListener("DOMContentLoaded", FixLinks2);
58function FixLinks2() {
59	if (window.location.hash) { 
60		const header = document.querySelector("header");
61		   setTimeout(function() {
62				window.scrollTo(0,window.pageYOffset-header.offsetHeight-50);
63				//console.log("Hash(#) component exists"); 
64		   }, 500);
65		
66	} 
67}
68
69// Ocultar el header
70//document.addEventListener("DOMContentLoaded", ArreglaPosicionamientoHeaderYAnchors);
71function ArreglaPosicionamientoHeaderYAnchors(ev) {
72	const header = document.querySelector("header");
73	
74	var prevScrollpos = window.pageYOffset;
75	window.onscroll = function() {
76	  var currentScrollPos = window.pageYOffset;
77	  if (prevScrollpos > currentScrollPos) {
78		header.style.top = "0";
79	  } else {
80		header.style.top = "-250px";
81	  }
82	  prevScrollpos = currentScrollPos;
83	}
84
85}
86
87
88// Acorta los textos de los meses en Mobile
89var MesesAcortados = false;
90window.addEventListener("resize", AcortarMesesMobile);
91window.addEventListener("DOMContentLoaded", AcortarMesesMobile);
92function AcortarMesesMobile(ev) {
93	const WIDTH_LIMIT = 600;
94	const SELECTOR = '.mes-acortable';
95	
96	if(!MesesAcortados && document.body.clientWidth < WIDTH_LIMIT) {
97		const containers = document.querySelectorAll(SELECTOR);
98		if(!containers) return;
99		
100		containers.forEach((el) => {
101			if(!el.dataset.originalText) el.dataset.originalText = el.textContent;
102			el.textContent = el.dataset.originalText.substring(0,3);
103		});
104		MesesAcortados = true;
105	} 
106	
107	if(MesesAcortados && document.body.clientWidth >= WIDTH_LIMIT) {
108		const containers = document.querySelectorAll(SELECTOR);
109		if(!containers) return;
110		containers.forEach((el) => {
111			el.textContent = el.dataset.originalText;
112		});
113		MesesAcortados = false;
114	}
115}
116

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.