assets/themes/j1/core/js/template.js in j1-template-2024.1.1 vs assets/themes/j1/core/js/template.js in j1-template-2024.1.2

- old
+ new

@@ -4857,11 +4857,11 @@ var pitchDefault = 1; var volumeDefault = 0.9; var rate = rateDefault; var pitch = pitchDefault; var volume = volumeDefault; - var pause_spoken = '. '; + var pause_spoken = ' — '; var chunkCounter = 0; var userStoppedSpeaking = false; var chunkSpoken = false; var lastScrollPosition = false; var rateUserDefault; @@ -5135,39 +5135,39 @@ scanFinished = true; } // Default values // - voiceTags['a'] = new voiceTag('Link, ', pause_spoken); - // voiceTags['q'] = new voiceTag(pause_spoken, pause_spoken); - // voiceTags['ol'] = new voiceTag('List element, ', pause_spoken); - // voiceTags['ul'] = new voiceTag('List element, ', pause_spoken); - // voiceTags['dl'] = new voiceTag('List element, ', pause_spoken); - voiceTags['dt'] = new voiceTag(pause_spoken, pause_spoken); - voiceTags['img'] = new voiceTag('Image element, ', pause_spoken); - voiceTags['table'] = new voiceTag('Table element, ', pause_spoken); - voiceTags['card-header'] = new voiceTag(pause_spoken, pause_spoken); - voiceTags['.doc-example'] = new voiceTag('Example element, ', pause_spoken); - voiceTags['.admonitionblock'] = new voiceTag('Attention element, ', pause_spoken); - voiceTags['.listingblock'] = new voiceTag('Text element, ', pause_spoken); - voiceTags['.gist'] = new voiceTag('Gist element, ', pause_spoken); - voiceTags['.slider'] = new voiceTag('Slider element, ', pause_spoken); - voiceTags['.modal'] = new voiceTag('Info element, ', pause_spoken); - voiceTags['.masonry'] = new voiceTag('Masonry element, ', pause_spoken); - voiceTags['.lightbox-block'] = new voiceTag('Lightbox element, ', pause_spoken); - voiceTags['.gallery'] = new voiceTag('Gallery element, ', pause_spoken); - voiceTags['.audioblock'] = new voiceTag('Audio element, ', pause_spoken); - voiceTags['.videoblock'] = new voiceTag('Video element, ', pause_spoken); - voiceTags['.videojs-player'] = new voiceTag('Video element, ', pause_spoken); - voiceTags['.youtube-player'] = new voiceTag('Video element, ', pause_spoken); - voiceTags['.dailymotion-player'] = new voiceTag('Video element, ', pause_spoken); - voiceTags['.vimeo-player'] = new voiceTag('Video element, ', pause_spoken); - voiceTags['.wistia-player'] = new voiceTag('Video element, ', pause_spoken); - voiceTags['figure'] = new voiceTag('Figure element, ', pause_spoken); - voiceTags['parallax-quoteblock'] = new voiceTag('Quote element, ', pause_spoken); - voiceTags['blockquote'] = new voiceTag('Quote element, ', pause_spoken); - voiceTags['quoteblock'] = new voiceTag('Quote element, ', pause_spoken); + voiceTags['a'] = new voiceTag('Link — ', ''); + voiceTags['q'] = new voiceTag(pause_spoken, ''); + voiceTags['ol'] = new voiceTag(pause_spoken, ''); + voiceTags['ul'] = new voiceTag(pause_spoken, ''); + voiceTags['dl'] = new voiceTag(pause_spoken, ''); + voiceTags['dt'] = new voiceTag(pause_spoken, ''); + voiceTags['img'] = new voiceTag('Image element — ', 'Element not spoken — '); + voiceTags['table'] = new voiceTag('Table element — ', 'Element not spoken — '); + voiceTags['card-header'] = new voiceTag(pause_spoken, ''); + voiceTags['.doc-example'] = new voiceTag('Example element — ', 'Element not spoken — '); + voiceTags['.admonitionblock'] = new voiceTag('Attention element — ', ''); + voiceTags['.listingblock'] = new voiceTag('Text element — ', 'Element not spoken — '); + voiceTags['.gist'] = new voiceTag('Gist element — ', 'Element not spoken — '); + voiceTags['.slider'] = new voiceTag('Slider element — ', 'Element not spoken — '); + voiceTags['.modal'] = new voiceTag('Info element — ', 'Element not spoken — '); + voiceTags['.masonry'] = new voiceTag('Masonry element — ', 'Element not spoken — '); + voiceTags['.lightbox-block'] = new voiceTag('Lightbox element — ', 'Element not spoken — '); + voiceTags['.gallery'] = new voiceTag('Gallery element — ', 'Element not spoken — '); + voiceTags['.audioblock'] = new voiceTag('Audio element — ', 'Element not spoken — '); + voiceTags['.videoblock'] = new voiceTag('Video element — ', 'Element not spoken — '); + voiceTags['.videojs-player'] = new voiceTag('Video element — ', 'Element not spoken — '); + voiceTags['.youtube-player'] = new voiceTag('Video element — ', 'Element not spoken — '); + voiceTags['.dailymotion-player'] = new voiceTag('Video element — ', 'Element not spoken — '); + voiceTags['.vimeo-player'] = new voiceTag('Video element — ', 'Element not spoken — '); + voiceTags['.wistia-player'] = new voiceTag('Video element — ', 'Element not spoken — '); + voiceTags['figure'] = new voiceTag('Figure element — ', 'Element not spoken — '); + voiceTags['parallax-quoteblock'] = new voiceTag(pause_spoken, ''); + voiceTags['blockquote'] = new voiceTag(pause_spoken, ''); + voiceTags['quoteblock'] = new voiceTag(pause_spoken, ''); ignoreTags = ['audio', 'button', 'canvas', 'code', 'del', 'pre', 'dialog', 'embed', 'form', 'head', 'iframe', 'meter', 'nav', 'noscript', 'object', 'picture', 'script', 'select', 'style', 'textarea', 'video']; // TODO: NOT working for multiple 'tab' windows // dispayed in the same browser // @@ -5657,11 +5657,11 @@ // Search for parallax quote block elements. // $(clone).find('.parallax-quoteblock').addBack('.parallax-quoteblock').each(function () { content_element = $(this).find('.quote-text'); - content = content_element[0].innerText; + content = content_element[0].innerText + ' — '; prepend = voiceTags['quoteblock'].prepend; appended = voiceTags['quoteblock'].append; if (content !== undefined && content != '') { $('<div>' + prepend + pause_spoken + content + '</div>').insertBefore(this); $('<div>' + appended + pause_spoken + '</div>').insertBefore(this); @@ -5669,13 +5669,13 @@ $(this).remove(); }); // Search for quote block elements. // - $(clone).find('.quoteblock').addBack('quoteblock').each(function () { + $(clone).find('.quoteblock').addBack('.quoteblock').each(function () { var attribution = $(this).find('.attribution'); - content_element = $(this).find('quote'); - content = content_element[0].innerText + 'quoted by, ' + attribution[0].innerText + ', '; + content_element = $(this).find('blockquote'); + content = content_element[0].innerText + ' — ' + attribution[0].innerText + ' — '; prepend = voiceTags['quoteblock'].prepend; appended = voiceTags['quoteblock'].append; if (content !== undefined && content != '') { $('<div>' + prepend + pause_spoken + content + '</div>').insertBefore(this); $('<div>' + appended + pause_spoken + '</div>').insertBefore(this); \ No newline at end of file