From 758367ba697ab02cb481c65af8c6d5599fceeb33 Mon Sep 17 00:00:00 2001 From: om Date: Sun, 9 Oct 2022 22:13:21 +0200 Subject: [PATCH 1/5] Detect language based on URL If the outer website is english/danish, the chatapp will use the same language. --- img/chatapp.svg | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/img/chatapp.svg b/img/chatapp.svg index 3c04f47..e7fa152 100644 --- a/img/chatapp.svg +++ b/img/chatapp.svg @@ -68,7 +68,14 @@ const typing_speed = 50; var conversation_count = 0; var current_dialog = null; + var current_language = "da"; +if(location.protocol.startsWith('http')) { // avoid X-origin errors + if(parent.location.href.match(/\ben\b/)) { + current_language = 'en'; + } +} // else: Just stick to danish + var current_dialog_fn = null; /// SVG 1.1 doesn't do proper text splitting into several lines. From 2d13672ddeef188a012e0ba27a7b09b9acc05380 Mon Sep 17 00:00:00 2001 From: om Date: Mon, 10 Oct 2022 07:30:58 +0200 Subject: [PATCH 2/5] Use URLSearchParams for more robust lang selection --- da/index.html | 2 +- en/index.html | 2 +- img/chatapp.svg | 7 +------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/da/index.html b/da/index.html index 1a5d9c8..5dc37f0 100644 --- a/da/index.html +++ b/da/index.html @@ -31,7 +31,7 @@ vil være mistænkte for børnemisbrug.
- +

Lær mere om ChatControllen og hvorfor det er en dårlig idé, i vores interaktive ChatControl film ude til venstre.

diff --git a/en/index.html b/en/index.html index d7bf81a..eb3b206 100644 --- a/en/index.html +++ b/en/index.html @@ -32,7 +32,7 @@ will be treated as suspects for child abuse.

- +

Learn more about Chat Control and why it is a bad idea by watching our interactive film on the left. diff --git a/img/chatapp.svg b/img/chatapp.svg index e7fa152..ad287f3 100644 --- a/img/chatapp.svg +++ b/img/chatapp.svg @@ -69,12 +69,7 @@ const typing_speed = 50; var conversation_count = 0; var current_dialog = null; -var current_language = "da"; -if(location.protocol.startsWith('http')) { // avoid X-origin errors - if(parent.location.href.match(/\ben\b/)) { - current_language = 'en'; - } -} // else: Just stick to danish +var current_language = new URLSearchParams(location.search).get('lang') ?? 'da'; var current_dialog_fn = null; From 16eff4c89573465c2e92f21bc34acb3cda7343f1 Mon Sep 17 00:00:00 2001 From: om Date: Thu, 13 Oct 2022 23:32:36 +0200 Subject: [PATCH 3/5] Style things a bit more up --- da/index.html | 49 +++++++++++++++++++++++++++++++------------ en/index.html | 55 +++++++++++++++++++++++++++++++++++-------------- img/chatapp.svg | 2 +- style.css | 7 ++++++- 4 files changed, 82 insertions(+), 31 deletions(-) diff --git a/da/index.html b/da/index.html index 5dc37f0..93e4675 100644 --- a/da/index.html +++ b/da/index.html @@ -7,6 +7,8 @@ +

+
-

ChatControl: Dine private beskeder skal overvåges

+

ChatControl: Dine private beskeder skal overvåges

-EU-kommissionen har lavet et nyt lovforslag for at beskytte børn mod misbrug. -Formålet er godt, men loven er dårlig, fordi den kræver, at kommunikationstjenester -skal overvåges, hvis der er en mulighed for at børn -bruger dem, eller hvis der er en mulighed for at dele billeder af børnemisbrug. +EU-kommissionen har lavet et nyt lovforslag for at beskytte børn mod misbrug😇. +Formålet er godt, men loven er dårlig🤔, fordi den kræver, at kommunikationstjenester +skal overvåges🧐, hvis der er en mulighed for at børn👶 +bruger dem, eller hvis der er en mulighed for at dele billeder af børnemisbrug📲. Det vil påvirke langt de fleste chat tjenester og vil betyde at din kommunikation -vil blive overvåget, fordi alle brugere af almindelige kommunikationstjenster -vil være mistænkte for børnemisbrug. +vil blive overvåget📳, fordi alle brugere af almindelige kommunikationstjenster +vil være mistænkte for børnemisbrug👮.

-

+

+

Lær mere om ChatControllen og hvorfor det er en dårlig idé, i vores interaktive ChatControl film ude til venstre. -

+

+

+ + + + Du kan bruge den blue pil for at åbne kontaktlisten +

+

-Hvad kan man så gøre imod lovforslaget? Det er vigtigt at folk bliver oplyste om det. +Hvad kan man så gøre imod lovforslaget?😇 Det er vigtigt at folk bliver oplyste om det📣. Del linket til denne side! Snak med andre om det og tal med -dine politikere i Europaparlamentet +dine politikere i Europaparlamentet🇪🇺 om det (eller skriv en venlig e-mail til dem). -Det er vigtigt at der er en offentlig diskussion om emnet og at politikere ved -at loven er en elendig idé - selvom tanken er god. +Det er vigtigt at der er en offentlig diskussion om emnet🗨 og at politikere ved +at loven er en elendig idé🙀 - selvom tanken er god😾.

+
+
+ diff --git a/en/index.html b/en/index.html index eb3b206..952d63f 100644 --- a/en/index.html +++ b/en/index.html @@ -7,6 +7,8 @@ +
+
-

Chat Control: Your private messages will be scanned

+

Chat Control: Your private messages will be scanned

-The EU commission has proposed a new law to protect children against abuse. -The cause is good, but the law itself is bad, because it requires that -online services with messaging functionality have to be surveilled -if there is a possibility for children to use the service -or if users could potentially use the service to exchange child abuse material. +The EU commission has proposed a new law to protect children against abuse😇. +The cause is good, but the law itself is bad🤔, because it requires that +online services with messaging functionality have to be surveilled🧐 +if there is a possibility for children👶 to use the service +or if users could potentially use the service to exchange child abuse material📲. This will affect many communication services -and it will mean that your communication will be scanned, +and it will mean that your communication will be scanned📳, because all users of regular communication services -will be treated as suspects for child abuse. +will be treated as suspects for child abuse👮.

-

+

+

Learn more about Chat Control and why it is a bad idea by watching our interactive film on the left. -

+

+

+ + + + You can use the blue arrow to open the contact list +

+

-Whan can be done against this proposed law? -It is important that more people know about it. +Whan can be done against this proposed law?😇 +It is important that more people know about it📣. Share the link to this page! Chat with others about it and talk with -your representatives in the European Parliament +your representatives in the European Parliament🇪🇺 about it (or write a nice e-mail to them). -It is important that there is a public discussion about this topic, -so that politicians realise that the law is a bad idea -even though this is for a good cause. +It is important that there is a public discussion about this topic🗨, +so that politicians realise that the law is a bad idea🙀 +even though this is for a good cause😾

+
+
+ diff --git a/img/chatapp.svg b/img/chatapp.svg index ad287f3..154b172 100644 --- a/img/chatapp.svg +++ b/img/chatapp.svg @@ -700,7 +700,7 @@ async function dialog_nabopige_en() { - + loading... diff --git a/style.css b/style.css index 09947fd..003164f 100644 --- a/style.css +++ b/style.css @@ -1,3 +1,8 @@ +#content { + max-width: 600px; + margin: 0 auto; +} + .besked { color: #FFFFFF; background-color: #0084FF; @@ -17,7 +22,7 @@ p { #app-area { display: grid; - grid-template-columns: 350px 300px; + grid-template-columns: 350px 240px; gap: 10px; grid-auto-rows: minmax(350px, auto); } From 13105b1c60fb0bd77cf7517af73e136c997380ff Mon Sep 17 00:00:00 2001 From: om Date: Thu, 13 Oct 2022 23:34:42 +0200 Subject: [PATCH 4/5] typo --- da/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/da/index.html b/da/index.html index 93e4675..ec91d67 100644 --- a/da/index.html +++ b/da/index.html @@ -48,7 +48,7 @@ Lær mere om ChatControllen og hvorfor det er en dårlig idé, i vores interakti fill="#0084FF" onclick="swipe_viewport()" /> - Du kan bruge den blue pil for at åbne kontaktlisten + Du kan bruge den blå pil for at åbne kontaktlisten

From becf04a5b4a7806838825bfd3520f03d1f4a4099 Mon Sep 17 00:00:00 2001 From: om Date: Fri, 14 Oct 2022 11:59:22 +0200 Subject: [PATCH 5/5] Add mobile phone frame to page --- da/index.html | 17 ++++-- en/index.html | 19 ++++-- img/phone_frame.svg | 137 ++++++++++++++++++++++++++++++++++++++++++++ style.css | 7 ++- 4 files changed, 168 insertions(+), 12 deletions(-) create mode 100644 img/phone_frame.svg diff --git a/da/index.html b/da/index.html index ec91d67..65501f9 100644 --- a/da/index.html +++ b/da/index.html @@ -32,8 +32,15 @@ vil være mistænkte for børnemisbrug👮.

-
- +
+
+
+ +
+
+

Lær mere om ChatControllen og hvorfor det er en dårlig idé, i vores interaktive ChatControl film ude til venstre. @@ -51,7 +58,7 @@ Lær mere om ChatControllen og hvorfor det er en dårlig idé, i vores interakti Du kan bruge den blå pil for at åbne kontaktlisten

-
+

Hvad kan man så gøre imod lovforslaget?😇 Det er vigtigt at folk bliver oplyste om det📣. @@ -62,8 +69,8 @@ Det er vigtigt at der er en offentlig diskussion om emnet🗨 og at politik at loven er en elendig idé🙀 - selvom tanken er god😾.

- - + +