j1-template 2022.0.13 → 2022.0.14

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: 4f1cafe13f11508c2bba1a30585af76cd2cf2ed917c746dfcdf12f646792b981
4
- data.tar.gz: 06c239b5297206fde2f28b3f21046712a2f7beca6c8e8111583e2d50339aee0c
3
+ metadata.gz: 8b82f66a38e834f8d58482cd5b873f110de6474e2e0af3a644721b9b55cbbbaf
4
+ data.tar.gz: 9a611fe54f09585e29a1a355b4ff630d391cc627b86c5e15498244f276e152b4
5
5
  SHA512:
6
- metadata.gz: 3ece2178ed2e520a8d842411b9000ba5b95f3fe8f2c57aa97b0c568eddde3f5df6ab6533cead28d1ecb4ad560d11d2a5808ce8c6f4e5c1d6caf391811ea18b87
7
- data.tar.gz: 3e5b29d8ee062cfc81dacccd6f74db3180878fbe3d22f41060256f4275b66c5dc640a500a8a2128663591fb5aed72fa3a1ab2b86c9ebec361518bc6649a78784
6
+ metadata.gz: 2fcefcb4ef9cf86a75550e6155e6ad2607e5b11d8ac693bcd338a932c2ae964b15444b4c19b3803a6d0cc2d1676b979557c834678f7b44f71054ebfd80d57d43
7
+ data.tar.gz: 0bfed9014849a89820b08932378689492530212dcae7588530389f8bcd1f2af1bb75f2a56e6b3f89d730137e9edd218d43698743f64ae2295e2264e43cd61ae9
@@ -111,11 +111,6 @@ var _this;
111
111
  var logger;
112
112
  var logText;
113
113
 
114
- // var domain;
115
- // var domainAttribute;
116
- // var cookie_option_domain;
117
- // var cookie_domain;
118
-
119
114
  // ---------------------------------------------------------------------------
120
115
  // Main object
121
116
  // ---------------------------------------------------------------------------
@@ -147,16 +142,6 @@ var logText;
147
142
  url = new liteURL(window.location.href);
148
143
  hostname = url.hostname;
149
144
 
150
- // domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
151
- // cookie_option_domain = '{{cookie_options.domain}}';
152
-
153
- // // set domain used by cookies
154
- // if (cookie_option_domain == 'auto') {
155
- // domainAttribute = domain ;
156
- // } else {
157
- // domainAttribute = hostname;
158
- // }
159
-
160
145
  {% case advertising_provider %}
161
146
  {% when "google" %}
162
147
  // [INFO ] [j1.adapter.advertising ] [ place provider: Google Adsense ]
@@ -176,7 +161,7 @@ var logText;
176
161
  advertisingProvider = 'Google Adsense';
177
162
  validProviderID = (providerID.includes('your')) ? false : true;
