summoner-jekyll-theme 1.1.2 → 1.2.0

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
  SHA256:
3
- metadata.gz: 8dd2bc7f7ed30e80952d5eb42da055ef499ac081e7946b6b729995f6f5028cd5
4
- data.tar.gz: 5a79298e099091247d6afd6ed08b5987cafacc92a73f78865bba08de5d1fab0d
3
+ metadata.gz: d76f386df8dbf4c6756841f5e298fdbf7ee76b17c42914a24a0ce2ef882a9f72
4
+ data.tar.gz: b855c7826417a4bca6aa52d9a6fd4d65f4946652ab8014ce2fd4331d8e25fdaa
5
5
  SHA512:
6
- metadata.gz: d0ccb37aef0d3b9042676d0e842fd5f2e5b78a3bd5de1e349ed7a1feaccc50e152a0e32f9abad30116028be1971e1214e9825f03e98e878dad108988be1d6315
7
- data.tar.gz: 3b15558b7f4381c08639eacd41c54da890690162c5fbb1854fcf723fd188fb8e71f29362717e1b22a4dd9a4d34a94d3ff146d81c0bb14a921376bed187b2be22
6
+ metadata.gz: 7739898e194b093f024999acae10db6fa4f53eb6a7d506cc7bae675ce910dcec6996bc4aaa6b87a9ca2168ba2f6ea0d90926e8ac137fe16d4f7f0f27089d9f11
7
+ data.tar.gz: 1075b0d9d26927ea5856769ccdc17e92297fbe8153093758e7e6dc3e4ef738945571c9667f18e9b3edc1f9b7f867c57c957414dfea52c7b8b0bbf01f58e846a6
@@ -70,7 +70,7 @@ pre.highlight {
70
70
  padding: 20px 0px;
71
71
  padding-right: 35px;
72
72
  border-radius: 4px;
73
- overflow: scroll;
73
+ overflow: auto;
74
74
  }
75
75
 
76
76
  pre.highlight > button {
data/assets/js/copy.js CHANGED
@@ -10,7 +10,29 @@ codeBlocks.forEach((block) => {
10
10
 
11
11
  copyBtn.addEventListener('click', () => {
12
12
  var code = block.querySelector('code').innerText.trim();
13
- window.navigator.clipboard.writeText(code);
13
+
14
+ if (window.isSecureContext) {
15
+ window.navigator.clipboard.writeText(code);
16
+ } else {
17
+ const textArea = document.createElement("textarea");
18
+ textArea.value = code;
19
+
20
+ // Move textarea out of the viewport so it's not visible
21
+ textArea.style.position = "absolute";
22
+ textArea.style.left = "-999999px";
23
+
24
+ document.body.prepend(textArea);
25
+ textArea.select();
26
+
27
+ try {
28
+ document.execCommand('copy');
29
+ } catch (error) {
30
+ console.error(error);
31
+ } finally {
32
+ textArea.remove();
33
+ }
34
+ }
35
+
14
36
 
15
37
  copyBtn.innerHTML = '<img src="/assets/img/check.svg" />';
16
38
  copyBtn.style.border = 'none';
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: summoner-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rory Dudley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-19 00:00:00.000000000 Z
11
+ date: 2023-07-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: