1+ var mainUrl = 'https://tutorials.webduino.io/zh-tw/docs/' ;
2+ var utmUrl = '?utm_source=cloud-blockly&utm_campaign=help_url' ;
3+
14Blockly . Blocks [ 'DFPlayer_new' ] = {
25 init : function ( ) {
36 this . appendDummyInput ( )
@@ -34,7 +37,7 @@ Blockly.Blocks['DFPlayer_new'] = {
3437 this . setOutput ( true ) ;
3538 this . setColour ( 230 ) ;
3639 this . setTooltip ( '' ) ;
37- this . setHelpUrl ( 'https://webduino.io' ) ;
40+ this . setHelpUrl ( mainUrl + 'basic/index.html' + utmUrl ) ;
3841 }
3942} ;
4043
@@ -49,7 +52,7 @@ Blockly.Blocks['DFPlayer_play'] = {
4952 this . setNextStatement ( true ) ;
5053 this . setTooltip ( '' ) ;
5154 this . setColour ( 65 ) ;
52- this . setHelpUrl ( 'https://webduino.io' ) ;
55+ this . setHelpUrl ( mainUrl + 'basic/index.html' + utmUrl ) ;
5356 }
5457}
5558
@@ -62,7 +65,7 @@ Blockly.Blocks['DFPlayer_volume'] = {
6265 this . setNextStatement ( true ) ;
6366 this . setTooltip ( '' ) ;
6467 this . setColour ( 65 ) ;
65- this . setHelpUrl ( 'https://webduino.io' ) ;
68+ this . setHelpUrl ( mainUrl + 'basic/index.html' + utmUrl ) ;
6669 }
6770} ;
6871
@@ -77,7 +80,7 @@ Blockly.Blocks['DFPlayer_loop'] = {
7780 this . setNextStatement ( true ) ;
7881 this . setTooltip ( '' ) ;
7982 this . setColour ( 65 ) ;
80- this . setHelpUrl ( 'https://webduino.io' ) ;
83+ this . setHelpUrl ( mainUrl + 'basic/index.html' + utmUrl ) ;
8184 }
8285}
8386
@@ -98,6 +101,6 @@ Blockly.Blocks['DFPlayer_action'] = {
98101 this . setNextStatement ( true , null ) ;
99102 this . setColour ( 65 ) ;
100103 this . setTooltip ( '' ) ;
101- this . setHelpUrl ( '' ) ;
104+ this . setHelpUrl ( mainUrl + 'basic/index.html' + utmUrl ) ;
102105 }
103106} ;
0 commit comments