Disabling audio autoplay for certain fields

Hello!

The snippet cited by lingthusiast worked for me, however, only on desktop and not in AnkiDroid. What made it work on both platorms was

 <script>
	var elem = document.querySelector(".soundLink, .replaybutton");
	if (elem) { 
		elem.click();
	}else{
		window.onload = function(){
			var elem = document.querySelector(".soundLink, .replaybutton");
			if (elem) { elem.click();}
		}
	}
 </script> 

but then I had to disable automatic playback of audio fields for the deck in AnkiDroid.

1 Like