PageSourceSearch

https://soultz-les-bains.fr/tarteaucitron/iframe.js

js soultz-les-bains.fr collected 2026-10-02 22:45:18 UTC 6,470 bytes, 204 lines download raw bytes

1//ce script permet de convertir le code des services existants par le code nécessaire au bon fonctionnement du script tarteaucitron
2
3jQuery(document).ready(function(){
4
5  jQuery("iframe").each(function(){    
6
7        //récupération de l'adresse https  dans l'iframe
8        var src = jQuery(this).attr("src");
9        console.log('src :'+src);
10	if (typeof src === 'undefined')	     
11	  	{
12		}
13	 else
14	  	{
15        //récupération de la classe du service dans adresse que l'on récupère entre 2 "."
16        var classe = src.split('.');
17        var clas = classe[1];
18        console.log('clas :'+clas);    
19         
20        
21        
22        
23        if (clas == 'google') 
24        {
25
26            (tarteaucitron.job = tarteaucitron.job || []).push('maps');
27
28            var classe = src.match(/[com|fr]\/([^/]+)/);
29            console.log('src :'+src);
30            console.log('classe :'+classe);
31            var clas_google = classe[1];
32            console.log('clas :'+clas_google);
33
34            if (clas_google == 'maps') 
35            {
36
37                var width = jQuery(this).attr("width");
38                console.log('width :'+width);
39
40                var height = jQuery(this).attr("height");
41                console.log('height :'+height);
42
43                var responseb = '<div width="'+width+'"height= "'+height+'"data-url="'+src+'"class="'+clas_google+'"></div>'; 
44                
45                jQuery(this).replaceWith(responseb);
46
47                console.log('responseb:'+responseb);
48            }
49        }
50
51        else  if (clas == 'youtube' ) 
52        { 
53
54                (tarteaucitron.job = tarteaucitron.job || []).push('youtube');
55
56                var width = jQuery(this).attr("width");
57                console.log('width :'+width);
58
59                var height = jQuery(this).attr("height");
60                console.log('height :'+height); 
61
62                var id = src.match(/embed\/([^"]+)/);
63                console.log('id :'+id);
64
65                var responsec = '<div width="'+width+'"height= "'+height+'"videoID="'+id[1]+'"class="'+clas+'"></div>';
66                
67                jQuery(this).replaceWith(responsec);
68
69                console.log('responsec:'+responsec)
70
71        }
72
73        else  if (clas == 'dailymotion' ) 
74        { 
75
76                (tarteaucitron.job = tarteaucitron.job || []).push('dailymotion');
77
78                //récupération largeur width
79                var width = jQuery(this).attr("width");
80                console.log('width :'+width);
81
82                //récupération hauteur height
83                var height = jQuery(this).attr("height");
84                console.log('height :'+height);
85 
86                //récupération de l'id : /embed/video/id
87                var id = src.match(/video\/([^"]+)/);
88                console.log('id :'+id);
89
90                //réponse pour fonctionnement avec tarteaucitron
91                var responsed = '<div width="'+width+'"height= "'+height+'"videoID="'+id[1]+'"class="'+clas+'"></div>';
92
93                jQuery(this).replaceWith(responsed);
94
95                console.log('response:'+responsed)             
96
97        }
98                
99        else  if (clas == 'vimeo' ) 
100        { 
101
102                (tarteaucitron.job = tarteaucitron.job || []).push('vimeo');
103
104                var width = jQuery(this).attr("width");
105                console.log('width :'+width);
106
107                var height = jQuery(this).attr("height");
108                console.log('height :'+height);
109
110                var id = src.match(/video\/([^"]+)/);
111                console.log('id :'+id);
112
113                var responsee = '<div width="'+width+'"height= "'+height+'"videoID="'+id[1]+'"class="'+clas+'"></div>';
114                
115                jQuery(this).replaceWith(responsee);
116
117                console.log('responsee:'+responsee)                  
118
119        }
120
121        else  if (clas == 'calameo' ) 
122        {
123
124                (tarteaucitron.job = tarteaucitron.job || []).push('calameo');  
125
126                var width = jQuery(this).attr("width");
127                console.log('width :'+width);
128
129                var height = jQuery(this).attr("height");
130                console.log('height :'+height);
131                
132                var id = src.match(/com\/([^"]+)/);
133                console.log('id :'+id);
134
135                var responsef = '<div width="'+width+'"height= "'+height+'"videoID="'+id[1]+'"class="'+clas+'"></div>';
136
137                jQuery(this).replaceWith(responsef);
138
139                console.log('responsef:'+responsef)
140        }
141
142        else if (clas == 'illicoweb') 
143        {
144            var id = jQuery(this).attr("id");
145            console.log('id :'+id);
146
147                if (id === undefined) 
148                {
149
150                }
151
152                else if (id == 'gmap') 
153                {  
154
155                    (tarteaucitron.job = tarteaucitron.job || []).push('maps');
156
157                    var widtha = style.match("width:[0-9]+[0-9]");
158                    console.log('widtha est : ' +widtha);  
159
160                    var widthb = "'"+widtha+"'";
161                    console.log('widthb est :'+widthb);
162
163                    //récupération image largeur complète
164                    var width = widthb.slice(7,-1);
165                    console.log('width est : '+width); 
166
167                    var heighta = style.match("height:[0-9]+[0-9]");
168                    console.log('heighta est : ' +heighta);  
169
170                    var heightb = "'"+heighta+"'";
171                    console.log('heightb est :'+heightb);
172
173                    //récupération image hauteur complète
174                    var height = heightb.slice(8,-1);
175                    console.log('height est : '+height);       
176
177                    var clas_illico = "maps";
178                                   
179                    console.log('clas_illico est :'+clas_illico);
180
181                    var responsea = '<div width="'+width+'" height="'+height+'" data-url="'+src+'" class="'+clas_illico+'"></div>';
182                   
183                    jQuery(this).replaceWith(responsea);
184
185                    console.log('responsea:'+responsea)
186                  
187                }                 
188        }
189
190        else 
191        {
192
193        }
194		}
195    });
196
197});
198
199
200
201
202
203
204

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.