no-style-please2 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_config.yml +4 -2
- data/_includes/encrypted.html +25 -15
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50265dc5887dbce77e697614df742ab5e5f58edf9db5a2a1cae47b8af40f6b79
|
4
|
+
data.tar.gz: fa1561da1295e1ec5d20127f5838304870e1649eb35498cb2075a28dee39db64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9c76ebe93fa850438814503dad66f2d503ca77c29fa49044f11b7f29e7eda503d9008464de6bb40ad5dbf1ca94cc9ea0aae9358d668b2a4ee0c78faac6d2c3a
|
7
|
+
data.tar.gz: fb7c803793081f6ab2ee4824035cf3b0d5b023eea3aef3475f59bcc3fe84939eae6fb9de5187d6fbebaac3782af015a41278d09e52c95a10e361541c35213fe6
|
data/_config.yml
CHANGED
@@ -18,8 +18,10 @@ theme_config:
|
|
18
18
|
date_format: "%Y-%m-%d" # customize how date is formatted
|
19
19
|
show_description: false # show blog description in home page
|
20
20
|
encrypt_title: "Content is Encryped :)"
|
21
|
-
|
22
|
-
|
21
|
+
encrypt_clear_btn: "清空缓存密码"
|
22
|
+
decrypt_btn: 解密
|
23
|
+
encrypt_btn: 重新加密
|
24
|
+
encrypt_clear_btn: 清空密码缓存
|
23
25
|
#
|
24
26
|
# forbid_cache_password: true
|
25
27
|
|
data/_includes/encrypted.html
CHANGED
@@ -1,28 +1,21 @@
|
|
1
1
|
|
2
2
|
<div id="encrypted">
|
3
|
-
{
|
4
|
-
|
5
|
-
{% else %}
|
6
|
-
<h3>Content is Encrypted</h3>
|
7
|
-
{% endif %}
|
3
|
+
<h3> {{ site.theme_config.encrypt_title | default : 'Content is Encrypted'}} </h3>
|
4
|
+
|
8
5
|
<input style="width:100%; " type="password" id="passwordinput" placeholder="输入密码"></input>
|
9
6
|
<p>
|
10
|
-
|
11
|
-
<input type="button" value= "{{ site.theme_config.decrypt_btn }}" id="DecryptBtn"/>
|
12
|
-
{% else %}
|
13
|
-
<input type="button" value= "Decrypt" id="DecryptBtn"/>
|
14
|
-
{% endif %}
|
7
|
+
<input type="button" value= "{{ site.theme_config.decrypt_btn | default : 'Decrypt' }}" id="DecryptBtn"/>
|
15
8
|
|
16
9
|
</div>
|
17
10
|
|
18
11
|
<div id="decrypted" style = "display:none">
|
19
12
|
<p>
|
20
13
|
<div>
|
21
|
-
|
22
|
-
<input type="button" value= "{{ site.theme_config.encrypt_btn }}" id="EncryptBtn"/>
|
23
|
-
|
24
|
-
<input type="button" value= "
|
25
|
-
|
14
|
+
|
15
|
+
<input type="button" value= "{{ site.theme_config.encrypt_btn | default: 'Encrypt' }}" id="EncryptBtn"/>
|
16
|
+
|
17
|
+
<input type="button" value= "{{ site.theme_config.encrypt_clear_btn | default: 'Clear password cache' }}" id="ClearBtn"/>
|
18
|
+
|
26
19
|
</div>
|
27
20
|
<div id = 'decryptContent'>
|
28
21
|
</div>
|
@@ -91,6 +84,23 @@
|
|
91
84
|
|
92
85
|
clearKey()
|
93
86
|
}
|
87
|
+
|
88
|
+
document.getElementById("EncryptBtn").onclick = function(){
|
89
|
+
/// hide input
|
90
|
+
document.getElementById("encrypted").style.display = 'block'
|
91
|
+
// / show decrypted
|
92
|
+
document.getElementById("decrypted").style.display = "none"
|
93
|
+
|
94
|
+
clearKey()
|
95
|
+
}
|
96
|
+
|
97
|
+
document.getElementById("ClearBtn").onclick = function(){
|
98
|
+
localStorage.clear();
|
99
|
+
}
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
94
104
|
|
95
105
|
{% if site.theme_config.forbid_cache_password %}
|
96
106
|
function readKey(){
|