Sha256: d5d2c5ab5b7ad312071aeb8ec36d5b28296b5f9934edd1b9107d730c920990d0
Contents?: true
Size: 617 Bytes
Versions: 14
Compression:
Stored size: 617 Bytes
Contents
var mumuki = mumuki || {}; (function (mumuki) { // 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); }(mumuki));
Version data entries
14 entries across 14 versions & 1 rubygems