Bring the fork up to date

This commit is contained in:
Alberto 2019-09-01 01:50:27 +02:00 committed by GitHub
commit 285cbfa49c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 68 additions and 29 deletions

View File

@ -44,5 +44,5 @@
<!-- CSS stylesheets -->
<link href="/assets/css/style.css?v=5" rel="stylesheet">
<link id="dark-css" href="/assets/css/dark.css?v=1" rel="stylesheet" media="(prefers-color-scheme: dark)">
<link id="dark-css" href="/assets/css/dark.css?v=2" rel="stylesheet" media="(prefers-color-scheme: dark)">
</head>

View File

@ -11,7 +11,7 @@
<div id="nav-left" class="position-relative flex-col">
<a class="nav-anchor" href="/index.html">
<span id="nav-home" class="fas fa-home"></span>
<span id="nav-home" class="fas fa-home fa-fw"></span>
</a>
<!-- Provider -->
@ -103,7 +103,7 @@
<details class="nav-details">
<summary>
<span class="nav-summary">
<span class="fas fa-language text-danger"></span>
<span class="fas fa-language text-danger fa-fw"></span>
Language
<span class="dropdown-toggle"></span>
</span>
@ -141,10 +141,10 @@
<a href="https://blog.privacytools.io/" class="nav-anchor">Blog </a>
<a href="/donate/" class="nav-anchor">
Donate <span class="fas fa-heart text-danger"></span>
Donate <span class="fas fa-heart text-danger fa-fw"></span>
</a>
<a id="nav-switch-theme" class="nav-anchor" href="javascript:void(0)" onClick="changeColorScheme()">
Theme <span class="nav-theme-icon fas"></span>
Theme <span class="nav-theme-icon fas fa-fw"></span>
</a>
</div>
</div>

View File

@ -2,7 +2,7 @@
<script src="/assets/js/popper.min.js?v=4"></script>
<script src="/assets/js/bootstrap.min.js?v=4"></script>
<script src="/assets/js/sortable.min.js?v=4"></script>
<script src="/assets/js/main.js?v=2"></script>
<script src="/assets/js/main.js?v=3"></script>
<!--
Matomo is the leading open-source analytics platform:

View File

@ -94,7 +94,7 @@ chrome=""
%}
<h2>For Experts Only</h2>
<h2>For Power Users Only</h2>
<div class="alert alert-warning" role="alert">
<strong>These addons require quite a lot of interaction from the user. Some sites will not work properly until you have configured the add-ons.</strong>

View File

@ -144,10 +144,9 @@
</dd>
</dl>
<h3>Firefox user.js Templates</h3>
<h3 id="user.js">Firefox user.js Templates</h3>
<ul>
<li><a href="https://github.com/ghacksuserjs/ghacks-user.js">ghacks-user.js</a> - An ongoing comprehensive user.js template for configuring and hardening Firefox privacy, security and anti-fingerprinting.</li>
<li><a href="https://github.com/pyllyukko/user.js">pyllyukko/user.js</a> - This is a user.js configuration file to harden Firefox's settings and make it more secure.</li>
</ul>

View File

