You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2023/08/01 20:47:29 UTC
[libcloud-site] 02/05: Fix jslint.
This is an automated email from the ASF dual-hosted git repository.
tomaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/libcloud-site.git
commit 62432e567a24dd45196c1e5fac5dda432bd8bf72
Author: Tomaz Muraus <to...@tomaz.me>
AuthorDate: Tue Aug 1 22:37:12 2023 +0200
Fix jslint.
---
source/_assets/js/matomo.js | 17 -----------------
source/_assets/js/mode-switcher.js | 12 ++++++------
2 files changed, 6 insertions(+), 23 deletions(-)
diff --git a/source/_assets/js/matomo.js b/source/_assets/js/matomo.js
deleted file mode 100644
index f4abea6f..00000000
--- a/source/_assets/js/matomo.js
+++ /dev/null
@@ -1,17 +0,0 @@
-<script>
- var _paq = window._paq = window._paq || [];
- /* tracker methods like "setCustomDimension" should be called before
-"trackPageView" */
- /* We explicitly disable cookie tracking to avoid privacy issues */
- _paq.push(['disableCookies']);
- _paq.push(['trackPageView']);
- _paq.push(['enableLinkTracking']);
- (function() {
- var u="https://analytics.apache.org/";
- _paq.push(['setTrackerUrl', u+'matomo.php']);
- _paq.push(['setSiteId', '7']);
- var d=document, g=d.createElement('script'),
-s=d.getElementsByTagName('script')[0];
- g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
- })();
-</script>
diff --git a/source/_assets/js/mode-switcher.js b/source/_assets/js/mode-switcher.js
index 2d1b4e28..345746e1 100644
--- a/source/_assets/js/mode-switcher.js
+++ b/source/_assets/js/mode-switcher.js
@@ -1,11 +1,11 @@
-let systemInitiatedDark = window.matchMedia("(prefers-color-scheme: dark)");
+let systemInitiatedDark = window.matchMedia('(prefers-color-scheme: dark)');
let theme = sessionStorage.getItem('theme');
if (systemInitiatedDark.matches) {
document.getElementById('theme-switch').checked = true;
} else {
document.getElementById('theme-switch').checked = false;
- document.getElementById("theme-toggle").innerHTML = "Dark Mode";
+ document.getElementById('theme-toggle').innerHTML = 'Dark Mode';
}
function prefersColorTest(systemInitiatedDark) {
@@ -24,11 +24,11 @@ systemInitiatedDark.addListener(prefersColorTest);
function modeSwitcher() {
let theme = sessionStorage.getItem('theme');
- if (theme === "dark") {
+ if (theme === 'dark') {
document.documentElement.setAttribute('data-theme', 'light');
sessionStorage.setItem('theme', 'light');
document.getElementById('theme-switch').checked = false;
- } else if (theme === "light") {
+ } else if (theme === 'light') {
document.documentElement.setAttribute('data-theme', 'dark');
sessionStorage.setItem('theme', 'dark');
document.getElementById('theme-switch').checked = true;
@@ -43,11 +43,11 @@ function modeSwitcher() {
}
}
-if (theme === "dark") {
+if (theme === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark');
sessionStorage.setItem('theme', 'dark');
document.getElementById('theme-switch').checked = true;
-} else if (theme === "light") {
+} else if (theme === 'light') {
document.documentElement.setAttribute('data-theme', 'light');
sessionStorage.setItem('theme', 'light');
document.getElementById('theme-switch').checked = false;