Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

51 lines
1.7KB

  1. <script type="text/javascript">
  2. RED.nodes.registerType('BlinkerUltimate',{
  3. category: 'boolean logic ultimate',
  4. color: '#ff8080',
  5. defaults: {
  6. name: {
  7. value: "Blinker"
  8. },
  9. blinkfrequency: {
  10. value: 500
  11. }
  12. },
  13. inputs:1,
  14. outputs:1,
  15. icon: "light.png",
  16. label:
  17. function() {
  18. return (this.name||"Blinker") + " (" + this.blinkfrequency + "ms)";
  19. },
  20. paletteLabel: function() {
  21. return "BlinkerUltimate";
  22. }
  23. });
  24. </script>
  25. <script type="text/x-red" data-template-name="BlinkerUltimate">
  26. <div class="form-row">
  27. <label for="node-input-name"><i class="icon-tag"></i> Name</label>
  28. <input type="text" id="node-input-name" placeholder="Name">
  29. </div>
  30. <div class="form-row">
  31. <label for="node-input-blinkfrequency"><i class="fa fa-clock-o"></i> Blink every (in milliseconds)</label>
  32. <input type="text" id="node-input-blinkfrequency" placeholder="Example: 500">
  33. </div>
  34. </script>
  35. <script type="text/x-red" data-help-name="BlinkerUltimate">
  36. <p>
  37. <a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
  38. and
  39. <a href="http://eepurl.com/gJm095" target="_blank">Subscribe to my channel</a> for news about my nodes.
  40. </p>
  41. <p>The meaning of this node is to blink a light or something else.<br/>
  42. <p>Pass msg.payload = true to start blinking</br>
  43. Pass msg.payload = false to stop blinking</br>
  44. Pass msg.interval = 2000 to change the blinking interval</br>
  45. </p>
  46. <a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
  47. </script>