178
163
  if (!validProviderID) {
179
- logger.warn('\n' + 'invalid publisherID detected for Google Adsense: ' + providerID);
164
+ logger.warn('\n' + 'invalid publisherID detected for Google Adsense (GAS): ' + providerID);
180
165
  logger.info('\n' + 'skip initialization for provider: ' + advertisingProvider);
181
166
  clearInterval(dependencies_met_page_ready);
182
167
  return false;
@@ -190,22 +175,22 @@ var logText;
190
175
 
191
176
  // add gad api dynamically in the head section
192
177
  // -----------------------------------------------------------------
193
- logger.info('\n' + 'add gad api dynamically in section: head');
178
+ logger.info('\n' + 'add gas api in section: head');
194
179
  gadScript.async = true;
195
- gadScript.id = 'gad-api';
180
+ gadScript.id = 'gas-api';
196
181
  gadScript.src = '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
197
182
  gadScript.setAttribute('data-ad-client', 'ca-pub-3885670015316130');
198
183
  document.head.appendChild(gadScript);
199
184
 
200
185
  // setup monitor for state changes on all ads configured
201
186
  // ---------------------------------------------------------------
202
- logger.info('\n' + 'setup monitoring');
187
+ logger.debug('\n' + 'setup monitoring');
203
188
  _this.monitor_ads();
204
189
 
205
190
  // run protection check
206
191
  // -------------------------------------------------------------------
207
192
  if (checkTrackingProtection) {
208
- logger.info('\n' + 'run checks for tracking protection');
193
+ logger.debug('\n' + 'run checks for tracking protection');
209
194
  _this.check_tracking_protection();
210
195
 
211
196
  var dependencies_met_tracking_check_ready = setInterval (function (options) {
@@ -300,20 +285,27 @@ var logText;
300
285
  // -------------------------------------------------------------------------
301
286
  // monitor_ads()
302
287
  // monitor for state changes on the ad placed in pages (if any)
288
+ //
289
+ // NOTE: Check visibility state of the adSlot to prevent multiple
290
+ // processing of the same slot
303
291
  // -------------------------------------------------------------------------
304
292
  monitor_ads: function () {
293
+ var logger = log4javascript.getLogger('j1.adapter.advertising.monitor.ads');
305
294
 
306
295
  $('.adsbygoogle').attrchange({
307
296
  trackValues: true,
308
297
  callback: function (event) {
309
298
  if (event.newValue === 'unfilled') {
310
- var elm = event.target.dataset;
311
- if (addBorderOnUnfilled) { $('.adsbygoogle').addClass('border--dotted'); }
312
- if (elm.adClient) {
313
- logger.warn('\n' + 'found ad state ' + event.newValue + ' for slot: ' + elm.adSlot);
314
- if (autoHideOnUnfilled) {
315
- logger.warn('\n' + ' hide ad for slot: ' + elm.adSlot);
316
- $('#' + elm.adSlot ).hide();
299
+ var elm = event.target.dataset;
300
+ var adSlotIsVisible = $('#' + elm.adSlot ).is(":visible");
301
+ if (adSlotIsVisible) {
302
+ if (addBorderOnUnfilled) { $('.adsbygoogle').addClass('border--dotted'); }
303
+ if (elm.adClient) {
304
+ logger.warn('\n' + 'found ad state ' + event.newValue + ' for slot: ' + elm.adSlot);
305
+ if (autoHideOnUnfilled) {
306
+ logger.warn('\n' + ' hide ad for slot: ' + elm.adSlot);
307
+ $('#' + elm.adSlot ).hide();
308
+ }
317
309
  }
318
310
  }
319
311
  }
@@ -334,7 +326,7 @@ var logText;
334
326
  // https://stackoverflow.com/questions/33959324/how-to-detect-if-a-user-is-using-tracking-protection-in-firefox-42
335
327
  // -------------------------------------------------------------------------
336
328
  check_tracking_protection: function () {
337
- var logger = log4javascript.getLogger('j1.adapter.advertising.tracking.monitor');
329
+ var logger = log4javascript.getLogger('j1.adapter.advertising.monitor.tracking');
338
330
 
339
331
  logText = '\n' + 'check for trackingprotection';
340
332
  logger.info(logText);
@@ -192,8 +192,9 @@ j1.adapter.cookieConsent = (function (j1, window) {
192
192
  }
193
193
  }
194
194
 
195
- // Failsafe: if 'None' is given for samesite in non-secure environments
196
- // -----------------------------------------------------------------------
195
+ // Failsafe: if 'None' is given for samesite in non-secure
196
+ // environments open access to cookies to subdomains
197
+ // ---------------------------------------------------------------------
197
198
  if (same_site == 'None' && !secure) {
198
199
  same_site = 'Lax';
199
200
  }
@@ -273,7 +273,6 @@ var j1 = (function () {
273
273
  var timestamp_now = date.toISOString();
274
274
  var curr_state = 'started';
275
275
  var gaCookies = j1.findCookie('_ga');
276
- var j1Cookies = j1.findCookie('j1');
277
276
  var themerOptions = $.extend({}, {{themer_options | replace: '=>', ':' | replace: 'nil', '""' }});
278
277
 
279
278
  // -----------------------------------------------------------------------
@@ -346,17 +345,6 @@ var j1 = (function () {
346
345
  expires: 365
347
346
  });
348
347
 
349
- // jadams, 2021-12-06: Check if access to cookies for this site failed.
350
- // Possibly, a third-party domain or an attacker tries to access it.
351
- if (checkCookies) {
352
- if (!user_state) {
353
- logger.error('\n' + 'Access to cookie failed or cookie not found: ' + cookie_names.user_state);
354
- logger.debug('\n' + 'j1 cookies found:' + j1Cookies.length);
355
- // redirect to error page: blocked content
356
- window.location.href = '/446.html';
357
- }
358
- }
359
-
360
348
  if (!user_consent.analysis || !user_consent.personalization) {
361
349
  if (expireCookiesOnRequiredOnly) {
362
350
  // expire permanent cookies to session
@@ -902,6 +890,20 @@ var j1 = (function () {
902
890
  // display page
903
891
  $('#no_flicker').css('display', 'block');
904
892
 
893
+ // jadams, 2021-12-06: Check if access to cookies for this site failed.
894
+ // Possibly, a third-party domain or an attacker tries to access it.
895
+ if (checkCookies) {
896
+ var j1Cookies = j1.findCookie('j1');
897
+ if (!j1.existsCookie(cookie_names.user_state)) {
898
+ logger.error('\n' + 'Access to cookie failed or cookie not found: ' + cookie_names.user_state);
899
+ logger.info('\n' + 'j1 cookies found:' + j1Cookies.length);
900
+ // redirect to error page: blocked content
901
+ window.location.href = '/446.html';
902
+ } else {
903
+ logger.info('\n' + 'j1 cookies found:' + j1Cookies.length);
904
+ }
905
+ }
906
+
905
907
  // manage Dropcaps if translation is enabled|disabled
906
908
  // -----------------------------------------------------------------
907
909
  if (user_translate.translationEnabled) {
@@ -1008,6 +1010,20 @@ var j1 = (function () {
1008
1010
  // display the page loaded
1009
1011
  $('#no_flicker').css('display', 'block');
1010
1012
 
1013
+ // jadams, 2021-12-06: Check if access to cookies for this site failed.
1014
+ // Possibly, a third-party domain or an attacker tries to access it.
1015
+ if (checkCookies) {
1016
+ var j1Cookies = j1.findCookie('j1');
1017
+ if (!j1.existsCookie(cookie_names.user_state)) {
1018
+ logger.error('\n' + 'Access to cookie failed or cookie not found: ' + cookie_names.user_state);
1019
+ logger.info('\n' + 'j1 cookies found:' + j1Cookies.length);
1020
+ // redirect to error page: blocked content
1021
+ window.location.href = '/446.html';
1022
+ } else {
1023
+ logger.info('\n' + 'j1 cookies found:' + j1Cookies.length);
1024
+ }
1025
+ }
1026
+
1011
1027
  // jadams, 2021-11-19: test code for 'tapTarget' of 'materializeCss'
1012
1028
  // See:
1013
1029
  // https://stackoverflow.com/questions/49422111/opening-tap-target-in-materialize-css-for-2-seconds
data/lib/j1/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module J1
2
- VERSION = '2022.0.13'
2
+ VERSION = '2022.0.14'
3
3
  end
@@ -53,7 +53,7 @@ gem 'jekyll', '~> 4.2'
53
53
 
54
54
  # Theme Rubies, default: J1 Template (NOT used for the development system)
55
55
  #
56
- gem 'j1-template', '~> 2022.0.13'
56
+ gem 'j1-template', '~> 2022.0.14'
57
57
 
58
58
  # ------------------------------------------------------------------------------
59
59
  # PRODUCTION: Gem needed for the Jekyll and J1 prod environment
@@ -53,7 +53,7 @@ environment: development
53
53
  # ------------------------------------------------------------------------------
54
54
  # Sets the build version of J1 Template Gem
55
55
  #
56
- version: 2022.0.13
56
+ version: 2022.0.14
57
57
 
58
58
  # version
59
59
  # ------------------------------------------------------------------------------
@@ -32,14 +32,6 @@ settings:
32
32
  # ----------------------------------------------------------------------------
33
33
  # Settings
34
34
  #
35
- # enabled
36
- # --------------------------------------------------------------------------
37
- # Enables or disables the Ad services. If disabled, no ads services are
38
- # enabled and no unit container get initialized on any page.
39
- #
40
- # values: [true|false]
41
- # default: false
42
- #
43
35
  # provider
44
36
  # --------------------------------------------------------------------------
45
37
  # Currently, only Google adsense (google) is available as an provider
@@ -50,8 +42,6 @@ settings:
50
42
  #
51
43
  # ----------------------------------------------------------------------------
52
44
  #
53
- enabled: false
54
-
55
45
  google:
56
46
 
57
47
  # --------------------------------------------------------------------------
@@ -26,5 +26,10 @@ description:
26
26
  settings:
27
27
  enabled: true
28
28
 
29
+ # ----------------------------------------------------------------------------
30
+ # Switches
31
+ # ----------------------------------------------------------------------------
32
+ checkCookies: true
33
+
29
34
  # ------------------------------------------------------------------------------
30
35
  # END config
@@ -34,11 +34,12 @@ defaults:
34
34
  #
35
35
  # enabled
36
36
  # --------------------------------------------------------------------------
37
- # Enables or disables the Ad services. If disabled, no ads services are
38
- # enabled and no unit container get initialized on any page.
37
+ # Enables or disables the Ad services. If disabled, ad services is NOT
38
+ # initialized and no unit container get initialized on any page even the
39
+ # module is loaded.
39
40
  #
40
41
  # values: [true|false]
41
- # default: false
42
+ # default: true
42
43
  #
43
44
  # provider
44
45
  # --------------------------------------------------------------------------
@@ -50,13 +51,12 @@ defaults:
50
51
  #
51
52
  # ----------------------------------------------------------------------------
52
53
  #
53
- enabled: false
54
-
54
+ enabled: true
55
55
  provider: google
56
- google:
57
56
 
57
+ google:
58
58
  # --------------------------------------------------------------------------
59
- # Provider settings
59
+ # Provider settings (Google)
60
60
  #
61
61
  # publisherID
62
62
  # ------------------------------------------------------------------------
@@ -35,15 +35,17 @@ defaults:
35
35
  #
36
36
  # checkCookies
37
37
  # --------------------------------------------------------------------------
38
- # Check if cookies are created and available to the browser. If the cookie
39
- # attributes does NOT allow to create and|or access on cookies,
40
- # setting-up a page will fail. It is recommended to enable checks on
41
- # cookies to issue an error page (HTML 445) if access on cookies has
42
- # failed for some reason. This will prevent severe failures and|or endless
43
- # loops accessing a page on missing cookies or invalid cookie settings.
38
+ # Check if cookies are created and available to the browser. If the
39
+ # cookie attributes does NOT allow to create and|or access on cookies,
40
+ # setting-up a page will fail.
41
+ # For testing sites deplayed on the Internet, it is recommended to enable
42
+ # checks on cookies to issue an error page (HTML 445) if access on cookies
43
+ # has failed for some reason. This will prevent severe failures and|or
44
+ # endless loops accessing a page on missing cookies or invalid cookie
45
+ # settings.
44
46
  #
45
47
  # values: [false|true]
46
- # default: true
48
+ # default: false
47
49
  #
48
50
  # encryptCookiesOnHttp (currently NOT supported)
49
51
  # --------------------------------------------------------------------------
@@ -95,7 +97,7 @@ defaults:
95
97
  #
96
98
  # ----------------------------------------------------------------------------
97
99
  #
98
- checkCookies: true
100
+ checkCookies: false
99
101
  encryptCookiesOnHttp: false
100
102
  expireCookiesOnRequiredOnly: true
101
103
 
@@ -437,7 +437,7 @@ end::tables[]
437
437
  // -----------------------------------------------------------------------------
438
438
  tag::products[]
439
439
  :j1--license: MIT License
440
- :j1--version: 2022.0.13
440
+ :j1--version: 2022.0.14
441
441
  :j1--site-name: Jekyll One
442
442
  end::products[]
443
443
 
@@ -364,6 +364,6 @@ end
364
364
 
365
365
  module Jekyll
366
366
  module J1LunrSearch
367
- VERSION = '2022.0.13'
367
+ VERSION = '2022.0.14'
368
368
  end
369
369
  end
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "j1_starter",
4
- "version": "2022.0.13",
4
+ "version": "2022.0.14",
5
5
  "description": "J1 Template Starter Web",
6
6
  "homepage": "https://your.site",
7
7
  "author": {
@@ -21,7 +21,7 @@ robots:
21
21
  permalink: /pages/public/skeleton/documentation/000_intro/
22
22
  regenerate: false
23
23
 
24
- resources: []
24
+ resources: [ animate, clipboard, lightbox, rouge ]
25
25
  resource_options:
26
26
  - toccer:
27
27
  collapseDepth: 4
@@ -10,7 +10,7 @@ tags: [ Asciidoctor, PDF, Converter ]
10
10
  permalink: /pages/public/skeleton/documentation/100_converter/
11
11
  regenerate: false
12
12
 
13
- resources: [ animate, lightbox, clipboard, rouge ]
13
+ resources: [ animate, clipboard, lightbox, rouge ]
14
14
  resource_options:
15
15
  - toccer:
16
16
  collapseDepth: 2
@@ -9,7 +9,7 @@ tags: [ Asciidoctor, PDF, Converter ]
9
9
  permalink: /pages/public/skeleton/documentation/200_themes/
10
10
  regenerate: false
11
11
 
12
- resources: [ animate, lightbox, clipboard, rouge ]
12
+ resources: [ animate, clipboard, lightbox, rouge ]
13
13
  resource_options:
14
14
  - toccer:
15
15
  collapseDepth: 2
@@ -14,9 +14,6 @@ description: >
14
14
  categories: [ Knowledge ]
15
15
  tags: [ Asciidoc, Skeleton, Documentation, PDF ]
16
16
 
17
- sitemap: false
18
- comments: false
19
-
20
17
  robots:
21
18
  index: false
22
19
  follow: false
@@ -24,7 +21,7 @@ robots:
24
21
  permalink: /pages/public/skeleton/documentation/
25
22
  regenerate: false
26
23
 
27
- resources: [ clipboard, lightbox, rouge, animate ]
24
+ resources: [ animate, clipboard, lightbox, rouge ]
28
25
  resource_options:
29
26
  - toccer:
30
27
  collapseDepth: 4
@@ -12,9 +12,6 @@ description: >
12
12
  categories: [ Knowledge ]
13
13
  tags: [ Asciidoc, Skeleton, Document ]
14
14
 
15
- sitemap: false
16
- comments: false
17
-
18
15
  robots:
19
16
  index: false
20
17
  follow: false
@@ -22,7 +19,7 @@ robots:
22
19
  permalink: /pages/public/skeleton/multi/
23
20
  regenerate: false
24
21
 
25
- resources: [ lightbox, clipboard, rouge, animate ]
22
+ resources: [ animate, clipboard, lightbox, rouge ]
26
23
  resource_options:
27
24
  - toccer:
28
25
  collapseDepth: 4
@@ -11,9 +11,6 @@ description: >
11
11
  categories: [ Knowledge ]
12
12
  tags: [ Asciidoc, Skeleton, Document ]
13
13
 
14
- sitemap: false
15
- comments: false
16
-
17
14
  robots:
18
15
  index: false
19
16
  follow: false
@@ -21,7 +18,7 @@ robots:
21
18
  permalink: /pages/public/skeleton/simple/
22
19
  regenerate: false
23
20
 
24
- resources: [ clipboard, rouge, animate ]
21
+ resources: [ animate, clipboard, lightbox, rouge ]
25
22
  resource_options:
26
23
  - toccer:
27
24
  collapseDepth: 4
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "utls",
4
- "version": "2022.0.13",
4
+ "version": "2022.0.14",
5
5
  "description": "J1 Template Utility Server",
6
6
  "homepage": "https://jekyll.one",
7
7
  "author": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "utls",
4
- "version": "2022.0.13",
4
+ "version": "2022.0.14",
5
5
  "description": "J1 Template Utility Server",
6
6
  "homepage": "https://jekyll.one",
7
7
  "author": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: j1-template
3
3
  version: !ruby/object:Gem::Version
4
- version: 2022.0.13
4
+ version: 2022.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - juergen_jekyll_one
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-25 00:00:00.000000000 Z
11
+ date: 2021-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll