no-style-please2 0.6.3.2 → 0.7.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
  SHA256:
3
- metadata.gz: 6918d9e8fa3339aa1dce49fc2f96fa13bbb449b23dfeb44fed32956166f4b55f
4
- data.tar.gz: 484534eaae7bd974a46059cb85d43d609f58e5ef79dd67c40ce87c5dbcf429e4
3
+ metadata.gz: 50f2aea9ff2a026b709c224a1efb83777f64c2d9ab6d7fd272ad6eb563b67b31
4
+ data.tar.gz: 8dc758da0cf0ba9e21e70730b01d69e0b7e3d2a2b3d0638947e1fd6bd255dff5
5
5
  SHA512:
6
- metadata.gz: 42e865cb17fcd72438c90a6f97eeef46b20fd91a6a03053d6e2cfbf832ee31f0b73511ae8704355a685ec8158f27b41d9f8f394a7f4b308c316631cb422bf2be
7
- data.tar.gz: e776bfe44681ef6fe01681600abefad69fa42491cf05bf82dadcf8634e8053dd06374d62a37fbbe47fe2353fe42913174cd47bcf4256f3883369bc7618a1bd4d
6
+ metadata.gz: d76b6a0468a7ed61d661830f6244d3ffad413c5a3e85b15b131b13a7eb9bb8b5fb3d1102bf999de442485a66788f625505da547b8ead6ae9f55e9097fed65a14
7
+ data.tar.gz: 2bd6204aecde3c4489eaa6b6dbc6dc6ea65d5569dcc4efca54dd34d9a3b0e9351c4318891fb7c032a63b0e462f5ed51b605d7f8c755ac230ef15671580695db7
@@ -26,12 +26,9 @@
26
26
  <script src="//cdn.jsdelivr.net/gh/vitock/jsdelivr@0.1.1/js/md5.js"></script>
27
27
  <script>
28
28
  !function(){
29
-
30
- {%- capture prefix0 %} {{page.url |default: "no-style-please2" }} {% endcapture -%}
31
- {%- capture prefix %} {{prefix0 | strip }} {% endcapture -%}
32
-
33
- const preFix = "{{prefix}}"
34
- var encryptedContent = '{{ content | contentEncrypt:page, prefix}}'
29
+ const preFix = '{{encid}}';
30
+ const encid = preFix
31
+ var encryptedContent = '{{ content | encrypt_content:page, encid}}'
35
32
  const nonceStr = encryptedContent.substring(0,16);
36
33
  const msg = encryptedContent.substring(17)
37
34
 
@@ -132,15 +129,15 @@
132
129
  }
133
130
  {% else %}
134
131
  function readKey(){
135
- var key = md5(location.pathname)
132
+ var key = encid;
136
133
  return localStorage.getItem(key)
137
134
  }
138
135
  function setKey(value){
139
- var key = md5(location.pathname)
136
+ var key = encid
140
137
  return localStorage.setItem(key,value)
141
138
  }
142
139
  function clearKey() {
143
- var key = md5(location.pathname)
140
+ var key = encid
144
141
  localStorage.removeItem(key)
145
142
  }
146
143
  var cachekey = readKey()
data/_layouts/post.html CHANGED
@@ -15,8 +15,8 @@ layout: default
15
15
  <a href="{{ site.baseurl }}/tags/{{ tag_name }}.html"><text><nobr>#{{ tag_name }}</nobr></text>&nbsp;</a>
16
16
  {% endfor %}</span>
17
17
 
18
- {%- capture enc %}{{ content | encrypt_if_need:page}}{% endcapture -%}
19
- {%- if enc == '' -%}
18
+ {%- capture encid %}{{ "" | get_encrypt_id:page}}{% endcapture -%}
19
+ {%- if encid == '' -%}
20
20
  {{ content }}
21
21
  {% else %}
22
22
  {%-include encrypted.html-%}
@@ -98,5 +98,5 @@ img {
98
98
 
99
99
  a{
100
100
  text-decoration: none;
101
- color: royalblue;
101
+ // color: royalblue;
102
102
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: no-style-please2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3.2
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vitock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-21 00:00:00.000000000 Z
11
+ date: 2022-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.0
33
+ version: 0.4.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.3.0
40
+ version: 0.4.0
41
41
  description:
42
42
  email:
43
43
  - r