mumuki-laboratory 7.4.1 → 7.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/mumuki_laboratory/application/interval.js +17 -0
- data/app/assets/javascripts/mumuki_laboratory/application/kids.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/messages.js +1 -1
- data/app/assets/javascripts/mumuki_laboratory/application/timer.js +1 -1
- data/lib/mumuki/laboratory/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1295fcc4775aeabfe0b1efb0d4f6d98395a46cd9decd3f52c1ccf7bc495d32a1
|
4
|
+
data.tar.gz: 648f9f2f5041225e95ed8a0ab71845e3d62017da827ada28ded779fae53c8f10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc48be9b23270f06847d7d7c1199e9f16d5a1bd37ff7c04990d9bf62bfe2635e34ffbf843381e6b6fa1537c992cf09812555f49d1bb26811c53a5215ede12b47
|
7
|
+
data.tar.gz: de9e92c566eb31509061c5d4325a1849de664cb7c3b1e9bb4cf02f12e592d828fc7d089e5653a8c3d03f3ef76734aec7b9d81edad6859ab7137461f8c279399b
|
@@ -0,0 +1,17 @@
|
|
1
|
+
var mumuki = mumuki || {};
|
2
|
+
|
3
|
+
(function (mumuki) {
|
4
|
+
// When using Turbolinks, intervals loaded inside <body> aren't destroyed on page changes
|
5
|
+
// Use this function instead if you want the behaviour of a regular setInterval
|
6
|
+
mumuki.setInterval = function (intervalFunction, milliseconds) {
|
7
|
+
const interval = setInterval.apply(this, [intervalFunction, milliseconds]);
|
8
|
+
|
9
|
+
// Using one to avoid calling clearInterval on every page chance.
|
10
|
+
$(document).one('turbolinks:before-cache turbolinks:before-render', function () {
|
11
|
+
clearInterval(interval);
|
12
|
+
});
|
13
|
+
|
14
|
+
return interval;
|
15
|
+
}.bind(this);
|
16
|
+
|
17
|
+
}(mumuki));
|
@@ -313,7 +313,7 @@ mumuki.load(function () {
|
|
313
313
|
});
|
314
314
|
|
315
315
|
if (paragraphCount > 1) {
|
316
|
-
nextSpeechBlinking = setInterval(() => $nextSpeech.fadeTo('slow', 0.1).fadeTo('slow', 1.0), 1000);
|
316
|
+
nextSpeechBlinking = mumuki.setInterval(() => $nextSpeech.fadeTo('slow', 0.1).fadeTo('slow', 1.0), 1000);
|
317
317
|
}
|
318
318
|
|
319
319
|
$nextSpeech.click(showNextParagraph);
|
@@ -45,7 +45,7 @@ mumuki.load(function () {
|
|
45
45
|
});
|
46
46
|
},
|
47
47
|
setMessagesInterval: function () {
|
48
|
-
setInterval(Chat.getMessages, 60000);
|
48
|
+
mumuki.setInterval(Chat.getMessages, 60000);
|
49
49
|
},
|
50
50
|
submitMessagesForm: function (url, readUrl, errorUrl) {
|
51
51
|
var $container = $('.mu-view-messages');
|
@@ -8,7 +8,7 @@ var mumuki = mumuki || {};
|
|
8
8
|
var duration = moment.duration(diffTime, 'milliseconds');
|
9
9
|
var intervalDuration = 1000;
|
10
10
|
|
11
|
-
var interval = setInterval(function () {
|
11
|
+
var interval = mumuki.setInterval(function () {
|
12
12
|
duration = moment.utc(duration - intervalDuration);
|
13
13
|
if(duration.valueOf() <= 0) {
|
14
14
|
clearInterval(interval);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-laboratory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.4.
|
4
|
+
version: 7.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -332,6 +332,7 @@ files:
|
|
332
332
|
- app/assets/javascripts/mumuki_laboratory/application/discussions.js
|
333
333
|
- app/assets/javascripts/mumuki_laboratory/application/free-form.js
|
334
334
|
- app/assets/javascripts/mumuki_laboratory/application/inputs.js
|
335
|
+
- app/assets/javascripts/mumuki_laboratory/application/interval.js
|
335
336
|
- app/assets/javascripts/mumuki_laboratory/application/kids.js
|
336
337
|
- app/assets/javascripts/mumuki_laboratory/application/load-analytics.js
|
337
338
|
- app/assets/javascripts/mumuki_laboratory/application/load-error-svg.js
|