_website: Fix use of location.hostname.

This commit is contained in:
Qi Xiao 2018-11-04 20:50:51 +00:00
parent fb72de8ce6
commit 31c7ad84d1

View File

@ -31,8 +31,7 @@
<script>
// If the domain starts with "dark.", trigger dark mode.
var hostname = location.href.hostname;
if (hostname && hostname.startsWith('dark.')) {
if (location.hostname.startsWith('dark.')) {
document.body.classList.add('dark');
}