1 2// Location of your button image: 3var buttonSrc = '/assets/img/reciteme_button.png'; 4var serviceUrl = "//api.reciteme.com/asset/js?key="; 5var serviceKey = "8867c5796e1564be309475c96fd3f91e3a82a2d3"; 6var options = { 7 "Controls": { 8 "languageOverrides": { 9 "userGuide": { 10 "languages": { 11 "cy": { 12 "src": "//www.merthyr.gov.uk/council/website-and-social-media/recite-me/?lang=cy-GB&" 13 } 14 } 15 } 16 } 17 } 18 19}; // Options can be added as needed 20var autoLoad = false; 21var enableFragment = "#reciteEnable"; 22var loaded = [], frag = !1; window.location.hash === enableFragment && (frag = !0); function loadScript(c, b) { var a = document.createElement("script"); a.type = "text/javascript"; a.readyState ? a.onreadystatechange = function () { if ("loaded" == a.readyState || "complete" == a.readyState) a.onreadystatechange = null, void 0 != b && b() } : void 0 != b && (a.onload = function () { b() }); a.src = c; document.getElementsByTagName("head")[0].appendChild(a) } function _rc(c) { c += "="; for (var b = document.cookie.split(";"), a = 0; a < b.length; a++) { for (var d = b[a]; " " == d.charAt(0);)d = d.substring(1, d.length); if (0 == d.indexOf(c)) return d.substring(c.length, d.length) } return null } function loadService(c) { for (var b = serviceUrl + serviceKey, a = 0; a < loaded.length; a++)if (loaded[a] == b) return; loaded.push(b); loadScript(serviceUrl + serviceKey, function () { "function" === typeof _reciteLoaded && _reciteLoaded(); "function" == typeof c && c(); Recite.load(options); Recite.Event.subscribe("Recite:load", function () { Recite.enable() }) }) } "true" == _rc("Recite.Persist") && loadService(); if (autoLoad && "false" != _rc("Recite.Persist") || frag) document.addEventListener ? document.addEventListener("DOMContentLoaded", function (c) { loadService() }) : loadService(); 23 24document.addEventListener("click", function (e) { 25 const btn = e.target.closest(".enableRecite"); 26 if (!btn) return; 27 28 e.preventDefault(); 29 loadService(); 30 31 // Optional: if clicked inside an open Bootstrap offcanvas, close it 32 const offcanvasEl = btn.closest(".offcanvas.show"); 33 if (offcanvasEl && window.bootstrap?.Offcanvas) { 34 const inst = bootstrap.Offcanvas.getInstance(offcanvasEl) || new bootstrap.Offcanvas(offcanvasEl); 35 inst.hide(); 36 } 37}); 38 39 40 41 42// Floating Button: 43//function _reciteLoaded() { 44// if (reciteMeButton && reciteMeButton.parentNode) { 45// reciteMeButton.parentNode.removeChild(reciteMeButton); 46// } 47//} 48 49//var reciteMeButton; 50//function _createReciteButton() { 51// var buttonParentSelector = 'body'; 52// var buttonContainer = document.createElement("div"); 53// var buttonImage = document.createElement("img"); 54// var buttonAlt = "Recite Me accessibility and Language Support"; 55// var buttonTitle = "Launch Recite Me"; 56 57// buttonContainer.setAttribute('id', 'reciteme-button'); 58// buttonContainer.setAttribute('alt', buttonAlt); 59// buttonContainer.setAttribute('title', buttonTitle); 60// buttonImage.setAttribute('alt', buttonAlt); 61// buttonImage.setAttribute('title', buttonTitle); 62// buttonImage.setAttribute('src', buttonSrc); 63// buttonContainer.appendChild(buttonImage); 64// var buttonParent = document.querySelector(buttonParentSelector); 65// buttonParent.appendChild(buttonContainer); 66// buttonContainer.addEventListener("click", function () { 67// loadService(); 68// return false; 69// }); 70// reciteMeButton = buttonContainer; 71//} 72//_createReciteButton();
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.