diff --git a/changelog.txt b/changelog.txt index 3283e73..6f36b9b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases Post-release +Fix Faz.net (json) * v3.1.0.0 (2023-03-19) Add Defector diff --git a/contentScript.js b/contentScript.js index a3c2471..224ad45 100644 --- a/contentScript.js +++ b/contentScript.js @@ -648,7 +648,7 @@ else if (matchDomain('faz.net')) { let split1 = json_text.split('"ArticleBody": "'); let split2 = split1[1].split('","author":'); if (split2[0].includes('"')) - json_text = split1[0] + '"ArticleBody": "' + split2[0].replace(/"/g, '“') + '","author":' + split2[1]; + json_text = split1[0] + '"ArticleBody": "' + split2[0].replace(/(\\)?"/g, "'") + '","author":' + split2[1]; try { json_text = JSON.parse(json_text).ArticleBody; } catch (err) { @@ -5040,7 +5040,7 @@ function pageContains(selector, text) { } function breakText(str) { - str = str.replace(/(?:^|[A-Za-z\"\“])(\.|\?|!)(?=[A-ZÖÜ\„\d][A-Za-zÀ-ÿ\„\d]{1,})/gm, "$&\n\n"); + str = str.replace(/(?:^|[A-Za-z\"\“\)])(\.|\?|!)(?=[A-ZÖÜ\„\d][A-Za-zÀ-ÿ\„\d]{1,})/gm, "$&\n\n"); str = str.replace(/(([a-z]{2,}|[\"\“]))(?=[A-Z](?=[A-Za-zÀ-ÿ]+))/gm, "$&\n\n"); // exceptions: names with alternating lower/uppercase (no general fix) let str_rep_arr = ['AstraZeneca', 'BaFin', 'BerlHG', 'BfArM', 'BilMoG', 'BioNTech', 'DiGA', 'EuGH', 'FinTechRat', 'GlaxoSmithKline', 'IfSG', 'medRxiv', 'mmHg', 'PlosOne', 'StVO']; diff --git a/custom/manifest.json b/custom/manifest.json index f1d324b..c6c6ab7 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.1.0.0" + "version": "3.1.0.1" } diff --git a/manifest.json b/manifest.json index 6bb841f..4a4b8e3 100644 --- a/manifest.json +++ b/manifest.json @@ -740,5 +740,5 @@ "*://*.wallkit.net/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.1.0.0" + "version": "3.1.0.1" }