您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Show a notification count in the title of the page for tab browsing convenience.
- // ==UserScript==
- // @name GAB Notification Count in Title
- // @namespace http://gab.ai/Jeremy20_9
- // @version 0.1
- // @description Show a notification count in the title of the page for tab browsing convenience.
- // @author Jeremiah 20:9
- // @match https://gab.ai/*
- // @grant none
- // ==/UserScript==
- var pagetitle = document.title;
- var itvcheck = -1;
- $(document).ready(function(){
- itvcheck = setInterval(function(){
- var indicator = $(".header__link--notifications");
- if(indicator.length > 0)
- {
- indicator = $(indicator).find("span");
- var count = parseInt($(indicator).text());
- if(count > 0)
- document.title = pagetitle + "(" + count + ")";
- else
- document.title = pagetitle;
- }
- }, 1000);
- });