File tree Expand file tree Collapse file tree 2 files changed +12
-20
lines changed Expand file tree Collapse file tree 2 files changed +12
-20
lines changed Original file line number Diff line number Diff line change 1717var qcode = qcode || { } ;
1818
1919( function ( $ , undefined ) {
20- var ding ;
2120 var alertQueue = [ ] ;
2221 var timeoutID ;
23- $ ( function ( ) {
24- if ( qcode . Sound . supported ) {
25- ding = new qcode . Sound ( '/Sounds/Windows%20Ding.wav' ) ;
26- }
27- } ) ;
2822
2923 function showNextMessage ( ) {
3024 if ( alertQueue . length > 0 && timeoutID === undefined ) {
@@ -69,12 +63,13 @@ var qcode = qcode || {};
6963 showNextMessage ( ) ;
7064 }
7165 } ) ;
72- if ( qcode . Sound && qcode . Sound . supported ) {
73- ding . play ( ) ;
66+ if ( qcode . Sound && qcode . Sound . supported && qcode . alert . config . sound ) {
67+ qcode . alert . config . sound . play ( ) ;
7468 }
7569 } ) ;
7670 showNextMessage ( ) ;
7771 }
72+ qcode . alert . config = { } ;
7873
7974 qcode . confirm = function ( message , onConfirm ) {
8075 alertQueue . push ( function ( ) {
@@ -125,10 +120,11 @@ var qcode = qcode || {};
125120 showNextMessage ( ) ;
126121 }
127122 } ) ;
128- if ( qcode . Sound && qcode . Sound . supported ) {
129- ding . play ( ) ;
123+ if ( qcode . Sound && qcode . Sound . supported && qcode . confirm . config . sound ) {
124+ qcode . confirm . config . sound . play ( ) ;
130125 }
131126 } ) ;
132127 showNextMessage ( ) ;
133128 }
129+ qcode . confirm . config = { } ;
134130} ) ( jQuery ) ;
Original file line number Diff line number Diff line change @@ -8651,14 +8651,8 @@ function preloadImages() {
86518651var qcode = qcode || { } ;
86528652
86538653( function ( $ , undefined ) {
8654- var ding ;
86558654 var alertQueue = [ ] ;
86568655 var timeoutID ;
8657- $ ( function ( ) {
8658- if ( qcode . Sound . supported ) {
8659- ding = new qcode . Sound ( '/Sounds/Windows%20Ding.wav' ) ;
8660- }
8661- } ) ;
86628656
86638657 function showNextMessage ( ) {
86648658 if ( alertQueue . length > 0 && timeoutID === undefined ) {
@@ -8703,12 +8697,13 @@ var qcode = qcode || {};
87038697 showNextMessage ( ) ;
87048698 }
87058699 } ) ;
8706- if ( qcode . Sound && qcode . Sound . supported ) {
8707- ding . play ( ) ;
8700+ if ( qcode . Sound && qcode . Sound . supported && qcode . alert . config . sound ) {
8701+ qcode . alert . config . sound . play ( ) ;
87088702 }
87098703 } ) ;
87108704 showNextMessage ( ) ;
87118705 }
8706+ qcode . alert . config = { } ;
87128707
87138708 qcode . confirm = function ( message , onConfirm ) {
87148709 alertQueue . push ( function ( ) {
@@ -8759,12 +8754,13 @@ var qcode = qcode || {};
87598754 showNextMessage ( ) ;
87608755 }
87618756 } ) ;
8762- if ( qcode . Sound && qcode . Sound . supported ) {
8763- ding . play ( ) ;
8757+ if ( qcode . Sound && qcode . Sound . supported && qcode . confirm . config . sound ) {
8758+ qcode . confirm . config . sound . play ( ) ;
87648759 }
87658760 } ) ;
87668761 showNextMessage ( ) ;
87678762 }
8763+ qcode . confirm . config = { } ;
87688764} ) ( jQuery ) ;
87698765
87708766/* ==== qcode.sound.js ==== */
You can’t perform that action at this time.
0 commit comments