您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Checks if feeding a kad was successful and logs the results to pass through a Discord webhook.
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/485575/1316619/%5BGC%5D%20-%20Kadoatery%20Details%20Helper.js
// ==UserScript== // @name [GC] - Kadoatery Details Helper // @namespace http://greasyfork.icu/en/users/1225524-kaitlin // @match https://www.grundos.cafe/games/kadoatery/feed_kadoatie/* // @version 1.0 // @author Cupkait // @license MIT // @description Checks if feeding a kad was successful and logs the results to pass through a Discord webhook. // ==/UserScript== function GrabKadoatieDetails() { var fullText = $('.center').html(); const errorPage = $('.errorpage'); if (errorPage.length > 0) { const errorText = errorPage.text(); if (errorText.includes("has already been fed")) { console.log('Too slow, someone else got to that kad first.'); } else if (errorText.includes("wait a bit")) { console.log('You already fed a kad, try again later.'); } } else { const elementOne = $('.center p').eq(0); const elementTwo = $('.center p').eq(1); const elementThree = $('.center p').eq(2); const kadType = $('.center p').eq(3); const elementFive = $('.center p').eq(4); const userName = /user=(.*?)"/g.exec(document.body.innerHTML)[1]; const kadImage = elementTwo.find('img').eq(0).attr('src'); const kadName = elementOne.find('b').eq(0).text(); const kadBlurb = elementTwo.find('strong').eq(0).text(); const kadPaint = kadImage.split('/').pop().replace('_happy.gif', ''); let relicStatus = false; let kadCount = kadType.find('strong').eq(0).text(); if (kadType.text().includes("particularly grateful")) { kadCount = elementFive.find('strong').eq(0).text(); console.log(`${userName} fed ${kadName} the ${kadPaint} Kadoatie as number ${kadCount} and got a relic!`); relicStatus = true; } else { console.log(`${userName} fed ${kadName} the ${kadPaint} Kadoatie as number ${kadCount}!`); } } } // BASIC EXPLANATION OF EACH ELEMENT/VARIABLE: // userName = User who fed kad... aka you // kadImage = Kad that was fed // kadName = Name of kad that was fed // kadBlurb = Flavor text said by the kad // relicStatus = If true, the kad gave you a relic. If false, they did not // kadCount = The total number of kads you have fed // kadPaint = Color of kad that was fed