您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Disable button until wish entered
当前为
// ==UserScript== // @name GC - Food Club // @namespace https://greasyfork.org/en/users/798613 // @version 0.4 // @description Disable button until wish entered // @author Mandi (mandanarchi), zehra // @match https://www.grundos.cafe/games/foodclub/bet* // @icon https://www.google.com/s2/favicons?domain=grundos.cafe // @grant none // @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js // ==/UserScript== (function() { 'use strict'; // toggles fc bets let your_bet_amount = $('p:contains("You can only") b').first().text(); if (your_bet_amount > 0) { $('[name=bet_amount]').val(your_bet_amount); } //########## IGNORE BELOW ##########// if (item.length == 0) { btn.prop('disabled', true); } $(document).on('change', '[name=wish]', function() { let value = $(this).val(); //console.log(allowed_items.length, $.inArray(value, allowed_items), value); if (value.length > 0) { if (allowed_items.length > 0 && $.inArray(value, allowed_items) !== -1) { btn.prop('disabled', false); } else if (allowed_items.length == 0){ btn.prop('disabled', false); } else { btn.prop('disabled', true); } } else { btn.prop('disabled', true); } }); })();