Enable notification dot on mobile UI.
当前为
// ==UserScript==
// @name ESJ Zone: Notifications on Mobile
// @name:zh-TW ESJ Zone:流動版通知
// @description Enable notification dot on mobile UI.
// @description:zh-TW 在流動版界面顯示通知徽章。
// @icon https://icons.duckduckgo.com/ip3/www.esjzone.cc.ico
// @author Jason Kwok
// @namespace https://jasonhk.dev/
// @version 1.0.0
// @license MIT
// @match https://www.esjzone.cc/*
// @match https://www.esjzone.me/*
// @run-at document-end
// @grant GM.addStyle
// @supportURL https://greasyfork.org/scripts/481323/feedback
// ==/UserScript==
GM.addStyle(`
@media (max-width: 991px)
{
.site-branding .account-msg::after
{
display: block;
position: absolute;
top: 10px;
left: 54px;
border-width: 1px;
border-radius: 50%;
width: 10px;
height: 10px;
content: " ";
background: #fd3995;
}
}
@media (max-width: 576px)
{
.site-branding .account-msg::after
{
left: 41px;
}
}
`);
const accountButton = document.querySelector(".tools .account");
if (accountButton.classList.contains("account-msg"))
{
const menuToggle = document.querySelector(".site-branding .menu-toggle");
menuToggle.classList.add("account-msg");
}