From d71331be7566e3cfafde16c9393f68ce69aec67e Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Wed, 17 Oct 2018 00:33:22 +0200 Subject: [PATCH 1/2] Make query to fairlanguage server --- content_scripts/fairlang.js | 7 +++++++ manifest.json | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/content_scripts/fairlang.js b/content_scripts/fairlang.js index 573df6c..e68f05b 100644 --- a/content_scripts/fairlang.js +++ b/content_scripts/fairlang.js @@ -6,6 +6,13 @@ function checkTextarea(textarea) { console.log("click " + textarea.id + " -> " + textarea.value); // TODO make queries to the fairlanguage server + + fetch("https://fairlanguage2.dev-star.de/checkDocument?data=liebe+Bürger&json") + .then(response => response.json()) + .then(response => { + console.log(response); + }) + .catch(error => console.log(error)); } (function() { diff --git a/manifest.json b/manifest.json index b3e39c9..1ed8a57 100644 --- a/manifest.json +++ b/manifest.json @@ -12,7 +12,8 @@ }, "permissions": [ - "activeTab" + "activeTab", + "https://fairlanguage2.dev-star.de/*" ], "browser_action": { From 368381d5a65eddf55770875c253ffeaab243ddc8 Mon Sep 17 00:00:00 2001 From: binaryDiv Date: Wed, 17 Oct 2018 00:35:38 +0200 Subject: [PATCH 2/2] Added charset meta tag --- popup/buttonmenu.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/popup/buttonmenu.html b/popup/buttonmenu.html index c5808b9..4ba6339 100644 --- a/popup/buttonmenu.html +++ b/popup/buttonmenu.html @@ -1,7 +1,8 @@ - Test action + + Fairlanguage