aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-04-18 22:31:08 -0400
committerBobby <[email protected]>2024-04-18 22:31:08 -0400
commitd475dab266fc60e5ff31a4eefab5f139b8e5e3d7 (patch)
tree861df54f1ca073b6d02bb6da0e6e64e447550e84
parent9f46bf5238c8c177bbcf02783600975e0ef245c2 (diff)
downloadthatcomputerscientist-d475dab266fc60e5ff31a4eefab5f139b8e5e3d7.tar.xz
thatcomputerscientist-d475dab266fc60e5ff31a4eefab5f139b8e5e3d7.zip
Revert back translation
-rw-r--r--static/js/tl.js19
-rw-r--r--templates/blog/partials/base.html8
2 files changed, 12 insertions, 15 deletions
diff --git a/static/js/tl.js b/static/js/tl.js
index df6c69eb..53b8bd98 100644
--- a/static/js/tl.js
+++ b/static/js/tl.js
@@ -45,9 +45,9 @@ function translateJapanese() {
} else {
selectEl.value = 'ja';
selectEl.dispatchEvent(new Event("change"));
- setTimeout(function () {
- save();
- }, 6969);
+ // setTimeout(function () {
+ // save();
+ // }, 6969);
}
}
@@ -62,9 +62,9 @@ if (currentLang === "ja") {
$('#tl_ja').show();
$('body').addClass('ja');
$('body').removeClass('en');
- setTimeout(function () {
- save();
- }, 6969);
+ // setTimeout(function () {
+ // save();
+ // }, 6969);
} else {
$('#tl_ja').hide();
$('#tl_en').show();
@@ -87,11 +87,4 @@ function save() {
window.sessionStorage.setItem(path, entirePage);
}
- // db.collection('pages').doc(path).get().then(page => {
- // const storedPage = page?.page;
- // if (storedPage === null || storedPage !== entirePage) {
- // console.log('Saving page to DB');
- // savePageToDB(entirePage, path);
- // }
- // });
}
diff --git a/templates/blog/partials/base.html b/templates/blog/partials/base.html
index 77558c39..071500ee 100644
--- a/templates/blog/partials/base.html
+++ b/templates/blog/partials/base.html
@@ -144,12 +144,16 @@
</div>
</body>
- <div id="tl_block" style="display: none"></div>
+ {% comment %} <div id="tl_block" style="display: none"></div> {% endcomment %}
<script src="{% static 'js/jquery-1.12.4.min.js' %}"></script>
<script src="{% static 'js/globals.js' %}"></script>
<script src="{% static 'js/spells.js' %}"></script>
<script src="{% static 'js/phone_compatibility.js' %}"></script>
- <script src="{% static 'js/db.js' %}"></script>
+ {% comment %} <script src="{% static 'js/db.js' %}"></script> {% endcomment %}
+ <script
+ type="text/javascript"
+ src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"
+ ></script>
<script src="{% static 'js/tl.js' %}"></script>
{% if request.COOKIES.summonOneko == 'true' %}
<script src="{% static 'js/oneko.js' %}"></script>