您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Trimps tools (visual)
当前为
// ==UserScript== // @name Trimps tools // @namespace trimps.github.io // @version 1.011 // @description Trimps tools (visual) // @author Anton // @match https://trimps.github.io // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js // ==/UserScript== (function() { 'use strict'; var tMain, $ = jQuery; var _getBarWidthPercent = function(barSelector) { return jQuery(barSelector).width() / jQuery(barSelector).parent().width() * 100; } var _checkProgress = function() { var maxProgress = 0, maxResource = ''; var food = _getBarWidthPercent('#foodBar'); var wood = _getBarWidthPercent('#woodBar'); var metal = _getBarWidthPercent('#metalBar'); if (food > maxProgress) {maxProgress = food; maxResource = 'food';} if (wood > maxProgress) {maxProgress = wood; maxResource = 'wood';} if (metal > maxProgress) {maxProgress = metal; maxResource = 'metal';} document.title = '' + Math.floor(maxProgress) + '% ' + maxResource; }; var _styleUpdate = function() { // remove counts $('head').append('<style type="text/css">.thingOwned{display:none}.queueItem,.btn{padding:0}.thingColorCanNotAfford.upgradeThing{background-color:#530053;}</style>'); // remove tabs $('#buyTabs').hide(); filterTabs('all'); // remove captions $('#buildingsTitleDiv,#upgradesTitleDiv,#equipmentTitleDiv').hide(); // fix height $('#topRow,#queueContainer').css('margin-bottom', '0'); $('#jobsTitleDiv').css('padding', '0').css('font-size', 'smaller'); $('#buyHere').css('margin', '0').css('padding', '0').css('overflow-x', 'hidden'); $('#queueContainer').css('height', '70px'); $('#numTabs').css('margin', '0'); $('#buyContainer').css('height', 'calc(99vh - 20vw - 96px)'); } setTimeout(function() { tMain = setInterval(_checkProgress, 500); _styleUpdate(); }, 1000); })();