Skip to content

Commit 9478391

Browse files
authored
Merge branch 'dev' into tooltip-misalignment
2 parents 697054c + d07695c commit 9478391

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/botPage/view/blockly/customBlockly.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,21 @@ Blockly.Toolbox.TreeNode.prototype.onClick_ = function(_e) {
358358
}
359359
this.updateRow();
360360
};
361+
362+
/**
363+
* Preload all the audio files so that they play quickly when asked for.
364+
* @package
365+
*/
366+
Blockly.WorkspaceAudio.prototype.preload = function() {
367+
for (var name in this.SOUNDS_) {
368+
var sound = this.SOUNDS_[name];
369+
sound.volume = 0.01;
370+
sound.play().catch(function() {});
371+
sound.pause();
372+
// iOS can only process one sound at a time. Trying to load more than one
373+
// corrupts the earlier ones. Just load one and leave the others uncached.
374+
if (goog.userAgent.IPAD || goog.userAgent.IPHONE) {
375+
break;
376+
}
377+
}
378+
};

src/botPage/view/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import View from './View';
55
import '../../common/binary-ui/dropdown';
66
import Elevio from '../../common/elevio';
77
import GTM from '../../common/gtm';
8+
import { isProduction } from '../../common/utils/tools';
89

910
$.ajaxSetup({
1011
cache: false,
@@ -14,7 +15,7 @@ $.ajaxSetup({
1415
window._trackJs = {
1516
token : '346262e7ffef497d85874322fff3bbf8',
1617
application: 'binary-bot',
17-
enabled : window.location.hostname !== 'localhost',
18+
enabled : isProduction(),
1819
console : {
1920
display: false,
2021
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy