From da28413fb497b3a1d55dd4d6e3c90ccb87bb6d47 Mon Sep 17 00:00:00 2001 From: nudista Date: Fri, 23 Feb 2024 15:17:53 +0100 Subject: [PATCH] Odstranit assets18/js/Disclaimer.js --- assets18/js/Disclaimer.js | 87 --------------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 assets18/js/Disclaimer.js diff --git a/assets18/js/Disclaimer.js b/assets18/js/Disclaimer.js deleted file mode 100644 index 5a5ab65..0000000 --- a/assets18/js/Disclaimer.js +++ /dev/null @@ -1,87 +0,0 @@ -/*! - * Author: Pierre-Henry Soria - * Copyright: (c) 2020, Pierre-Henry Soria. All Rights Reserved. - */ - -const localKeyName = 'agreed18'; -const strings = { - welcome: 'Vítáme Vás!', - site_contains_adult_materials: 'Tyto stránky obsahují sexuálně orientované materiály pro dospělé, které mohou být pro některé diváky urážlivé.', - acknowledge_confirm_majority: 'Chcete-li pokračovat, potvrďte, že jste starší 18 let.', - button_over18: 'Jsem starší 18-ti let', - button_under18: 'Jsem mladší 18-ti let', - footer_imprint_paragraph: 'Vstupem na tyto webové stránky vyjadřujete souhlas s našimi podmínkami používání a zásadami ochrany osobních údajů.', -}; - -class Disclaimer { - constructor() { - this.backgroundElement = document.getElementById('disclaimer-background'); - this.dialogElement = document.getElementById('disclaimer-dialog'); - - this.dialogStatus = 0; - } - - loadDialog() { - if (this.dialogStatus === 0) { - this.backgroundElement.style.opacity = '0.95'; - this.backgroundElement.style.display = 'block'; - this.dialogElement.style.display = 'block'; - - this.dialogStatus = 1; - } - } - - disableDialog() { - if (this.dialogStatus === 1) { - this.dialogElement.style.display = 'none'; - this.backgroundElement.style.display = 'none'; - - this.dialogStatus = 0; - } - } - - centerDialog() { - const windowHeight = document.documentElement.clientHeight; - const windowWidth = document.documentElement.clientWidth; - const dialogHeight = parseInt(window.getComputedStyle(this.dialogElement).height); - const dialogWidth = parseInt(window.getComputedStyle(this.dialogElement).width); - - this.dialogElement.style.position = 'absolute'; - this.dialogElement.style.top = (windowHeight / 2 - dialogHeight / 2).toString() + 'px'; - this.dialogElement.style.left = (windowWidth / 2 - dialogWidth / 2).toString() + 'px'; - this.backgroundElement.style.height = windowHeight; - } - - isAccepted() { - try { - return sessionStorage.getItem(localKeyName); - } catch (e) { - console.log('Cannot use sessionStorage', e); - } - - return null; - } - - setAccepted() { - try { - sessionStorage.setItem(localKeyName, '1'); - } catch (e) { - console.log('Cannot use sessionStorage', e); - } - } - - static generateDialog() { - const code = `
-
-

${strings.welcome}

-

${strings.site_contains_adult_materials}

-

${strings.acknowledge_confirm_majority}

-

-

-

${strings.footer_imprint_paragraph}

-
-
`; - - document.write(code); - } -}