PageSourceSearch

https://excavacionesalcaide.es/wp-content/plugins/kd-accessibility/modules/js/tts.js?ver=1.0

js excavacionesalcaide.es collected 2026-10-06 09:49:11 UTC 1,706 bytes, 48 lines download raw bytes

1  /* multiidioma */
2  jQuery(document).ready(function($) {
3    var lang = $('html').attr('lang'); // Obtener el valor de la etiqueta lang
4  
5    $('#tts_button').click(function() {
6      if ($('body').hasClass('tts_play')){
7        $('body').removeClass('tts_play');
8        if(responsiveVoice.isPlaying()) {
9          responsiveVoice.cancel();
10        }
11      }else{
12        var text = '';
13        var elementText='';
14        if($('body main:first').lenght){
15          $('body main:first').find('p,h1,h2,h3,h4,h5').each(function() {
16            let itemClone = $(this).clone();
17            itemClone.find("style, script").remove();
18            elementText= itemClone.text() || '';
19            text += (elementText + (elementText.slice(-1)=='.'?' ':'. '));
20          });
21        }else{
22          $('body').find('p,h1,h2,h3,h4,h5').each(function() {
23            let itemClone = $(this).clone();
24            itemClone.find("style, script").remove();
25            elementText= itemClone.text() || '';
26            text += (elementText + (elementText.slice(-1)=='.'?' ':'. '));
27          });
28        }
29        if(responsiveVoice.isPlaying()) {
30          responsiveVoice.cancel();
31        }
32        responsiveVoice.speak(text, "Spanish Female", {locale: lang, rate: 0.9, onstart: is_speaking, onend: not_speaking});
33      }
34    });
35    function is_speaking(){
36      $('body').addClass('tts_play');
37    }
38    function not_speaking(){
39      if(!responsiveVoice.isPlaying()) {
40        $('body').removeClass('tts_play');
41      }
42    }
43    
44    // Actualizar el valor de lang cada vez que cambie la página
45    $(document).on('DOMSubtreeModified', 'html', function(){
46      lang = $('html').attr('lang');
47    });
48  });

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.