一時的に通知を返信のみ見たいけど消したくは無いとき
当前为
// ==UserScript==
// @name Notification Filter
// @namespace http://github.com/yuzulabo
// @version 1.0.0
// @description 一時的に通知を返信のみ見たいけど消したくは無いとき
// @author nzws / ねじわさ
// @match https://knzk.me/*
// @match https://mastodon.cloud/*
// @match https://itabashi.0j0.jp/*
// @license MIT License
// ==/UserScript==
(function() {
window.onload = function () {
var style = document.createElement("style");
style.id = "notifilter-js";
document.querySelector("head").appendChild(style);
style = document.createElement("style");
style.id = "notifilter";
style.innerHTML = "#notifilter{background: #313543;border: 0;color: #fff;font-size: 16px;}";
document.querySelector("head").appendChild(style);
window.isFilter = false;
var button_b = document.querySelector(".column[aria-label=Notifications] .column-header__buttons, .column[aria-label=通知] .column-header__buttons");
var button = document.createElement("button");
button.id = "notifilter";
button.setAttribute('onclick', "document.getElementById('notifilter-js').innerHTML = window.isFilter ? '' : '.notification{display:none;}';window.isFilter=!window.isFilter");
button.innerHTML = "<i class='fa fa-comment'></i>";
button_b.insertBefore(button, button_b.firstChild);
};
})();