NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Taxi-helper // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author SilenLJ // @match http://www.taxi-money.info/city/get/* // @grant none // ==/UserScript== (function() { function sortOrders($orders) { if ($orders.length > 0) { return $orders.sort(sort); } return 0; } function sort (a, b) { if ($(a).find('b:first').html().substring(0,4) < $(b).find('b:first').html().substring(0,4)) return 1; else return -1; } function findMaxOrder($orders) { if ($orders.length > 0) { var $max_price_order = $orders[0]; var max_price = $($max_price_order).find('b:first').html().substring(0,4); for (var i = 0; i < $orders.length; i++) { var current_price = $($orders[i]).find('b:first').html().substring(0,4); if ( max_price < current_price ) { $max_price_order = $orders[i]; } } return $max_price_order; } return 0; } function checkOrder($sorted_orders,i) { if ($sorted_orders !== 0) { $($sorted_orders[i]).find('.acceptorder').bind("DOMSubtreeModified",function(){ if ($(this).children('.error').html() !== undefined) { i++; checkOrder($sorted_orders,i); } }); $($sorted_orders[i]).find('.button_gray').click(); } } var $orders = $(".order:not(.hackwork-order-wrapper):not(.locked)"); var $sorted_orders = sortOrders($orders); counter = 0; checkOrder($sorted_orders, counter); })();