11//https://blockly-demo.appspot.com/static/demos/blockfactory/index.html#ji8gno
2+ var mainUrl = 'https://tutorials.webduino.io/zh-tw/docs/' ;
3+ var utmUrl = '?utm_source=cloud-blockly&utm_campaign=help_url' ;
4+
25Blockly . Blocks [ 'ws2812_new' ] = {
36 init : function ( ) {
47 this . appendDummyInput ( )
@@ -28,7 +31,7 @@ Blockly.Blocks['ws2812_new'] = {
2831 this . setOutput ( true , null ) ;
2932 this . setColour ( 230 ) ;
3033 this . setTooltip ( '' ) ;
31- this . setHelpUrl ( 'https://webduino.io' ) ;
34+ this . setHelpUrl ( mainUrl + 'basic/index.html' + utmUrl ) ;
3235 }
3336} ;
3437
@@ -43,7 +46,7 @@ Blockly.Blocks['ws2812_data'] = {
4346 this . setNextStatement ( true , null ) ;
4447 this . setColour ( 65 ) ;
4548 this . setTooltip ( '' ) ;
46- this . setHelpUrl ( 'https://webduino.io' ) ;
49+ this . setHelpUrl ( mainUrl + 'basic/index.html' + utmUrl ) ;
4750 }
4851} ;
4952
@@ -70,7 +73,7 @@ Blockly.Blocks['ws2812_print'] = {
7073 this . setNextStatement ( true , null ) ;
7174 this . setColour ( 65 ) ;
7275 this . setTooltip ( '' ) ;
73- this . setHelpUrl ( 'https://webduino.io' ) ;
76+ this . setHelpUrl ( mainUrl + 'basic/index.html' + utmUrl ) ;
7477 }
7578} ;
7679
@@ -85,7 +88,7 @@ Blockly.Blocks['ws2812_clear'] = {
8588 this . setNextStatement ( true , null ) ;
8689 this . setColour ( 65 ) ;
8790 this . setTooltip ( '' ) ;
88- this . setHelpUrl ( 'https://webduino.io' ) ;
91+ this . setHelpUrl ( mainUrl + 'basic/index.html' + utmUrl ) ;
8992 }
9093} ;
9194
@@ -102,6 +105,6 @@ Blockly.Blocks['ws2812_brightness'] = {
102105 this . setNextStatement ( true , null ) ;
103106 this . setColour ( 65 ) ;
104107 this . setTooltip ( '' ) ;
105- this . setHelpUrl ( 'https://webduino.io' ) ;
108+ this . setHelpUrl ( mainUrl + 'basic/index.html' + utmUrl ) ;
106109 }
107110} ;
0 commit comments