jekyll-theme-yat 1.0.0 → 1.0.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: 8edc986ecb82dc1de62b66687d6ce4344d9c7a7dc5c1c9f91ce7f9edc3cc0623
4
- data.tar.gz: '08865057323c3d868632efaf007b096531fe614c22a4a331da7ebfe9b63c9473'
3
+ metadata.gz: a435ef6001371fcf5562037fc2e45c466af7617b5eec3baea067254bfdec9f69
4
+ data.tar.gz: 0a31d8fe912a761ec58b519109db028304e2039a43a7588ffae5017a2b0d57e2
5
5
  SHA512:
6
- metadata.gz: b3863db5860dbf115dfb69824347343d5f5b05df981198cb1613df2ddbed1fcbe4f1bd7b72992e747cf122c3c4a89cba1f007dd9db905773d01aba4e934dc1da
7
- data.tar.gz: 2767e246bf177a36fef0081d99920c8ecb69419aec34355e6ed806ff01b77ef4c33dfc4828eeb9c7c7f308e8a0c0526fa1e36c5c2d095fc81aa7928948db2278
6
+ metadata.gz: bf0168e62b3a505dcd3a727f8391c3b82652c501a63a6ef16644b39b4f3f31598d0fb29b236a7e24243ed7bf3c64954e4fd83dce5874009037b8456c09b3cbba
7
+ data.tar.gz: 15798054a9ce741f8efec0980cd14de59ced3e9e01c0663fee9bf058680838b75b0f76a73a6f9579f96147bc53ba86a647d81bd50185f0e0064c264975882dfd
@@ -1,12 +1,19 @@
1
1
  <script>
2
- if(!(window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1")) {
3
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
4
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
5
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
6
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
2
+ function initGoogleAnalytics() {
3
+ var doNotTrack = (window.doNotTrack === "1" || navigator.doNotTrack === "1" ||
4
+ navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1");
5
+ var enableDNT = "{{ site.enableDNT | default: true }}" == "true";
7
6
 
8
- ga('create', '{{ site.google_analytics }}', 'auto');
9
- ga('send', 'pageview');
10
- }
7
+ if (!enableDNT || !doNotTrack) {
8
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
9
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
10
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
11
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
12
+
13
+ ga('create', '{{ site.google_analytics }}', 'auto');
14
+ ga('send', 'pageview');
15
+ }
16
+ }
17
+ initGoogleAnalytics();
11
18
  </script>
12
-
19
+
data/_includes/head.html CHANGED
@@ -11,6 +11,6 @@
11
11
  <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
12
12
  {%- feed_meta -%}
13
13
  {%- if jekyll.environment == 'production' and site.google_analytics -%}
14
- {%- include google-analytics.html -%}
14
+ {%- include extensions/google-analytics.html -%}
15
15
  {%- endif -%}
16
16
  </head>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-yat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jeffreytse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-13 00:00:00.000000000 Z
11
+ date: 2019-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler