您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Displays a notification when youve fed a kad
// ==UserScript== // @name GC - Kad Fed Notification // @namespace http://tampermonkey.net/ // @version 0.2 // @description Displays a notification when youve fed a kad // @author Dani (but really mandi) // @match https://www.grundos.cafe/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js // ==/UserScript== // get the current page since we use this a lot const CURRENT_PAGE = window.location.pathname; const THEME2004 = $('img[src*="/04/"]').length > 0 ? true : false; let currentUser = THEME2004 ? $('td.tl a[href^="/userlookup/?"]').text() : $('td.tt a[href^="/userlookup/?"]').text(); (function() { 'use strict'; // show message at the top of the page if you've already fed a kad if ('/games/kadoatery/' == CURRENT_PAGE) { let kad = $('p:contains("Thanks, ' + currentUser + '!")'); if ( kad.length > 0) { let kadName = kad.parent().find('b:first-of-type').text(); kadName = kadName.split(currentUser)[0] $('b:contains("The Kadoatery")').parent().parent().prepend(`<div id="alreadyFedKad" style="padding:5px;background-color:pink;"><center>You already fed "${kadName}"</center></div>`); } } // Your code here... })();