Support » Plugin: Magic Post Voice » Update the voicetrigger.js

  • Resolved treedbox

    (@treedbox)


    Hi Alexandre Gaboriau,
    i did an update in the file: voicetrigger.js

    $( ".webreader-image" ).click(function(e) {
    		e.preventDefault();
    ...

    To avoid the jump to the top when some button is clicked.
    Can you update the original file to the next update?

    jQuery(document).ready(function($) {
    	$( ".webreader-image" ).click(function(e) {
    		e.preventDefault();
    		if(responsiveVoice.voiceSupport()) {
    			$( ".webreader-image" ).hide( "slow", function() {});
    			$( ".webreader-image-off" ).show( "fast", function() {});
    			$( ".webreader-image-pause" ).show( "fast", function() {});
    			responsiveVoice.setDefaultVoice(voice_values.voice_lang);
    			responsiveVoice.speak(voice_values.content.toLowerCase());
    		}
    	});
    	$( ".webreader-image-off" ).click(function(e) {
    		e.preventDefault();
    		responsiveVoice.cancel();
    		$( ".webreader-image" ).show( "fast", function() {});
    		$( ".webreader-image-off" ).hide( "slow", function() {});
    		$( ".webreader-image-pause" ).hide( "fast", function() {});
    		$( ".webreader-image-resume" ).hide( "fast", function() {});
    	});
    	
    	$( ".webreader-image-pause" ).click(function(e) {
    		e.preventDefault();
    		responsiveVoice.pause();
    		$( ".webreader-image-pause" ).hide( "slow", function() {});
    		$( ".webreader-image-resume" ).show( "fast", function() {});
    	});
    	
    	$( ".webreader-image-resume" ).click(function(e) {
    		e.preventDefault();
    		responsiveVoice.resume();
    		$( ".webreader-image-pause" ).show( "fast", function() {});
    		$( ".webreader-image-resume" ).hide( "slow", function() {});
    	});
    });
Viewing 1 replies (of 1 total)
  • Plugin Author Mcurly

    (@mcurly)

    Hello treedbox,

    Thanks for your contribution, it has been added to the plugin !

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.