Is there an option to enable/disable Blockly sounds (delete and click) after the Blockly injection?
--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Er, I think you'll need to use .call() since 'this' must be specified:
realPlay.call(this, name, opt_volume);
On 28 August 2017 at 20:09, Neil Fraser <ro...@neil.fraser.name> wrote:
Monkey patching!
var silence = true;
var realPlay = Blockly.WorkspaceAudio.prototype.play;
Blockly.WorkspaceAudio.prototype.play = function(name, opt_volume) {
if (!silence) {
realPlay(name, opt_volume);
}
};
On 28 August 2017 at 19:29, Guilherme Recchi Cardozo <gcar...@inf.ufsm.br> wrote:
Is there an option to enable/disable Blockly sounds (delete and click) after the Blockly injection?
--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Neil Fraser
https://neil.fraser.name