您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Additional notifications count just for mentions.
当前为
// ==UserScript== // @name Gab.ai Mentions Notifications // @namespace https://www.ekkooff.com/ // @version 0.1 // @description Additional notifications count just for mentions. // @author Kevin Roberts (@echo) // @match https://gab.ai/* // @grant none // ==/UserScript== (function() { 'use strict'; var mentions = $('<span id="notificationmentions" style="background:#5a2;left:120px;" class="hidden">0</span>'); $('.notification-count').append(mentions); var reset = function() { mentions.text('0'); mentions.addClass('hidden'); }; var oldXHR = window.XMLHttpRequest; function newXHR() { var realXHR = new oldXHR(); realXHR.addEventListener("readystatechange", function() { if(realXHR.readyState==4 && realXHR.status==200){ if(realXHR.responseURL.startsWith('https://gab.ai/api/notifications')) { reset(); } } }, false); return realXHR; } window.XMLHttpRequest = newXHR; Pusher.instances[0].bind_all(function(eventName,data) { if(data.message && data.message.endsWith("mentioned you in a post.")) { var count = parseInt(mentions.text()); count++; mentions.text(count); mentions.removeClass('hidden'); } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址