mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Add SMAZ node (for simple text compression)
This commit is contained in:
33
parsers/smaz/70-smaz.html
Normal file
33
parsers/smaz/70-smaz.html
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
<script type="text/x-red" data-template-name="smaz">
|
||||
<div class="form-row">
|
||||
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="Name">
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="smaz">
|
||||
<p>A function that converts the <code>msg.payload</code> to and from smaz format.</p>
|
||||
<p>If the input is a string it tries to convert it to a smaz buffer.</p>
|
||||
<p>If the input is a smaz buffer it tries to decode it back to a string./</p>
|
||||
<p>All other message types are dropped.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
RED.nodes.registerType('smaz',{
|
||||
category: 'function',
|
||||
color:"#DEBD5C",
|
||||
defaults: {
|
||||
name: {value:""}
|
||||
},
|
||||
inputs:1,
|
||||
outputs:1,
|
||||
icon: "parser-smaz.png",
|
||||
label: function() {
|
||||
return this.name||"smaz";
|
||||
},
|
||||
labelStyle: function() {
|
||||
return this.name?"node_label_italic":"";
|
||||
}
|
||||
});
|
||||
</script>
|
Reference in New Issue
Block a user