From 1ae378df814b1118306b2c232896a5cdcd28387f Mon Sep 17 00:00:00 2001 From: Mujeebullah Kalwar Date: Thu, 20 Jul 2023 03:01:14 +0500 Subject: [PATCH] Fixed Footer `giscus` Comments Widget --- en/assets/custom3.js | 2 +- zh-CN/assets/custom3.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/en/assets/custom3.js b/en/assets/custom3.js index a0f37aa..3f70daa 100644 --- a/en/assets/custom3.js +++ b/en/assets/custom3.js @@ -147,7 +147,7 @@ var initAll = function () { script.setAttribute("data-emit-metadata", "0"); script.setAttribute("data-input-position", "top"); script.setAttribute("data-theme", theme); - script.setAttribute("data-lang", lang); + script.setAttribute("data-lang", lang == 'en-US' ? 'en' : lang); // 预先加载评论会更好,这样用户读到那边时,评论就加载好了 // script.setAttribute("data-loading", "lazy"); document.getElementById("giscus-container").appendChild(script); diff --git a/zh-CN/assets/custom3.js b/zh-CN/assets/custom3.js index a0f37aa..3f70daa 100644 --- a/zh-CN/assets/custom3.js +++ b/zh-CN/assets/custom3.js @@ -147,7 +147,7 @@ var initAll = function () { script.setAttribute("data-emit-metadata", "0"); script.setAttribute("data-input-position", "top"); script.setAttribute("data-theme", theme); - script.setAttribute("data-lang", lang); + script.setAttribute("data-lang", lang == 'en-US' ? 'en' : lang); // 预先加载评论会更好,这样用户读到那边时,评论就加载好了 // script.setAttribute("data-loading", "lazy"); document.getElementById("giscus-container").appendChild(script);