From 924318a19d78e70a99cd3da7928b76b3905df5e0 Mon Sep 17 00:00:00 2001
From: Mimi <1119186082@qq.com>
Date: Wed, 22 Jul 2020 22:44:50 +0800
Subject: [PATCH] Run lebab
---
layout/_scripts/pages/schedule.njk | 181 +++++++++---------
layout/_third-party/math/mathjax.njk | 2 +-
layout/_third-party/statistics/firestore.njk | 20 +-
.../statistics/lean-analytics.njk | 16 +-
4 files changed, 106 insertions(+), 113 deletions(-)
diff --git a/layout/_scripts/pages/schedule.njk b/layout/_scripts/pages/schedule.njk
index ce1dc4c..6e1c0e4 100644
--- a/layout/_scripts/pages/schedule.njk
+++ b/layout/_scripts/pages/schedule.njk
@@ -1,7 +1,7 @@
diff --git a/layout/_third-party/math/mathjax.njk b/layout/_third-party/math/mathjax.njk
index 26d0220..f103868 100644
--- a/layout/_third-party/math/mathjax.njk
+++ b/layout/_third-party/math/mathjax.njk
@@ -38,7 +38,7 @@
}
};
(function () {
- var script = document.createElement('script');
+ const script = document.createElement('script');
script.src = '{{ url_for(mathjax_uri) }}';
script.defer = true;
document.head.appendChild(script);
diff --git a/layout/_third-party/statistics/firestore.njk b/layout/_third-party/statistics/firestore.njk
index 5ec1bae..912f4fd 100644
--- a/layout/_third-party/statistics/firestore.njk
+++ b/layout/_third-party/statistics/firestore.njk
@@ -10,7 +10,7 @@
function getCount(doc, increaseCount) {
// IncreaseCount will be false when not in article page
return doc.get().then(d => {
- var count = 0;
+ let count = 0;
if (!d.exists) { // Has no data, initialize count
if (increaseCount) {
doc.set({
@@ -41,13 +41,13 @@