Sha256: 1883a92dd4e612aaa45cfade655a378f155903c498bc65dee50849bcebf5313d
Contents?: true
Size: 577 Bytes
Versions: 73
Compression:
Stored size: 577 Bytes
Contents
(function () { // When using Turbolinks, intervals loaded inside <body> aren't destroyed on page changes // Use this function instead if you want the behaviour of a regular setInterval mumuki.setInterval = function (intervalFunction, milliseconds) { const interval = setInterval.apply(this, [intervalFunction, milliseconds]); // Using one to avoid calling clearInterval on every page chance. $(document).one('turbolinks:before-cache turbolinks:before-render', function () { clearInterval(interval); }); return interval; }.bind(this); }());
Version data entries
73 entries across 73 versions & 1 rubygems