Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 2.62 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. javascript:void function(s) {function n() {location.href = $("#village_switch_right").attr("href").replace(/page=\d+/g, "page=0");}function p(i) {return parseInt(i);}function cu(a) {if (a == "c") {if ($("#spy").html() == "0") {return true;} else {u = 0;$(".fm_unit :checked").each(function () {u += p($("#" + $(this).attr("name")).html());});return u < s[2][0];}} else {u = $(".unit-item");x = 0;$("div.vis form").eq(a === "a" ? 0 : 1).find(":text").each(function (i) {x = x ? x : p($(this).val()) > p(u.eq(i).html());});return x;}}function f(a) {k = a.find("input.p").val();if (k.match("d[abc]")) {k = k.substring(1);if (cu(k)) {k = "c";}}if (cu(k)) {n();} else {a.find(".farm_icon_" + k).click();a.hide();}}function c(s) {a = $("tr[class*=\"row_\"]");if (s[3].length) {a.filter(function () {return $(this).find("td").eq(7).html() > s[3][0];}).hide();a = a.filter(":visible");s[3].slice(1).forEach(function (v) {a.has(h(v)).hide();});}a = a.filter(":visible");s.slice(4).forEach(function (v) {g(a, v);});a = $("tr[class*=\"row_\"]:visible");a.not(":has(input.p)").hide();$("#content_value").append(j("c", n.p.toString()));}function j(c, v) {return "<input type='hidden' class='" + c + "' value='" + v + "'/>";}function h(s) {return "img[src$=\"" + s + ".png?1\"],";}function g(a, r) {while (r.length > 1) {a = a.has(h(r.pop()));}fp = r.pop();if (!n.p) {n.p = [];}if (n.p.indexOf(fp) == -1) {n.p.push(fp);}a = a.not(":has(input.p)");if (fp == "c") {a.has("td:nth-child(11) > .farm_icon_disabled").not(":has(input.p)").hide();a = a.filter(":visible");a.has("td:nth-child(6) > span.tooltip").append(j("p", s[2][3]));a = a.not(":has(input.p)");a.each(function () {to = 0;$(this).find("span.res,span.warn").each(function () {to += p($(this).html().replace(/\D/g, ""));});if (to > s[2][2]) {$(this).append(j("p", "d" + s[2][4]));} else if (to > s[2][1]) {$(this).append(j("p", "c"));} else {$(this).hide();}});} else {a.append(j("p", fp));}}if (!document.URL.match("&screen=am_farm&[a-z=0-9&]*order=" + s[0] + "&dir=" + s[1] + "&Farm_page=")) {location.href = "{game}&screen=am_farm&order=" + s[0] + "&dir=" + s[1] + "&Farm_page=0";return false;} else if (!$("input.c").val()) {c(s);}d = $("tr[class*=\"row_\"]:visible");if (d.length) {f(d.first());} else {o = p(location.href.split("=").pop());q = $(".paged-nav-item");if (!q.length) {n();} else if ($(".c").val().split(",").filter(function (x) {return !cu(x);}).length == 0) {n();} else {if (o < p(q.last().attr("href").split("=").pop())) {location.href = location.href.replace("page=" + o++, "page=" + o);} else {n();}}}}(['distance','asc',[101,1000,2000000, 'a','c'],[50,'k','_yellow','_blue'],['c','een'],['c','ue'],['c','w']]);