From 2dab03c4828123da0f18c68bb8c11a0a5a6f58e5 Mon Sep 17 00:00:00 2001 From: MohitMali Date: Fri, 17 Nov 2023 17:03:16 +0530 Subject: [PATCH] Fixed, Using TTS on Wikivoyage 2023-06 (Android 13) reads code aloud. --- .../java/org/kiwix/kiwixmobile/core/main/KiwixTextToSpeech.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixTextToSpeech.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixTextToSpeech.kt index 38484ff9e5..61bf4e12a5 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixTextToSpeech.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/main/KiwixTextToSpeech.kt @@ -151,7 +151,7 @@ class KiwixTextToSpeech internal constructor( """ javascript: body = document.getElementsByTagName('body')[0].cloneNode(true); - toRemove = body.querySelectorAll('sup.reference, #toc, .thumbcaption, title, .navbox'); + toRemove = body.querySelectorAll('sup.reference, #toc, .thumbcaption, title, .navbox, style'); Array.prototype.forEach.call(toRemove, function(elem) { elem.parentElement.removeChild(elem);}); tts.speakAloud(body.innerText);