copy_tuner_client 0.14.1 → 0.14.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/copytuner.js +1 -0
- data/lib/copy_tuner_client/copyray.rb +4 -6
- data/lib/copy_tuner_client/version.rb +1 -1
- data/src/main.ts +2 -0
- 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: 26adaa006e804e9c509487d5b7828552870c6009b99d7aee76a3762458d2395e
|
4
|
+
data.tar.gz: 37e7dc18874e645182753e0901ffc66290c6900beeb40901c3517b46592ec8de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fee3134bfc9dedd074a545d91f3ace4d0edb4e5d299a5c33cd055a77249c769e2dc0bb3fa67091c843c62a13f54100a61cb9753cf18b95c330335f513617a26d
|
7
|
+
data.tar.gz: a39cd58e37c7c062916a27044c9aba40d1f0dc82c5acfe3404ac4e2961e41de91dc94a7e8ab829a91e6b6b8c07cde211f99669c5306d6be1de187637d09973ab
|
@@ -368,6 +368,7 @@ const start = () => {
|
|
368
368
|
const { url, data } = window.CopyTuner;
|
369
369
|
appendCopyTunerBar(url);
|
370
370
|
const copyray2 = new Copyray(url, data);
|
371
|
+
window.CopyTuner.toggle = () => copyray2.toggle();
|
371
372
|
document.addEventListener("keydown", (event) => {
|
372
373
|
if (copyray2.isShowing && ["Escape", "Esc"].includes(event.key)) {
|
373
374
|
copyray2.hide();
|
@@ -5,12 +5,10 @@ module CopyTunerClient
|
|
5
5
|
# Becomes:
|
6
6
|
# <!--COPYRAY views.home.index.message-->message
|
7
7
|
def self.augment_template(source, key)
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
source
|
13
|
-
end
|
8
|
+
return source if source.blank? || !source.is_a?(String)
|
9
|
+
|
10
|
+
escape = CopyTunerClient.configuration.html_escape && !source.html_safe?
|
11
|
+
augmented = "<!--COPYRAY #{key}-->#{escape ? ERB::Util.html_escape(source) : source}"
|
14
12
|
augmented.html_safe
|
15
13
|
end
|
16
14
|
end
|
data/src/main.ts
CHANGED
@@ -6,6 +6,7 @@ declare global {
|
|
6
6
|
interface Window {
|
7
7
|
CopyTuner: {
|
8
8
|
url: string
|
9
|
+
toggle?: () => void
|
9
10
|
// TODO: type
|
10
11
|
data: object
|
11
12
|
}
|
@@ -33,6 +34,7 @@ const start = () => {
|
|
33
34
|
|
34
35
|
appendCopyTunerBar(url)
|
35
36
|
const copyray = new Copyray(url, data)
|
37
|
+
window.CopyTuner.toggle = () => copyray.toggle()
|
36
38
|
|
37
39
|
document.addEventListener('keydown', (event) => {
|
38
40
|
// @ts-expect-error TS2339
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copy_tuner_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SonicGarden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|