您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Disable Notifications API where sites may show popup notifications message at bottom-right of the web browser. Any sites which require Notifications API may cause the web browser to ask user for a permission to display notifications. This script disables both the notifications and the permission prompt. It is intended for users who find them annoying.
// ==UserScript== // @name Disable Notifications API // @namespace https://greasyfork.org/en/users/85671-jcunews // @version 1.0.1 // @license GNU AGPLv3 // @description Disable Notifications API where sites may show popup notifications message at bottom-right of the web browser. Any sites which require Notifications API may cause the web browser to ask user for a permission to display notifications. This script disables both the notifications and the permission prompt. It is intended for users who find them annoying. // @author jcunews // @match *://*/* // @grant none // @run-at document-start // ==/UserScript== (function() { window.Notification = { get permission() { return "denied"; }, set permission(a) { return "denied"; }, requestPermission: function(fn) { if ("function" === typeof fn) { fn("denied"); return; } else { return { then: function(fn) { fn("denied"); return this; } }; } } }; })();