flammarion_rails 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 533ef538f980cf22d44c98c61bd2bf56102f3fd9
|
4
|
+
data.tar.gz: d9c0c69d88f1345265a743e9e77c7ea824e5cd37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39f3d6135d5c3e641b7b6f22d7a97324259f34e3493c0bbaa50f4093264e9e418aafdaa54bc740a39b36f8dc85988b126cc598edd50222ee3a55bb89b19771d7
|
7
|
+
data.tar.gz: 8300f6a42c09ccb9534cc40676de7e7a504668a5ed76827049dffb5a3486589cab36120202474418997a532b039908f5941240f48d677c6bf889018d688a47ff
|
@@ -7,6 +7,25 @@ history.pushState(null, null, document.URL)
|
|
7
7
|
window.addEventListener 'popstate', ->
|
8
8
|
history.pushState(null, null, document.URL)
|
9
9
|
|
10
|
+
# Page
|
11
|
+
########################################
|
12
|
+
# Note: allow to skip css reloading which causes unstyled page sudden burst
|
13
|
+
|
14
|
+
extract_first_tag = (html, tag) ->
|
15
|
+
start_match = ///<#{tag}.*>///.exec(html)
|
16
|
+
end_match = html.indexOf("</#{tag}>")
|
17
|
+
html.substring(start_match.index + start_match[0].length, end_match)
|
18
|
+
|
19
|
+
ws.onmessage_actions.page = (event) ->
|
20
|
+
head = extract_first_tag(ws_data.body, 'head')
|
21
|
+
head = head.replace(/\s\/>/g, ">").replace(/'/g, '"')
|
22
|
+
body = extract_first_tag(ws_data.body, 'body')
|
23
|
+
unless head == document.head.innerHTML
|
24
|
+
$('head').html(head)
|
25
|
+
$('body').html(body)
|
26
|
+
$(window).scrollTop(0)
|
27
|
+
$.ready()
|
28
|
+
|
10
29
|
# NProgress
|
11
30
|
########################################
|
12
31
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flammarion_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrice Lebel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|