heavens_door 0.1.4 → 0.1.5
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/heavens_door.js +1 -1
- data/lib/heavens_door/middleware.rb +2 -0
- data/lib/heavens_door/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11a28c86f570766975fc97869ad182ea5484a99e73e5e1bca7c5d46739f8e3a7
|
4
|
+
data.tar.gz: 0070c1f6ee6b51333edf798825aef9b3e3ea5d0db33553464c8d24e1bde918f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e1a391b2b63e0780e653e38f4bd0230c3b6302141d4c190789da2fe3fcccc6b58582da3615c32883ac1ce8a5dbd6105425cba4495d9924440be6af3eac4ed44
|
7
|
+
data.tar.gz: d0c2a252e3e51a3fee67a304852ca8273d9c8dfbd18f42e6fe36955ff27e0357f77d72d8165d029ef8c702b0106c873220e58f633b09cdcb1ed95f0a13f48d46
|
@@ -24,7 +24,7 @@
|
|
24
24
|
document.getElementById('heavens-door-start').style.display = 'inline';
|
25
25
|
document.getElementById('heavens-door-stop').style.display = 'none';
|
26
26
|
document.getElementById('heavens-door-copy').style.display = 'none';
|
27
|
-
sessionStorage.
|
27
|
+
sessionStorage.removeItem('heavensDoor');
|
28
28
|
});
|
29
29
|
|
30
30
|
document.getElementById('heavens-door-copy').addEventListener('click', () => {
|
@@ -10,6 +10,7 @@ module HeavensDoor
|
|
10
10
|
status, headers, body = @app.call env
|
11
11
|
|
12
12
|
if headers && headers['Content-Type']&.include?('text/html') &&
|
13
|
+
(status / 100 != 3) && # redirections
|
13
14
|
(!env['action_dispatch.content_security_policy']&.script_src('unsafe-inline') && !env['action_dispatch.content_security_policy']&.style_src('unsafe-inline')) # the Rails default top page has this
|
14
15
|
case body
|
15
16
|
when ActionDispatch::Response, ActionDispatch::Response::RackBody
|
@@ -18,6 +19,7 @@ module HeavensDoor
|
|
18
19
|
body = body[0]
|
19
20
|
end
|
20
21
|
|
22
|
+
body = body.dup if body.frozen?
|
21
23
|
body.sub!(/<\/head[^>]*>/) { %Q[<link rel="stylesheet" href="/assets/heavens_door.css" /><script src="/assets/heavens_door.js"></script>\n#{$~}] }
|
22
24
|
body.sub!(/<body[^>]*>/) { %Q[#{$~}\n<div id="heavens-door" class="heavens-door-custom"><span id="heavens-door-start">⏺</span><span id="heavens-door-stop">⏹</span><span id="heavens-door-copy">📋</span></div>] }
|
23
25
|
|
data/lib/heavens_door/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heavens_door
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akira Matsuda
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|