1// VoiceReader Web Configuration 2// This file configures the VoiceReader Web player based on the page language 3 4(function() { 5 'use strict'; 6 7 // Get configuration from data attributes 8 const playerMainElement = document.querySelector('.vrweb_player_main'); 9 const vrwebIconPath = playerMainElement ? playerMainElement.getAttribute('data-vrweb-icon-path') : ''; 10 const vrwebPathPrefix = playerMainElement ? playerMainElement.getAttribute('data-vrweb-path-prefix') : ''; 11 const vrwebAssetsPathPrefix = playerMainElement ? playerMainElement.getAttribute('data-vrweb-assets-path-prefix') : ''; 12 13 const languageSelected = document 14 .getElementsByTagName('html')[0] 15 .getAttribute('lang') 16 .toLocaleLowerCase(); 17 const shortFormValue = languageSelected.substring(0, 2); 18 19 let shortForm; 20 let voiceName; 21 22 switch (shortFormValue) { 23 case 'de': 24 shortForm = 'de-DE'; 25 voiceName = 'Petra-Ml'; 26 break; 27 case 'en': 28 shortForm = 'en-GB'; 29 voiceName = 'Serena'; 30 break; 31 case 'tr': 32 shortForm = 'tr-TR'; 33 voiceName = 'Yelda'; 34 break; 35 case 'ru': 36 shortForm = 'ru-RU'; 37 voiceName = 'Milena'; 38 break; 39 case 'uk': 40 shortForm = 'ua-UA'; 41 voiceName = 'Lesya'; 42 break; 43 case 'ar': 44 shortForm = 'arg'; 45 voiceName = 'Maged-Ml'; 46 break; 47 default: 48 shortForm = 'en-GB'; 49 voiceName = 'Serena'; 50 } 51 52 // Set global vrweb_ configuration variables 53 window.vrweb_customerid = '11633'; 54 window.vrweb_player_form = '0'; 55 window.vrweb_player_type = 'embedded'; 56 window.vrweb_player_color = 'black'; 57 window.vrweb_guilang = 'de'; 58 window.vrweb_icon = vrwebIconPath; 59 window.vrweb_iconcolor = 'black'; 60 window.vrweb_lang = shortForm; 61 window.vrweb_voicename = voiceName; 62 window.vrweb_readelementsclass = 'vrweb-read-content'; 63 window.vrweb_exclelementsclass = 'sr-only'; 64 window.vrweb_path_prefix = vrwebPathPrefix; 65 66 /* 67 * DSI-CHANGE: 68 * added extra configuration key 'vrweb_assets_path_prefix' to handle local assets: 69 */ 70 window.vrweb_assets_path_prefix = vrwebAssetsPathPrefix; 71})(); 72
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.