Trimps tools (visual)
当前为
// ==UserScript==
// @name Trimps tools
// @namespace trimps.github.io
// @version 1.001
// @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;
var _checkProgress = function() {
var maxProgress = 0;
var food = parseFloat(jQuery('#foodBar').css('width'));
var wood = parseFloat(jQuery('#woodBar').css('width'));
var metal = parseFloat(jQuery('#metalBar').css('width'));
console.log(jQuery('#foodBar').css('width'));
if (food > maxProgress) maxProgress = food;
if (wood > maxProgress) maxProgress = wood;
if (metal > maxProgress) maxProgress = metal;
document.title = '' + maxProgress + '%';
};
setTimeout(function() {
tMain = setInterval(_checkProgress, 500);
}, 1000);
})();