1//alert(localStorage.getItem("x")); 2var x = localStorage.getItem("x"); 3 4if (x==1) { 5 6 $('a').mouseenter(function() { // Attach this function to all mouseenter events for 'a' tags 7 responsiveVoice.cancel(); // Cancel anything else that may currently be speaking 8 responsiveVoice.speak($(this).text(), "Russian Female"); // Speak the text contents of all nodes within the current 'a' tag 9 10 }); 11 12function getSelectionText() { 13 var text = ""; 14 if (window.getSelection) { 15 text = window.getSelection().toString(); 16 // for Internet Explorer 8 and below. For Blogger, you should use && instead of &&. 17 } else if (document.selection && document.selection.type != "Control") { 18 text = document.selection.createRange().text; 19 } 20 return text; 21} 22$(document).ready(function (){ // when the document has completed loading 23 $(document).mouseup(function (e){ // attach the mouseup event for all div and pre tags 24 setTimeout(function() { // When clicking on a highlighted area, the value stays highlighted until after the mouseup event, and would therefore stil be captured by getSelection. This micro-timeout solves the issue. 25 responsiveVoice.cancel(); // stop anything currently being spoken 26 responsiveVoice.speak(getSelectionText(), "Russian Female"); //speak the text as returned by getSelectionText 27 }, 1); 28 }); 29}); 30 31 $("#text-to-speech").addClass('text-to-speech-on'); 32 } 33 34 35function Mute() 36 { 37 if (x==0) { 38 39 $('a').mouseenter(function() { // Attach this function to all mouseenter events for 'a' tags 40 responsiveVoice.cancel(); // Cancel anything else that may currently be speaking 41 responsiveVoice.speak($(this).text(), "Russian Female"); // Speak the text contents of all nodes within the current 'a' tag 42 43 }); 44 45function getSelectionText() { 46 var text = ""; 47 if (window.getSelection) { 48 text = window.getSelection().toString(); 49 // for Internet Explorer 8 and below. For Blogger, you should use && instead of &&. 50 } else if (document.selection && document.selection.type != "Control") { 51 text = document.selection.createRange().text; 52 } 53 return text; 54} 55$(document).ready(function (){ // when the document has completed loading 56 $(document).mouseup(function (e){ // attach the mouseup event for all div and pre tags 57 setTimeout(function() { // When clicking on a highlighted area, the value stays highlighted until after the mouseup event, and would therefore stil be captured by getSelection. This micro-timeout solves the issue. 58 responsiveVoice.cancel(); // stop anything currently being spoken 59 responsiveVoice.speak(getSelectionText(), "Russian Female"); //speak the text as returned by getSelectionText 60 }, 1); 61 }); 62}); 63 $("#text-to-speech").addClass('text-to-speech-on'); 64x=1; 65 } 66 else { 67 68 69 $(document).mouseup(function (e){ // attach the mouseup event for all div and pre tags 70 setTimeout(function() { // When clicking on a highlighted area, the value stays highlighted until after the mouseup event, and would therefore stil be captured by getSelection. This micro-timeout solves the issue. 71 responsiveVoice.cancel(); // stop anything currently being spoken 72 //speak the text as returned by getSelectionText 73 }, 0); 74 }); 75 76 77 $('a').mouseenter(function() { // Attach this function to all mouseenter events for 'a' tags 78 responsiveVoice.cancel(); // Cancel anything else that may currently be speaking 79 80 }); 81 82 $("#text-to-speech").removeClass('text-to-speech-on'); 83 x=0; 84 85 } 86localStorage.setItem("x", x); 87 }
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.