2013-11-03 22:29:20 +01:00
|
|
|
|
|
|
|
<script type="text/x-red" data-template-name="badwords">
|
|
|
|
<div class="form-row">
|
2014-09-03 17:12:26 +02:00
|
|
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
2013-11-03 22:29:20 +01:00
|
|
|
<input type="text" id="node-input-name" placeholder="Name">
|
|
|
|
</div>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/x-red" data-help-name="badwords">
|
2016-03-02 14:24:56 +01:00
|
|
|
<p>Analyses the <code>msg.payload</code> and tries to filter out any messages containing bad swear words...</p>
|
2013-11-09 18:12:19 +01:00
|
|
|
<p><b>Note:</b> this only operates on payloads of type <b>string</b>. Everything else is blocked.</p>
|
2013-11-03 22:29:20 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
RED.nodes.registerType('badwords',{
|
|
|
|
category: 'analysis-function',
|
|
|
|
color:"#E6E0F8",
|
|
|
|
defaults: {
|
2013-11-10 18:01:19 +01:00
|
|
|
name: {value:""}
|
2013-11-03 22:29:20 +01:00
|
|
|
},
|
|
|
|
inputs:1,
|
|
|
|
outputs:1,
|
|
|
|
icon: "arrow-in.png",
|
|
|
|
label: function() {
|
|
|
|
return this.name||"badwords";
|
|
|
|
},
|
|
|
|
labelStyle: function() {
|
|
|
|
return this.name?"node_label_italic":"";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|