PageSourceSearch

https://www.coomeva.com.co/mod/Bloques/js/bloqueAccesibilidad.js?nxcache=1788960416

js coomeva.com.co collected 2026-10-02 14:44:29 UTC 10,553 bytes, 257 lines download raw bytes

1$("#secVentana").css('display', 'none');
2	$(".btnVentana").click(function(){
3		$("#secVentana").css('display', 'block');
4	});
5	$("#btnClose").click(function(){
6		$("#secVentana").css('display', 'none');
7	});
8
9
10	function switchConfigTools(o) {
11	    switch (($("body").removeClass("configDefaultTools configHighContrastTools configTextOnlyTools"), $('[data-type="configTools"]').removeClass("active"), o)) {
12	        case "default":
13	            $('[data-typedes="default"]').addClass("active"), $("body").addClass("configDefaultTools");
14	            break;
15	        case "highContrast":
16	            $('[data-typedes="highContrast"]').addClass("active"), $("body").addClass("configHighContrastTools");
17	            break;
18	        case "textOnly":
19	            $('[data-typedes="textOnly"]').addClass("active"), $("body").addClass("configTextOnlyTools");
20	    }
21	}
22	function switchConfigFont(o) {
23	    switch (($("body").removeClass("faFontLg faFont2x faFont3x"), $('[data-type="configFont"]').removeClass("active"), o)) {
24	        case "lg":
25	            $('[data-typedes="lg"]').addClass("active"), $("body").addClass("faFontLg");
26	            break;
27	        case "2x":
28	            $('[data-typedes="2x"]').addClass("active"), $("body").addClass("faFont2x");
29	            break;
30	        case "3x":
31	            $('[data-typedes="3x"]').addClass("active"), $("body").addClass("faFont3x");
32	    }
33	}
34	function readCookie(o) {
35	    for (var n = o + "=", e = document.cookie.split(";"), t = 0; t < e.length; t++) {
36	        for (var a = e[t]; " " == a.charAt(0); ) a = a.substring(1, a.length);
37	        if (0 == a.indexOf(n)) return a.substring(n.length, a.length);
38	    }
39	    return null;
40	}
41    $(".btnAccesibilidad__contraste_new").click(function () {
42       return $("body").hasClass("configHighContrastTools") ? $("body").removeClass("configHighContrastTools") : $("body").addClass("configHighContrastTools"),!1;
43    }),
44    $(".btnAccesibilidad__contraste_new").click(function () {
45        return $("body").hasClass("configTextOnlyTools") && $("body").removeClass("configTextOnlyTools"),!1;
46    }),
47    $(".btnAccesibilidad__texto").click(function () {
48        return $("body").hasClass("configTextOnlyTools") ? $("body").removeClass("configTextOnlyTools") : $("body").addClass("configTextOnlyTools"), !1;
49    }),
50    $(".btnAccesibilidad__texto").click(function () {
51        return $("body").hasClass("configHighContrastTools") && $("body").removeClass("configHighContrastTools"), !1;
52    }),
53    $(".btnAccesibilidad__minFontSize").click(function () {
54        (limiteMinFont = 16), (sizeFuenteActual = $("body").css("font-size"));
55        var o = parseFloat(sizeFuenteActual, 10) - 1;
56        return o <= limiteMinFont && (o = limiteMinFont), $("body, html").css("font-size", o), !1;
57    }),
58    $(".btnAccesibilidad__maxFontSize").click(function () {
59        (limiteMaxFont = 22), (sizeFuenteActual = $("body").css("font-size"));
60        var o = parseFloat(sizeFuenteActual, 10) + 1;
61        return o >= limiteMaxFont && (o = limiteMaxFont), $("body, html").css("font-size", o), !1;
62    }),
63    $(".btnTopPage").click(function () {
64        return console.log("subir"), $("html, body").animate({ scrollTop: 0 }, "slow"), !1;
65    }),
66    $(".btnConfigTools").click(function (o) {
67        o.preventDefault();
68        var n = $(this).data("type"),
69            e = $(this).data("typedes");
70        console.log(n + " " + e), (document.cookie = n + "=" + e + "; path=/"), "configTools" == n && switchConfigTools(e), "configFont" == n && switchConfigFont(e);
71    }),
72    $(document).ready(function () {
73        var o = readCookie("configTools"),
74            n = readCookie("configFont");
75        readCookie("configTools") && switchConfigTools(o), readCookie("configFont") && switchConfigFont(n);
76    })
77    $(".espaciadoText").click(function (o) {
78        // Obtener el body
79         var body = document.querySelector('body');
80        // Definir el espaciado deseado 
81         var valueData = $(this).attr('data-value');
82         $(".espaciadoText").removeClass('active');
83
84        // Añadir la clase 'active' al botón que fue clickeado
85        $(this).addClass('active');
86        
87         if(valueData === '0'){
88            body.style.removeProperty('letter-spacing');
89         }else if(valueData === '2' ||  valueData === '3' ) {
90            // Aplicar el espaciado al texto del body
91            body.style.letterSpacing = valueData + 'px';
92         }
93
94         // Si deseas asegurarte de que los elementos dentro del modal no tengan espaciado
95        $("#secVentanaUniversal *").css('letter-spacing', ''); // Eliminar espaciado de todos los elementos dentro del modal
96        
97    }),
98
99    $(".alturaText").click(function (o) {
100        // Obtener el body
101         var body = document.querySelector('body');
102         var height = 'normal';
103        // Definir el espaciado deseado 
104         var valueData = $(this).attr('data-value');
105
106         $(".alturaText").removeClass('active');
107
108        // Añadir la clase 'active' al botón que fue clickeado
109        $(this).addClass('active');
110
111         if(valueData === 'a'){
112            body.style.removeProperty('line-height');
113         }else if(valueData === 'b'){
114            height = '2em';
115         }else if(valueData === 'c'){
116            height = '3em';
117         }
118        // Aplicar el espaciado al texto del body
119        if(valueData === 'b' || valueData === 'c' ){
120            body.style.lineHeight = height;
121        }
122
123            // Asegurarse de que los elementos dentro del modal no tengan espaciado
124            $("#secVentanaUniversal *").css('line-height', ''); // Eliminar altura de línea de los elementos dentro del modal
125    }),
126
127    $(".alingText").click(function (o) {
128        // Obtener el body
129         var body = document.querySelector('body');
130         var text_align = 'na';
131        // Definir la alineación deseada 
132         var valueData = $(this).attr('data-value');
133
134         $(".alingText").removeClass('active');
135
136         // Añadir la clase 'active' al botón que fue clickeado
137         $(this).addClass('active');
138         
139         if(valueData === 'na'){
140            body.style.removeProperty('text-align');
141         }else if(valueData === 'left' || valueData === 'center' || valueData === 'right' || valueData === 'justify'){
142            text_align = valueData;
143            // Aplicar la alineación al texto del body
144            body.style.textAlign = text_align;
145         }
146         // Asegurarse de que los elementos dentro del modal no tengan alineación de texto
147        $("#secVentanaUniversal *").css('text-align', ''); // Eliminar alineación de los elementos dentro del modal
148    }),
149
150    $(".dislexia").click(function (o) {
151        // Obtener el body
152         var bodyFont = document.querySelector('body');
153        // Definir la fuente deseada 
154         var valueData = $(this).attr('data-value');
155
156         $(".dislexia").removeClass('active');
157
158         // Añadir la clase 'active' al botón que fue clickeado
159         $(this).addClass('active');
160
161         if(valueData === 'na'){
162            bodyFont.style.removeProperty('font-family');
163         }else if(valueData === 'dislexia'){
164            // eliminar la fuente  al texto del body
165            bodyFont.style.fontFamily = 'UDF, serif ';
166         }else if( valueData === 'legible'){
167            // Aplicar la fuente  al texto del body
168            bodyFont.style.fontFamily = 'Arial, serif';
169         }
170
171        // Asegurarse de que los elementos dentro del modal no tengan fuente
172        $("#secVentanaUniversal *").css('font-family', ''); // Eliminar fuente de los elementos dentro del modal
173    }),
174
175    $(".OpcAvanzadas").click(function (o) {
176
177        var body = document.querySelector('body');
178        // eliminar la configuracion  al texto del body
179        body.style.removeProperty('letter-spacing');
180        body.style.removeProperty('line-height');
181        body.style.removeProperty('text-align');
182        body.style.removeProperty('font-family');
183
184        // Eliminar la clase 'active' de todas las opciones de espaciado, dislexia, alineación
185     $(".espaciadoText, .alturaText,  .alingText, .dislexia").removeClass('active');
186
187       
188    }),
189
190    $("#btnVentanaUniversal").click(function(){
191		$("#secVentanaUniversal").css('display', 'block');
192	});
193
194    $(".modalAccesibilidadClose").click(function (o) {
195        $("#secVentanaUniversal").css('display', 'none');
196    }),
197    
198    $(document).ready(function(){
199      $('.scroll-to-topButton').click(function(){
200          $('body, html').animate({
201              scrollTop: '0px'
202          }, 300)
203      });
204      $(window).scroll(function(){
205          if($(this).scrollTop() > 0){
206              $('.scroll-to-topButton').slideDown(300);
207          }else{
208              $('.scroll-to-topButton').slideUp(300)
209          }
210      })
211    });
212
213  // Obtener todos los elementos con la clase 'pd-top-lv1'
214var elements = document.getElementsByClassName('pd-top-lv1');
215// Recorrer la colección de elementos y añadir el event listener a cada uno
216for (var i = 0; i < elements.length; i++) {
217    elements[i].addEventListener('click', function(event) {
218        // Capturar el atributo 'data-key' del elemento clickeado
219        var valorAtributo = event.currentTarget.getAttribute('data-key');
220        
221        // Mostrar u ocultar el formulario
222        const parentDiv = document.getElementById('id-gov-accessibility-'+valorAtributo);
223        parentDiv.classList.toggle('active-panel-accessibility');
224
225        const buttonPanel = document.getElementById('button_panel-'+valorAtributo);
226        
227        // Cambiar el icono según si el formulario está activo
228        if (parentDiv.classList.contains('active-panel-accessibility')) {
229            buttonPanel.innerHTML = '<i class="fa fa-chevron-left "></i>';
230        } else {
231            buttonPanel.innerHTML = '<i class="fa fa-chevron-right"></i>';
232        }
233    });
234}
235
236
237$(document).ready(function () {
238
239    document.querySelectorAll('[id^="id-gov-accessibility-"]').forEach(div => {
240        let divId = div.id;
241        if (sessionStorage.getItem(divId) === "true") {
242            div.classList.add('d-none');
243        }
244    });
245
246    // Evento para cerrar el div y guardar en sessionStorage
247    $(".universal-close").on("click", function () {
248        let keyElement =  $(this).data('key');
249        let nameElementStorage = "id-gov-accessibility-" + keyElement;
250        $("#id-gov-accessibility-" + keyElement).hide();
251        sessionStorage.setItem(nameElementStorage, "true");
252    });
253});
254
255
256
257  

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.