PageSourceSearch

https://eurochange.es/js/avanzacookies.js?2.1.7

js eurochange.es collected 2026-10-04 18:59:46 UTC 7,655 bytes, 243 lines download raw bytes

1function saveCookie() {
2    var module = 'avanza_cookies3';
3    var valor = '1';
4    var expire = new Date();
5    expire.setMonth(expire.getMonth() + 12);
6    document.cookie = module + "=" + escape(valor) + "_/_" + "1" + "_/_" + "1" + "_/_" + "1" + "_/_" + "1" + "_/_" + ";path=/;" + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
7}
8
9function closeCookieRechazar() {
10    var module = 'avanza_cookies3';
11    var valor = '1';
12    var expire = new Date();
13    expire.setMonth(expire.getMonth() + 12);
14    document.cookie = module + "=" + escape(valor) + "_/_" + "1" + "_/_" + "0" + "_/_" + "0" + "_/_" + "0" + "_/_" + ";path=/;" + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
15}
16
17function openPopup() {
18    if((document.cookie).includes('avanza_cookies3')){
19        var cookies_old1 = (document.cookie).split('avanza_cookies3=');
20        var cookies_old2 = cookies_old1[1].split('_/_');
21        if(cookies_old2[2]==1){
22            document.querySelector("[name=checkboxpreferencias]").checked = true;
23        }
24        if(cookies_old2[3]==1){
25            document.querySelector("[name=checkboxestadistica]").checked = true;
26        }
27        if(cookies_old2[4]==1){
28            document.querySelector("[name=checkboxmarketing").checked = true;
29        }
30        else {
31            $('.boton-general-aceptar').text(boton_aceptar_cookies_1);
32        }
33    }
34}
35
36
37function saveCookieAceptar() {
38    var module = 'avanza_cookies3';
39    var valor = '1';
40    var expire = new Date();
41    expire.setMonth(expire.getMonth() + 12);
42    var necesarias = '2';
43    var preferencias = '2';
44    var estadistica = '2';
45    var marketing = '2';
46
47
48    if (document.getElementsByName('checkboxnecesarias').checked) {
49        necesarias = '1';
50    }else{
51        necesarias = '0';
52    }
53
54    if (document.getElementsByName('checkboxpreferencias').checked) {
55        preferencias = '1';
56    }else{
57        preferencias = '0';
58    }
59
60    if (document.getElementsByName('checkboxestadistica').checked) {
61        estadistica = '1';
62    }else{
63        estadistica = '0';
64    }
65
66    if (document.getElementsByName('checkboxmarketing').checked) {
67        marketing = '1';
68    }else {
69        marketing = '0';
70    }
71    $('body').addClass("open-cookies");
72
73
74    if (preferencias == '2' && estadistica == '2' && marketing == '2') {
75        document.cookie = module + "=" + escape(valor) + "_/_" + "1" + "_/_" + "1" + "_/_" + "1" + "_/_" + "1" + "_/_" + ";path=/;" + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
76    } else if (preferencias == '2' || estadistica == '2' || marketing == '2') {
77
78    } else {
79        document.cookie = module + "=" + escape(valor) + "_/_" + escape(necesarias) + "_/_" + escape(preferencias) + "_/_" + escape(estadistica) + "_/_" + escape(marketing) + "_/_" +
80            ";path=/;" + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
81        closePopup();
82    }
83}
84function saveCookieConf() {
85    var module = 'avanza_cookies3';
86    var valor = '1';
87    var expire = new Date();
88    expire.setMonth(expire.getMonth() + 12);
89    var necesarias = '2';
90    var preferencias = '2';
91    var estadistica = '2';
92    var marketing = '2';
93
94
95    if (document.getElementsByName('checkboxnecesarias').checked) {
96        necesarias = '1';
97    }
98
99    if (document.getElementById('checkboxpreferencias_id').checked) {
100        preferencias = "1";
101    }else{
102        preferencias = "0";
103    }
104
105    if (document.getElementById('checkboxestadistica_id').checked) {
106        estadistica = "1";
107
108    }else{
109        estadistica = "0";
110    }
111
112    if (document.getElementById('checkboxmarketing_id').checked) {
113        marketing = "1";
114
115    }else {
116        marketing = "0";
117    }
118    $('body').addClass("open-cookies");
119
120
121    if (preferencias == '2' && estadistica == '2' && marketing == '2') {
122        document.cookie = module + "=" + escape(valor) + "_/_" + "1" + "_/_" + "0" + "_/_" + "0" + "_/_" + "0" + "_/_" + ";path=/;" + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
123    } else {
124        document.cookie = module + "=" + escape(valor) + "_/_" + "1" + "_/_" + preferencias + "_/_" + estadistica + "_/_" + marketing + "_/_" +
125            ";path=/;" + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
126        closePopup();
127    }
128}
129
130$("#abrir_info_cookies").click(function (e){
131        e.preventDefault();
132        $('#mas_informacion_cookies').removeClass('hidden');
133        $('body').addClass('max-height');
134
135        $('#abrir_info_cookies').addClass('hidden');
136        $('#cerrar_info_cookies').removeClass('hidden');
137        return false;
138});
139
140$("#cerrar_info_cookies").click(function (e){
141        e.preventDefault();
142        $('#mas_informacion_cookies').addClass('hidden');
143        $('body').removeClass('max-height');
144
145        $('#abrir_info_cookies').removeClass('hidden');
146        $('#cerrar_info_cookies').addClass('hidden');
147        return false;
148});
149
150function closeCookieNotify(posicion) {
151    if (posicion == 1) {
152        $('#AvanzaCookie').animate({
153                top: '-200px'
154            },
155            2500,
156            function() {
157                $('#AvanzaCookie').hide();
158            });
159        saveCookie();
160        window.location.reload()
161    } else {
162        $('#AvanzaCookie').animate({
163                bottom: '-200px'
164            },
165            2500,
166            function() {
167                $('#AvanzaCookie').hide();
168            });
169        saveCookie();
170        window.location.reload();
171    }
172}
173
174function abrirAviso(){
175    openPopup();
176    $('body').removeClass("boton_cookies");
177    $('#AvanzaCookie').css('display','block');
178    return false;
179}
180
181function closePopupSeguir(posicion) {
182    saveCookieAceptar();
183        if((document.cookie).includes('avanza_cookies3')){
184    var cookies_old1 = (document.cookie).split('avanza_cookies3=');
185    var cookies_old2 = cookies_old1[1].split('_/_');
186    if(cookies_old2[2]==1){
187        document.querySelector("[name=checkboxpreferencias]").checked = true;
188    }else{
189        document.querySelector("[name=checkboxpreferencias]").unchecked = false;
190    }
191    if(cookies_old2[3]==1){
192        document.querySelector("[name=checkboxestadistica]").checked = true;
193    }else{
194        document.querySelector("[name=checkboxestadistica]").checked = false;
195    }
196    if(cookies_old2[4]==1){
197        document.querySelector("[name=checkboxmarketing]").checked = true;
198    }else{
199        document.querySelector("[name=checkboxmarketing]").checked = false;
200    }
201
202    }
203    else {
204        $('.boton-general-aceptar').text(boton_aceptar_cookies_1);
205    }
206    
207    $('body').removeClass("boton-cookies");
208    
209    closeCookieNotify(posicion);
210    $('#AvanzaCookie').hide();
211    window.location.reload();
212}
213
214function declineAll(posicion) {
215    document.querySelector("[name=checkboxpreferencias]").checked = false;
216    document.querySelector("[name=checkboxestadistica]").checked = false;
217    document.querySelector("[name=checkboxmarketing]").checked = false;
218
219    saveCookieConf();
220}
221
222function closePopup() {
223    $('body').removeClass("open-cookies");
224    $('#AvanzaCookie').hide();
225    $('body').addClass("button-cookies");
226    window.location.reload();
227}
228
229$(document).ready(function() {
230    var res = (document.cookie).split(";");
231    if(!(document.cookie).includes('avanza_cookies3')){
232        $('body').addClass("start-cookies");
233        $('#AvanzaCookie').css('display', 'block');
234
235    }else{
236    $('body').addClass("boton-cookies");
237    }
238    
239    $('#AvanzaCookie .consentimiento input').change(function() {
240    //$('#AvanzaCookie .boton-general-aceptar').text(boton_aceptar_cookies_2);
241    });
242    
243});

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.