some fixes

This commit is contained in:
Sergey Yarkov 2022-11-11 19:51:00 +03:00
parent 5c5b650982
commit a4314684f7
No known key found for this signature in database
GPG Key ID: E91CE1FABC619B6F
2 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,7 @@ import UIString from "../UIString";
$commentsScript.setAttribute("crossorigin", "anonymous"); $commentsScript.setAttribute("crossorigin", "anonymous");
if (window.theme) { if (window.theme) {
$commentsScript.setAttribute("theme", theme === "dark" ? "dark-blue" : "github-light"); $commentsScript.setAttribute("theme", window.theme === "dark" ? "dark-blue" : "github-light");
} else { } else {
$commentsScript.setAttribute("theme", "github-light"); $commentsScript.setAttribute("theme", "github-light");
} }

View File

@ -84,6 +84,7 @@ const t = useTranslation(Astro);
const views = await response.text(); const views = await response.text();
const $views = document.getElementById("views"); const $views = document.getElementById("views");
if (isNaN(parseInt(views, 10))) return;
if ($views) $views.textContent = views; if ($views) $views.textContent = views;
})(); })();
</script> </script>