aboutsummaryrefslogtreecommitdiffhomepage
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/acl.html19
-rw-r--r--linux/coredump.html19
-rw-r--r--linux/cpufreq.html19
-rw-r--r--linux/cryptsetup.html19
-rw-r--r--linux/cups.html22
-rw-r--r--linux/index.html19
-rw-r--r--linux/input.html19
-rw-r--r--linux/ptrace_scope.html19
-rw-r--r--linux/swap.html19
-rw-r--r--linux/systemd.html19
-rw-r--r--linux/zfs.html19
11 files changed, 124 insertions, 88 deletions
diff --git a/linux/acl.html b/linux/acl.html
index d782048..9c1d6ee 100644
--- a/linux/acl.html
+++ b/linux/acl.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
diff --git a/linux/coredump.html b/linux/coredump.html
index 7e06ef9..c99c004 100644
--- a/linux/coredump.html
+++ b/linux/coredump.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
diff --git a/linux/cpufreq.html b/linux/cpufreq.html
index bc4fca5..06cd491 100644
--- a/linux/cpufreq.html
+++ b/linux/cpufreq.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
diff --git a/linux/cryptsetup.html b/linux/cryptsetup.html
index a4be45d..35e70f2 100644
--- a/linux/cryptsetup.html
+++ b/linux/cryptsetup.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
diff --git a/linux/cups.html b/linux/cups.html
index c180230..8564cd3 100644
--- a/linux/cups.html
+++ b/linux/cups.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
@@ -206,6 +209,9 @@ lp -d PRINTER FILE
-o sides=one-sided print front-page only
-o sides=two-sided-long-edge print duplex
+# Show job queue
+lpq -P PRINTER
+
# Remove pending print job.
lprm JOOBID
</code></pre>
diff --git a/linux/index.html b/linux/index.html
index 4870c12..14dd1ca 100644
--- a/linux/index.html
+++ b/linux/index.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
diff --git a/linux/input.html b/linux/input.html
index a87a995..3f4dced 100644
--- a/linux/input.html
+++ b/linux/input.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
diff --git a/linux/ptrace_scope.html b/linux/ptrace_scope.html
index 027b6ee..8cf7664 100644
--- a/linux/ptrace_scope.html
+++ b/linux/ptrace_scope.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
diff --git a/linux/swap.html b/linux/swap.html
index 48ae24b..734a4b4 100644
--- a/linux/swap.html
+++ b/linux/swap.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
diff --git a/linux/systemd.html b/linux/systemd.html
index b5f6dd7..80ef097 100644
--- a/linux/systemd.html
+++ b/linux/systemd.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
diff --git a/linux/zfs.html b/linux/zfs.html
index 21597af..26162d9 100644
--- a/linux/zfs.html
+++ b/linux/zfs.html
@@ -31,10 +31,11 @@
<!-- Custom theme stylesheets -->
- <!-- Provide site root to javascript -->
+ <!-- Provide site root and default themes to javascript -->
<script>
- var path_to_root = "../";
- var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
+ const path_to_root = "../";
+ const default_light_theme = "light";
+ const default_dark_theme = "navy";
</script>
<!-- Start loading toc.js asap -->
<script src="../toc.js"></script>
@@ -44,8 +45,8 @@
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
- var theme = localStorage.getItem('mdbook-theme');
- var sidebar = localStorage.getItem('mdbook-sidebar');
+ let theme = localStorage.getItem('mdbook-theme');
+ let sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
@@ -59,7 +60,8 @@
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
- var theme;
+ const default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? default_dark_theme : default_light_theme;
+ let theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
const html = document.documentElement;
@@ -72,8 +74,8 @@
<!-- Hide / unhide sidebar before it is displayed -->
<script>
- var sidebar = null;
- var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
+ let sidebar = null;
+ const sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
@@ -109,6 +111,7 @@
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
+ <li role="none"><button role="menuitem" class="theme" id="default_theme">Auto</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>