您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically dismisses announcements on Gaia Online.
// ==UserScript== // @name Auto-dismiss Gaia announcements // @namespace http://mathemaniac.org/ // @version 1.0.0 // @description Automatically dismisses announcements on Gaia Online. // @match https://www.gaiaonline.com/* // @copyright 2023, Sebastian Paaske Tørholm // @grant none // @license MIT // ==/UserScript== /* jshint -W097 */ /* eslint-env jquery */ 'use strict'; document.getElementsByTagName('head')[0].insertAdjacentHTML('beforeend', ` <style> #notifyBubbleContainer:has(.notify_announcements:only-child), .notify_announcements { display: none; } </style> `); let announcement_link = document.querySelector('#notifyBubbleContainer .notify_announcements a'); if (announcement_link) { let iframe = document.createElement('iframe'); iframe.src = announcement_link.href; iframe.style.display = 'none'; announcement_link.appendChild(iframe); }