Sha256: 1521de9d7b3aeec1ca613f95a3407502cb9e13b8879e4762e4b70ea686c18fdd
Contents?: true
Size: 965 Bytes
Versions: 4
Compression:
Stored size: 965 Bytes
Contents
Blockly.Names.prototype.safeName_ = function(name) { if (!name) { name = 'unnamed'; } else { // Unfortunately names in non-latin characters will look like // _E9_9F_B3_E4_B9_90 which is pretty meaningless. // HACK: Rubyでは日本語の変数名を許可しているためencodeURIを行わない。 // また、使えない記号を置換する。 name = name.replace(/[ !"#$%&'()=\-~^\\|`@{\[+;*:}\]<>,.?\/]/g, '_') // Most languages don't allow names with leading numbers. if ('0123456789'.indexOf(name[0]) != -1) { name = '_' + name; } } return name; }; var originalBlocksMathNumberInit = Blockly.Blocks['math_number'].init; Blockly.Blocks['math_number'].init = function() { originalBlocksMathNumberInit.call(this); this.setColour(100); }; var originalBlocksTextInit = Blockly.Blocks['text'].init; Blockly.Blocks['text'].init = function() { originalBlocksTextInit.call(this); this.setColour(100); };
Version data entries
4 entries across 4 versions & 1 rubygems