您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Cookie clicker tools (visual)
当前为
// ==UserScript== // @name Cookie clicker tools // @namespace orteil.dashnet.org // @version 1.93 // @description Cookie clicker tools (visual) // @author Anton // @match http://orteil.dashnet.org/cookieclicker/* // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js // ==/UserScript== (function() { 'use strict'; if (console) console.log('Cookies?'); var t = setInterval(function() { var icons = document.querySelectorAll('.icon:not([id^=product])'); var x = icons && icons.length > 0 ? icons[0].offsetParent : null; if (x !== null) { var $tooltip = jQuery(x); var price = $tooltip.find('span.price').text(); if (price) { price = price.replace(',', ''); var priceNum = parseFloat(price); var mult = 1; if (price.indexOf('billion') > -1) mult = 1E9; else if (price.indexOf('million') > -1) mult = 1E6; var totalPrice = priceNum * mult; var data = $tooltip.find('div.data b'); var eachIncome = jQuery(data[0]).text().replace(',', ''); var eachIncomeNum = parseFloat(eachIncome); mult = 1; if (eachIncome.indexOf('billion') > -1) mult = 1E9; else if (eachIncome.indexOf('million') > -1) mult = 1E6; var totalIncome = eachIncomeNum * mult; var needed = totalPrice > 0 ? totalIncome / totalPrice : 0; var needInvert = totalIncome > 0 ? totalPrice / totalIncome : 0; var $name = $tooltip.find('div.name span'); if ($name.length === 0) { $tooltip.find('div.name').append(jQuery('<span />')); $name = $tooltip.find('div.name span'); } $name.text(' (' + Beautify(needInvert) + ')'); } } }, 100); })();