@ -41,6 +41,33 @@ tor="http://sejnfjrq6szgca7v.onion"
<li><a href="#win10"><i class="fas fa-link"></i> Don't use Windows 10 - It's a privacy nightmare</a></li>
</ul>
<h4 id="cpuvulns">Remember to check CPU vulnerability mitigations</h4>
<p><em><a href="https://support.microsoft.com/en-us/help/4073757/protect-windows-devices-from-speculative-execution-side-channel-attack">This also affects Windows 10</a>, but it doesn't expose this information or mitigation instructions as easily. MacOS users check <a href="https://support.apple.com/en-us/HT210108">How to enable full mitigation for Microarchitectural Data Sampling (MDS) vulnerabilities on Apple Support</a>.</em></p>
<p>When running a enough recent kernel, you can check the CPU vulnerabilities it detects by <code>tail -n +1 /sys/devices/system/cpu/vulnerabilities/*</code>. By using <code>tail -n +1</code> instead of <code>cat</code>, the file names are also visible.</p>
<p>
In case you have an Intel CPU, you may notice "SMT vulnerable" display after running the <code>tail</code> command. To mitigate this, disable <a href="https://en.wikipedia.org/wiki/Hyper-threading">hyper-threading</a> from the UEFI/BIOS. You can also take the following mitigation steps below if your system/distribution uses GRUB and supports <code>/etc/default/grub.d/</code>:
</p>
<ol>
<li><code>sudo mkdir /etc/default/grub.d/</code> to create a directory for additional grub configuration</li>
<li><code>echo GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT mds=full,nosmt" | sudo tee /etc/default/grub.d/mds.conf</code> to create a new grub config file source with the echoed content</li>
<li><code>sudo grub-mkconfig -o /boot/grub/grub.cfg</code> to generate a new grub config file including this new kernel boot flag</li>
<li><code>sudo reboot</code> to reboot</li>
<li>after the reboot, check <code>tail -n +1 /sys/devices/system/cpu/vulnerabilities/*</code> again to see that MDS now says "SMT disabled."</li>
</ol>
<h5>Further reading</h5>
<ul>
<li><a href="https://cpu.fail/">CPU.fail</a></li>
<li><a href="https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html">MDS - Microarchitectural Data Sampling on The Linux kernel user's and administrator's guide</a></li>
<li><a href="https://mdsattacks.com/">RIDL and Fallout: MDS attacks on mdsattacks.com</a></li>
<li><a href="https://en.wikipedia.org/wiki/Simultaneous_multithreading">Simultaneous multithreading on Wikipedia</a></li>
</ul>
<h3>Worth Mentioning</h3>
<ul>

View File

@ -44,7 +44,7 @@
description="<strong>LessPass</strong> is a free and open source password manager that generates unique passwords for websites, email accounts, or anything else based on a master password and information you know. No sync needed. Uses PBKDF2 and SHA-256. It's advised to use the browser addons for more security."
website="https://lesspass.com/"
forum="https://forum.privacytools.io/t/discussion-keepassxc/1344/2"
github="https://github.com/keepassxreboot/keepassxc"
github="https://github.com/lesspass/lesspass"
firefox="https://addons.mozilla.org/en-US/firefox/addon/lesspass/"
chrome="https://chrome.google.com/webstore/detail/lesspass/lcmbpoclaodbgkbjafnkbbinogcbnjih"
android="https://play.google.com/store/apps/details?id=com.lesspass.android&hl=en"

View File

@ -2,6 +2,7 @@
<html lang="en">
{% include head.html %}
<body data-spy="scroll" data-target="#navbar">
<script src="/assets/js/applytheme.js?v=1"></script>
<header>
{% include nav.html %}
<div id="top" class="py-4"></div>

View File

@ -111,6 +111,11 @@ img {
border-color: $dark-300;
}
.form-control[readonly],
.form-control:disabled {
background: $dark-300;
}
.card,
.jumbotron,
.list-group-item {

6
assets/js/applytheme.js Normal file
View File

@ -0,0 +1,6 @@
if (localStorage.getItem("colorScheme") === "dark") {
document.querySelector("#dark-css").removeAttribute("media"); // Set dark theme
}
else if (localStorage.getItem("colorScheme") === "light") {
document.querySelector("#dark-css").setAttribute("media", "invalid"); // Set light theme
}

View File

@ -29,29 +29,31 @@ function navSectionsClose(event) {
// Dark/Light color scheme switch button
document.querySelector("#nav-switch-theme").style.display = "inline"
if (localStorage.getItem("colorScheme") === "dark") {
document.querySelector("#dark-css").removeAttribute("media"); // Set dark theme
}
else if (localStorage.getItem("colorScheme") === "light") {
document.querySelector("#dark-css").setAttribute("media", "invalid"); // Set light theme
}
document.querySelector("#nav-switch-theme").style.display = "inline";
function changeColorScheme() {
// Use whatever users want
if (localStorage.getItem("colorScheme") === "dark") {
// Change to light theme
// by setting invalid media it will just not apply CSS for anyone
document.querySelector("#dark-css").setAttribute("media", "invalid");
localStorage.setItem("colorScheme", "light");
if (window.matchMedia("(prefers-color-scheme: dark)").matches === false) {
document.querySelector("#dark-css").setAttribute("media", "(prefers-color-scheme: dark)");
localStorage.removeItem("colorScheme");
} else {
// by setting invalid media it will just not apply CSS for anyone
document.querySelector("#dark-css").setAttribute("media", "invalid");
localStorage.setItem("colorScheme", "light");
}
}
// Change to dark theme
else if (localStorage.getItem("colorScheme") === "light") {
// Change to dark theme
// media was set to prefers-color-scheme: dark
document.querySelector("#dark-css").removeAttribute("media");
localStorage.setItem("colorScheme", "dark");;
if (window.matchMedia("(prefers-color-scheme: dark)").matches === true) {
document.querySelector("#dark-css").setAttribute("media", "(prefers-color-scheme: dark)");
localStorage.removeItem("colorScheme");
} else {
// media was set to prefers-color-scheme: dark
document.querySelector("#dark-css").removeAttribute("media");
localStorage.setItem("colorScheme", "dark");
}
}
// Just use whatever browsers want
@ -59,11 +61,10 @@ function changeColorScheme() {
// Change to light Theme
document.querySelector("#dark-css").setAttribute("media", "invalid");
localStorage.setItem("colorScheme", "light");
}
else {
} else {
// Change to dark theme
document.querySelector("#dark-css").removeAttribute("media");
localStorage.setItem("colorScheme", "dark");;
localStorage.setItem("colorScheme", "dark");
}
}