j1-template 2022.0.6 → 2022.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/themes/j1/modules/ads/google_ad_content_home.html +11 -0
- data/_includes/themes/j1/modules/ads/google_ad_top_home.html +11 -0
- data/_layouts/default.html +0 -57
- data/apps/public/cc/index.adoc +0 -1
- data/assets/data/article_navigator/index.html +0 -1
- data/assets/data/news_panel_posts/index.html +0 -1
- data/assets/error_pages/HTTP444.html +4 -4
- data/assets/error_pages/HTTP445.html +7 -6
- data/assets/error_pages/HTTP446.html +110 -0
- data/assets/error_pages/HTTP447.html +110 -0
- data/assets/error_pages/HTTP448.html +111 -0
- data/assets/themes/j1/adapter/js/advertising.js +416 -0
- data/assets/themes/j1/adapter/js/cookieConsent.js +72 -37
- data/assets/themes/j1/adapter/js/framer.js +0 -3
- data/assets/themes/j1/adapter/js/j1.js +120 -212
- data/assets/themes/j1/adapter/js/rouge.js +1 -1
- data/assets/themes/j1/adapter/js/scroller.js +1 -1
- data/assets/themes/j1/adapter/js/themer.js +0 -1
- data/assets/themes/j1/adapter/js/translator.js +147 -98
- data/assets/themes/j1/core/css/themes/unodark/bootstrap.css +6 -0
- data/assets/themes/j1/core/css/themes/unodark/bootstrap.min.css +1 -1
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +6 -0
- data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
- data/assets/themes/j1/modules/advertising/js/google/adInitializer.js +117 -0
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.js +29 -13
- data/assets/themes/j1/modules/cookieConsent/js/cookieConsent.min.js +1 -1
- data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.2.js +1 -1
- data/assets/themes/j1/modules/deeplAPI/js/deeplAPI.js +1 -1
- data/assets/themes/j1/modules/scroller/js/scroller.js +1 -1
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.js +0 -1
- data/assets/themes/j1/modules/themeSwitcher/js/switcher.min.js +1 -1
- data/assets/themes/j1/modules/translator/js/translator.js +98 -63
- data/assets/themes/j1/modules/translator/js/translator.min.js +1 -1
- data/lib/j1/version.rb +3 -3
- data/lib/starter_web/Gemfile +1 -1
- data/lib/starter_web/_config.yml +2 -7
- data/lib/starter_web/_data/layouts/default.yml +7 -7
- data/lib/starter_web/_data/layouts/home.yml +24 -0
- data/lib/starter_web/_data/modules/advertising.yml +137 -10
- data/lib/starter_web/_data/modules/cookies.yml +30 -0
- data/lib/starter_web/_data/modules/defaults/advertising.yml +105 -0
- data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +3 -3
- data/lib/starter_web/_data/modules/defaults/cookies.yml +112 -0
- data/lib/starter_web/_data/modules/navigator_menu.yml +10 -1
- data/lib/starter_web/_data/resources.yml +24 -0
- data/lib/starter_web/_includes/attributes.asciidoc +6 -1
- data/lib/starter_web/_includes/themes/j1/modules/ads/google_ad_content_home.html +11 -0
- data/lib/starter_web/_includes/themes/j1/modules/ads/google_ad_top_home.html +11 -0
- data/lib/starter_web/_plugins/lunr_index.rb +1 -1
- data/lib/starter_web/index.html +0 -1
- data/lib/starter_web/package.json +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/100_converter.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/200_themes.adoc +1 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +0 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +0 -1
- data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +0 -1
- data/lib/starter_web/pages/public/blog/navigator/archive/categoryview.html +1 -2
- data/lib/starter_web/pages/public/blog/navigator/archive/dateview.html +1 -2
- data/lib/starter_web/pages/public/blog/navigator/archive/tagview.html +1 -2
- data/lib/starter_web/pages/public/blog/navigator/archive.html +1 -2
- data/lib/starter_web/pages/public/blog/navigator/index.html +1 -2
- data/lib/starter_web/pages/public/learn/quickstart.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.adoc +4 -3
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.ads.asciidoc +265 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_images.no_ads.asciidoc +237 -0
- data/lib/starter_web/pages/public/learn/roundtrip/100_present_videos.adoc +64 -2
- data/lib/starter_web/pages/public/learn/roundtrip/200_typography.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/300_icon_fonts.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/400_asciidoc_extensions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/410_bs_modals_extentions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/420_responsive_tables_extensions.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/500_themes.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/600_quicksearch.adoc +1 -1
- data/lib/starter_web/pages/public/learn/roundtrip/_includes/google-ad.js +130 -0
- data/lib/starter_web/pages/public/legal/de/300_privacy.adoc +2 -12
- data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +0 -1
- data/lib/starter_web/pages/public/legal/en/200_impress.adoc +0 -1
- data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +2 -12
- data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +0 -1
- data/lib/starter_web/pages/public/manuals/dropdown-help.adoc +1 -1
- data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +1 -1
- data/lib/starter_web/pages/public/previewer/preview_bootstrap_theme.adoc +1 -1
- data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
- data/lib/starter_web/utilsrv/package.json +1 -1
- metadata +17 -47
- data/_includes/themes/j1/modules/connectors/ad/custom-provider.html +0 -30
- data/_includes/themes/j1/modules/connectors/ad/google-adsense.html +0 -62
- data/_includes/themes/j1/modules/connectors/ads +0 -56
- data/lib/starter_web/pages/_test_pages/100_side-bar-tester.adoc +0 -244
- data/lib/starter_web/pages/_test_pages/_includes/attributes.asciidoc +0 -110
- data/lib/starter_web/pages/_test_pages/_includes/documents/100_gistblock.asciidoc +0 -28
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_bottom_info.asciidoc +0 -14
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_bottom_left_warning.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_bottom_right_danger.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_central_success.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_full_height_left_info.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_full_height_right_success.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_table_bs_modal_examples.asciidoc +0 -47
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_top_info.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_top_left_info.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/410_top_right_success.asciidoc +0 -11
- data/lib/starter_web/pages/_test_pages/_includes/documents/419_advanced_modals_demo.asciidoc +0 -337
- data/lib/starter_web/pages/_test_pages/_includes/documents/tables/bs_modal_examples.asciidoc +0 -47
- data/lib/starter_web/pages/_test_pages/accordion-01-tester.adoc +0 -220
- data/lib/starter_web/pages/_test_pages/accordion-02-tester.adoc +0 -177
- data/lib/starter_web/pages/_test_pages/accordion-03-tester.adoc +0 -148
- data/lib/starter_web/pages/_test_pages/attribute-changes-01-tester.adoc +0 -226
- data/lib/starter_web/pages/_test_pages/backdrop-tester.adoc +0 -109
- data/lib/starter_web/pages/_test_pages/button-tester-1.adoc +0 -127
- data/lib/starter_web/pages/_test_pages/card-tester.adoc +0 -128
- data/lib/starter_web/pages/_test_pages/cookieConsent.adoc +0 -96
- data/lib/starter_web/pages/_test_pages/deepl.0.adoc +0 -258
- data/lib/starter_web/pages/_test_pages/deepl.adoc +0 -204
- data/lib/starter_web/pages/_test_pages/desandro-button.adoc +0 -171
- data/lib/starter_web/pages/_test_pages/desandro.adoc +0 -147
- data/lib/starter_web/pages/_test_pages/flipcard-1-tester.adoc +0 -308
- data/lib/starter_web/pages/_test_pages/formular-01-tester.adoc +0 -167
- data/lib/starter_web/pages/_test_pages/formular-02-tester.adoc +0 -727
- data/lib/starter_web/pages/_test_pages/google-translate-tester.0.adoc +0 -113
- data/lib/starter_web/pages/_test_pages/google-translate-tester.1.adoc +0 -233
- data/lib/starter_web/pages/_test_pages/google-translate-tester.3.adoc +0 -149
- data/lib/starter_web/pages/_test_pages/google-translate-tester.4.adoc +0 -239
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester-2.adoc +0 -183
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester-3.adoc +0 -235
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester-4.adoc +0 -222
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester-5.adoc +0 -119
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester.1.adoc +0 -236
- data/lib/starter_web/pages/_test_pages/infinite-scroll-tester.adoc +0 -225
- data/lib/starter_web/pages/_test_pages/list-group-tester.adoc +0 -265
- data/lib/starter_web/pages/_test_pages/tictok.adoc +0 -127
@@ -35,6 +35,9 @@ regenerate: true
|
|
35
35
|
|
36
36
|
{% comment %} Set config data
|
37
37
|
-------------------------------------------------------------------------------- {% endcomment %}
|
38
|
+
{% assign cookie_defaults = modules.defaults.cookies.defaults %}
|
39
|
+
{% assign cookie_settings = modules.cookies.settings %}
|
40
|
+
|
38
41
|
{% assign translator_defaults = modules.defaults.translator.defaults %}
|
39
42
|
{% assign translator_settings = modules.translator.settings %}
|
40
43
|
{% assign tracking_enabled = template_config.analytics.enabled %}
|
@@ -42,6 +45,7 @@ regenerate: true
|
|
42
45
|
{% comment %} Set config options
|
43
46
|
-------------------------------------------------------------------------------- {% endcomment %}
|
44
47
|
{% assign translator_options = translator_defaults | merge: translator_settings %}
|
48
|
+
{% assign cookie_options = cookie_defaults | merge: cookie_settings %}
|
45
49
|
|
46
50
|
{% assign production = false %}
|
47
51
|
{% if environment == 'prod' or environment == 'production' %}
|
@@ -94,7 +98,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
94
98
|
var baseUrl;
|
95
99
|
var hostname;
|
96
100
|
var domain;
|
97
|
-
var
|
101
|
+
var cookie_option_domain;
|
98
102
|
var secure;
|
99
103
|
var logText;
|
100
104
|
var cookie_written;
|
@@ -104,6 +108,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
104
108
|
var head;
|
105
109
|
var script;
|
106
110
|
var languageList;
|
111
|
+
var domainAttribute;
|
107
112
|
|
108
113
|
// ---------------------------------------------------------------------------
|
109
114
|
// helper functions
|
@@ -111,43 +116,58 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
111
116
|
|
112
117
|
// ---------------------------------------------------------------------------
|
113
118
|
// setCookie()
|
114
|
-
// writes a
|
119
|
+
// writes a FLAT cookie (not using an encoded JSON string)
|
115
120
|
// ---------------------------------------------------------------------------
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
121
|
+
// function setCookie(options /*cName, cValue, expDays*/) {
|
122
|
+
// var date = new Date();
|
123
|
+
// var timestamp_now = date.toISOString()
|
124
|
+
// var url = new liteURL(window.location.href);
|
125
|
+
// var baseUrl = url.origin;;
|
126
|
+
// var hostname = url.hostname;
|
127
|
+
// var domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
128
|
+
// var domain_enabled = '{{cookie_options.domain}}';
|
129
|
+
// var defaults = {};
|
130
|
+
// var settings;
|
131
|
+
// var document_cookie;
|
132
|
+
// var stringifiedAttributes = '';
|
133
|
+
//
|
134
|
+
// defaults = {
|
135
|
+
// name: '',
|
136
|
+
// path: '/',
|
137
|
+
// expires: 0,
|
138
|
+
// domain: true,
|
139
|
+
// samesite: 'Lax',
|
140
|
+
// http_only: false,
|
141
|
+
// secure: false
|
142
|
+
// };
|
143
|
+
// settings = $.extend(defaults, options);
|
144
|
+
//
|
145
|
+
// stringifiedAttributes += '; ' + 'path=' + settings.path;
|
146
|
+
//
|
147
|
+
// if (settings.expires > 0) {
|
148
|
+
// date.setTime(date.getTime() + (settings.expires * 24 * 60 * 60 * 1000));
|
149
|
+
// stringifiedAttributes += '; ' + 'expires=' + date.toUTCString();
|
150
|
+
// }
|
151
|
+
//
|
152
|
+
// if (domain != hostname) {
|
153
|
+
// // settings.domain = domain_enabled ? '.' + domain : hostname;
|
154
|
+
// settings.domain = domain_enabled ? domain : hostname;
|
155
|
+
// } else {
|
156
|
+
// settings.domain = hostname;
|
157
|
+
// }
|
158
|
+
// stringifiedAttributes += '; ' + 'domain=' + settings.domain;
|
159
|
+
//
|
160
|
+
// stringifiedAttributes += '; ' + 'SameSite=' + settings.samesite;
|
161
|
+
//
|
162
|
+
// if (settings.secure) {
|
163
|
+
// stringifiedAttributes += '; ' + 'secure=' + settings.secure;
|
164
|
+
// }
|
165
|
+
//
|
166
|
+
// // document_cookie = settings.name + '=' + settings.data + '; path=' + settings.path + '; ' + 'domain=' + settings.domain + '; ' + 'SameSite=' + settings.samesite + ';';
|
167
|
+
// document_cookie = settings.name + '=' + settings.data + stringifiedAttributes;
|
168
|
+
//
|
169
|
+
// document.cookie = document_cookie;
|
170
|
+
// };
|
151
171
|
|
152
172
|
// ---------------------------------------------------------------------------
|
153
173
|
// Main object
|
@@ -168,7 +188,6 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
168
188
|
baseUrl = url.origin;
|
169
189
|
hostname = url.hostname;
|
170
190
|
domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
171
|
-
cookie_domain = (domain.includes('.')) ? '.' + domain : domain;
|
172
191
|
secure = (url.protocol.includes('https')) ? true : false;
|
173
192
|
navigator_language = navigator.language || navigator.userLanguage; // userLanguage for MS IE compatibility
|
174
193
|
translation_language = navigator_language.split('-')[0];
|
@@ -188,23 +207,8 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
188
207
|
'translationLanguage': translation_language,
|
189
208
|
};
|
190
209
|
|
191
|
-
// load|initialize user translate cookie
|
192
|
-
if (j1.existsCookie(cookie_names.user_translate)) {
|
193
|
-
user_translate = j1.readCookie(cookie_names.user_translate);
|
194
|
-
} else {
|
195
|
-
logger.debug('\n' + 'write to cookie : ' + cookie_names.user_translate);
|
196
|
-
cookie_written = j1.writeCookie({
|
197
|
-
name: cookie_names.user_translate,
|
198
|
-
data: user_translate,
|
199
|
-
samesite: 'Strict',
|
200
|
-
secure: secure,
|
201
|
-
expires: 365
|
202
|
-
});
|
203
|
-
}
|
204
|
-
|
205
210
|
// initialize state flag
|
206
211
|
_this.state = 'pending';
|
207
|
-
// _this.settings.languageList = '/assets/data/ms_select.json';
|
208
212
|
|
209
213
|
// -----------------------------------------------------------------------
|
210
214
|
// Default module settings
|
@@ -229,13 +233,38 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
229
233
|
// initializer
|
230
234
|
// -----------------------------------------------------------------------
|
231
235
|
var dependencies_met_page_ready = setInterval (function (options) {
|
232
|
-
|
236
|
+
var expires = '{{cookie_options.expires}}';
|
237
|
+
var same_site = '{{cookie_options.same_site}}';
|
238
|
+
var option_domain = '{{cookie_options.domain}}';
|
239
|
+
|
240
|
+
user_consent = j1.readCookie(cookie_names.user_consent);
|
241
|
+
|
242
|
+
// set domain used by cookies
|
243
|
+
if (option_domain == 'auto') {
|
244
|
+
domainAttribute = domain ;
|
245
|
+
} else {
|
246
|
+
domainAttribute = '';
|
247
|
+
}
|
233
248
|
|
234
249
|
if ( j1.getState() === 'finished' ) {
|
235
250
|
_this.setState('started');
|
236
251
|
logger.info('\n' + 'state: ' + _this.getState());
|
237
252
|
logger.info('\n' + 'module is being initialized');
|
238
253
|
|
254
|
+
// load|initialize user translate cookie
|
255
|
+
if (j1.existsCookie(cookie_names.user_translate)) {
|
256
|
+
user_translate = j1.readCookie(cookie_names.user_translate);
|
257
|
+
} else {
|
258
|
+
logger.debug('\n' + 'write to cookie : ' + cookie_names.user_translate);
|
259
|
+
cookie_written = j1.writeCookie({
|
260
|
+
name: cookie_names.user_translate,
|
261
|
+
data: user_translate,
|
262
|
+
samesite: same_site,
|
263
|
+
secure: secure,
|
264
|
+
expires: expires
|
265
|
+
});
|
266
|
+
}
|
267
|
+
|
239
268
|
// hide the google translate element if exists
|
240
269
|
if ($('google_translate_element')) {
|
241
270
|
$('google_translate_element').hide();
|
@@ -257,16 +286,28 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
257
286
|
}
|
258
287
|
}
|
259
288
|
|
260
|
-
//
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
289
|
+
// load|set user translate cookie
|
290
|
+
user_consent = j1.readCookie(cookie_names.user_consent);
|
291
|
+
if (!user_consent.analysis || !user_consent.personalization) {
|
292
|
+
// disable translation service
|
293
|
+
user_translate.translationEnabled = false;
|
294
|
+
cookie_written = j1.writeCookie({
|
295
|
+
name: cookie_names.user_translate,
|
296
|
+
data: user_translate,
|
297
|
+
secure: secure
|
298
|
+
});
|
299
|
+
|
300
|
+
// expire permanent cookie to session
|
301
|
+
j1.expireCookie({ name: cookie_names.user_translate });
|
302
|
+
} else {
|
303
|
+
logger.debug('\n' + 'write to cookie : ' + cookie_names.user_translate);
|
304
|
+
cookie_written = j1.writeCookie({
|
305
|
+
name: cookie_names.user_translate,
|
306
|
+
data: user_translate,
|
307
|
+
secure: secure,
|
308
|
+
expires: 365
|
309
|
+
});
|
310
|
+
}
|
270
311
|
|
271
312
|
if (moduleOptions.dialogLanguage === 'auto') {
|
272
313
|
moduleOptions.dialogLanguage = '{{contentLanguage}}';
|
@@ -274,7 +315,11 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
274
315
|
|
275
316
|
j1.translator = new Translator({
|
276
317
|
contentURL: moduleOptions.contentURL, // dialog content (modals) for all supported languages
|
277
|
-
cookieName:
|
318
|
+
cookieName: cookie_names.user_translate, // name of the translator cookie
|
319
|
+
cookieStorageDays: expires, // lifetime of a cookie [0..365], 0: session cookie
|
320
|
+
cookieSameSite: same_site, // restrict consent cookie
|
321
|
+
cookieDomain: domainAttribute, // set domain (hostname|domain)
|
322
|
+
cookieSecure: secure, // set
|
278
323
|
cookieConsentName: moduleOptions.cookieConsentName, // the name of the Cookie Consent Cookie (secondary data)
|
279
324
|
disableLanguageSelector: moduleOptions.disableLanguageSelector, // disable language dropdown for translation in dialog (modal)
|
280
325
|
dialogContainerID: moduleOptions.dialogContainerID, // dest container, the dialog modal is loaded (dynamically)
|
@@ -288,7 +333,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
288
333
|
});
|
289
334
|
|
290
335
|
// enable|disable translation (after callback)
|
291
|
-
if (
|
336
|
+
if (user_translate.analysis && user_translate.personalization && user_translate.translationEnabled) {
|
292
337
|
if (moduleOptions.translatorName === 'google') {
|
293
338
|
head.appendChild(script);
|
294
339
|
if ($('google_translate_element')) {
|
@@ -298,18 +343,15 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
298
343
|
} else {
|
299
344
|
if (moduleOptions.translatorName === 'google') {
|
300
345
|
// remove all googtrans cookies that POTENTIALLY exists
|
301
|
-
Cookies.remove('googtrans', { domain:
|
346
|
+
Cookies.remove('googtrans', { domain: domainAttribute });
|
302
347
|
Cookies.remove('googtrans', { domain: hostname });
|
303
348
|
Cookies.remove('googtrans');
|
304
349
|
}
|
305
350
|
}
|
306
351
|
|
307
|
-
//
|
308
|
-
//
|
309
|
-
//
|
310
|
-
// logger.info('\n' + 'call default action');
|
311
|
-
// j1.translator.showDialog();
|
312
|
-
// });
|
352
|
+
// -------------------------------------------------------------------
|
353
|
+
// NOTE: Click events moved to Navigator (core)
|
354
|
+
// -------------------------------------------------------------------
|
313
355
|
|
314
356
|
_this.setState('finished');
|
315
357
|
logger.info('\n' + 'state: ' + _this.getState());
|
@@ -317,7 +359,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
317
359
|
|
318
360
|
clearInterval(dependencies_met_page_ready);
|
319
361
|
}
|
320
|
-
});
|
362
|
+
}, 25);
|
321
363
|
}, // END init
|
322
364
|
|
323
365
|
// -------------------------------------------------------------------------
|
@@ -376,36 +418,38 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
376
418
|
|
377
419
|
// -------------------------------------------------------------------------
|
378
420
|
// cbGoogle()
|
379
|
-
// Called by the translator CORE module after the user made
|
380
|
-
// selection for a translation|language
|
421
|
+
// Called by the translator CORE module after the user has made
|
422
|
+
// the selection for a translation|language
|
381
423
|
// -------------------------------------------------------------------------
|
382
424
|
cbGoogle: function () {
|
383
|
-
var logger
|
384
|
-
var
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
425
|
+
var logger = log4javascript.getLogger('j1.adapter.translator.cbGoogle');
|
426
|
+
var msDropdown = document.getElementById('dropdownJSON').msDropdown;
|
427
|
+
// var cookie_names = j1.getCookieNames();
|
428
|
+
// var user_consent = j1.readCookie(cookie_names.user_consent);
|
429
|
+
// var user_translate = j1.readCookie(cookie_names.user_translate);
|
430
|
+
// var url = new liteURL(window.location.href);
|
431
|
+
// var baseUrl = url.origin;;
|
432
|
+
// var hostname = url.hostname;
|
433
|
+
// var domain = hostname.substring(hostname.lastIndexOf('.', hostname.lastIndexOf('.') - 1) + 1);
|
434
|
+
// var cookie_option_domain = '{{cookie_options.domain}}';
|
435
|
+
// var same_site = '{{cookie_options.same_site}}';
|
390
436
|
var srcLang;
|
391
437
|
var destLang;
|
392
438
|
var transCode;
|
439
|
+
var domainAttribute;
|
440
|
+
var selectedTranslationLanguage;
|
441
|
+
|
442
|
+
// set domain used by cookies
|
443
|
+
// if (cookie_option_domain == 'auto') {
|
444
|
+
// domainAttribute = domain ;
|
445
|
+
// } else {
|
446
|
+
// // domainAttribute = hostname;
|
447
|
+
// domainAttribute = '';
|
448
|
+
// }
|
393
449
|
|
394
450
|
selectedTranslationLanguage = msDropdown.value;
|
395
451
|
logger.info('\n' + 'selected translation language: ' + selectedTranslationLanguage);
|
396
452
|
|
397
|
-
// update cookie consent settings
|
398
|
-
user_consent.analysis = user_translate.analysis;
|
399
|
-
user_consent.personalization = user_translate.personalization;
|
400
|
-
|
401
|
-
cookie_written = j1.writeCookie({
|
402
|
-
name: cookie_names.user_consent,
|
403
|
-
data: user_consent,
|
404
|
-
samesite: 'Strict',
|
405
|
-
secure: secure,
|
406
|
-
expires: 365
|
407
|
-
});
|
408
|
-
|
409
453
|
// set content language
|
410
454
|
if (moduleOptions.contentLanguage === 'auto') {
|
411
455
|
srcLang = '{{contentLanguage}}';
|
@@ -415,7 +459,7 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
415
459
|
|
416
460
|
// translation language MUST be DIFFERENT from content language
|
417
461
|
if (srcLang == selectedTranslationLanguage ) {
|
418
|
-
Cookies.remove('googtrans', { domain:
|
462
|
+
Cookies.remove('googtrans', { domain: domainAttribute });
|
419
463
|
Cookies.remove('googtrans', { domain: hostname });
|
420
464
|
Cookies.remove('googtrans');
|
421
465
|
location.reload(true);
|
@@ -426,11 +470,16 @@ j1.adapter['translator'] = (function (j1, window) {
|
|
426
470
|
transCode = '/' + srcLang + '/' + selectedTranslationLanguage;
|
427
471
|
|
428
472
|
// remove all googtrans cookies that POTENTIALLY exists
|
429
|
-
Cookies.remove('googtrans', { domain:
|
473
|
+
Cookies.remove('googtrans', { domain: domainAttribute });
|
430
474
|
Cookies.remove('googtrans', { domain: hostname });
|
431
475
|
Cookies.remove('googtrans');
|
432
476
|
|
433
|
-
//
|
477
|
+
// -----------------------------------------------------------------------
|
478
|
+
// NOTE: googtrans cookie will be rewritten (by Google!?) for
|
479
|
+
// attributes 'SameSite' and 'Domain'. This results for 'SameSite'
|
480
|
+
// in an empty field and two cookies (host+domain) if domain option
|
481
|
+
// is enabled!!!
|
482
|
+
// -----------------------------------------------------------------------
|
434
483
|
Cookies.set('googtrans', transCode);
|
435
484
|
|
436
485
|
// reload current page (skip cache)
|
@@ -8557,6 +8557,12 @@ table tr.even, table tr.alt, table tr:nth-of-type(even) {
|
|
8557
8557
|
color: #bdbdbd;
|
8558
8558
|
border-bottom: 1px dotted #424242 !important; }
|
8559
8559
|
|
8560
|
+
.series-exerpt {
|
8561
|
+
color: #e0e0e0; }
|
8562
|
+
|
8563
|
+
.series-navigation ul li a {
|
8564
|
+
background-color: #e0e0e0; }
|
8565
|
+
|
8560
8566
|
/*
|
8561
8567
|
# -----------------------------------------------------------------------------
|
8562
8568
|
# ~/100_template_css/scss/theme_uno_dark/extentions/_tags.scss
|