izi_lightup 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42f8d61f9ec4c7084a86d25b94406a90f50e143f8321019baa55c371c99f9954
|
4
|
+
data.tar.gz: 1b69afac25575f41dc28f2b58f738e72da421324a9686d4741f1780a10684110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eaa3f189c8f6dbe98b57d46b24a445f5be051a96eab836de9665b5d6984422de4f3915fe482100d198bac3290ec7049c214d64946964784314efcf8e8b239d0c
|
7
|
+
data.tar.gz: d15c0663e94f3daa8059c5cfb25f2eaa98874c3d36f65608ab2d542649c7d32ae3ac060bcc56e210e94c4a2b0f5da9a6672ce309f7c20e5b25f08b3553b3bcde
|
@@ -1,6 +1,6 @@
|
|
1
1
|
((window, document) -> (
|
2
2
|
EVENT_TYPE = window.__activeEventName || 'Activity'
|
3
|
-
MAX_TIMEOUT = window.__activeTimeout ||
|
3
|
+
MAX_TIMEOUT = window.__activeTimeout || 10000
|
4
4
|
TRACK_MARKING = window.__activeMark || '_real_track=true'
|
5
5
|
|
6
6
|
if custom_mt = /^\?(\d+)$/.exec(window.location.search)
|
@@ -55,4 +55,29 @@
|
|
55
55
|
|
56
56
|
document.body.appendChild(src)
|
57
57
|
true
|
58
|
+
|
59
|
+
window.miniPreload ||= (key, source_url, callback = undefined) ->
|
60
|
+
id = "source_#{key.replace(/[^a-z0-9_\-]+/ig, '_')}"
|
61
|
+
__required[id] ||= {loaded: false, callbacks: [], started: false}
|
62
|
+
|
63
|
+
# subscribe only if no source
|
64
|
+
return _subscribe(id, callback) unless source_url?.length > 0
|
65
|
+
|
66
|
+
# subscribe only if already attached & started
|
67
|
+
return _subscribe(id, callback) if __required[id].started
|
68
|
+
|
69
|
+
# mark as started
|
70
|
+
__required[id].started = true
|
71
|
+
|
72
|
+
# attach script
|
73
|
+
src = document.createElement('link')
|
74
|
+
src.id = id
|
75
|
+
src.rel = 'preload'
|
76
|
+
src.href = source_url
|
77
|
+
_buildSubscriptions(id, src)
|
78
|
+
_subscribe(id, callback)
|
79
|
+
|
80
|
+
document.head.appendChild(src)
|
81
|
+
true
|
82
|
+
|
58
83
|
))(window, document)
|
data/lib/izi_lightup/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: izi_lightup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IzikAJ
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |-
|
14
14
|
Utils to speed up page load by using critical css &
|