mirror-web/_src/entrypoints/default.js
Harry Chen 59dc77fe75 Use prettier to format code
Signed-off-by: Harry Chen <i@harrychen.xyz>
2024-04-21 13:17:18 +08:00

15 lines
423 B
JavaScript

import "../styles/global.scss";
import { suffix as siteSuffix } from "virtual:jekyll-config";
if (siteSuffix) {
if (
!document.location.hostname.endsWith(siteSuffix) &&
!document.location.hostname.endsWith(siteSuffix + ".")
) {
document.title = document.title.replace(/(清华)|(tsinghua)|(tuna)/gi, "");
document.addEventListener("DOMContentLoaded", () => {
document.body.classList.add("nonthu");
});
}
}