您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Displays number of games waiting for your move in page title on online-go.com
当前为
- // ==UserScript==
- // @name OGS Title Count
- // @description Displays number of games waiting for your move in page title on online-go.com
- // @author TPReal
- // @namespace https://greasyfork.org/users/9113
- // @version 0.2
- // @match *://online-go.com/*
- // @grant none
- // ==/UserScript==
- var TITLE_MATCHER=/^(?:\[\d+\] )?(.*)$/;
- var updateTitle=function(){
- var value=document.getElementById("turn-notification-indicator").innerText;
- var prefix="";
- if(value&&value!="0")
- prefix="["+value+"] ";
- var baseTitle=TITLE_MATCHER.exec(document.title)[1];
- document.title=prefix+baseTitle;
- };
- var tick=function(){
- updateTitle();
- setTimeout(tick,1000);
- };
- tick();