diff --git a/octoprint_fanspeedslider/static/js/fanslider.js b/octoprint_fanspeedslider/static/js/fanslider.js index d6e0eff..6d0ebe1 100644 --- a/octoprint_fanspeedslider/static/js/fanslider.js +++ b/octoprint_fanspeedslider/static/js/fanslider.js @@ -40,16 +40,22 @@ $(function () { self.control.fanSpeed(self.control.minFanSpeed()); var options = { text: 'Fan speed increased to meet minimum requirement.', + addclass: 'fan_speed_notice_low', + } + if ($(".fan_speed_notice_low").length <1) { + self.showNotify(self, options); } - self.showNotify(self, options); } else if (self.control.fanSpeed() > self.control.maxFanSpeed()) { console.log("Fan Speed Control Plugin: " + self.control.fanSpeed() + "% is more than the maximum speed (" + self.control.maxFanSpeed() + "%), decreasing."); self.control.fanSpeed(self.control.maxFanSpeed()); var options = { text: 'Fan speed decreased to meet maximum requirement.', + addclass: 'fan_speed_notice_high', + } + if ($(".fan_speed_notice_high").length <1) { + self.showNotify(self, options); } - self.showNotify(self, options); } });