if(document.URL.indexOf('screen=overview_villages')==-1){alert("السكربت يعمل من الشكل العام")}else{
$('#production_table') .before('
');
$('#production_table') .before('');
$('#production_table') .before('');
$('#production_table') .before('');
$('#production_table') .before('');
$('#production_table') .before('');
var url = document.URL
$("#B1").click(function(){ if (document.URL.indexOf('/game.php?village=' +game_data.village.id +'&page=-1&order=points&dir=desc&mode=prod&group=0&screen=overview_villages')==-1){
location.search = '/game.php?village=' + game_data.village.id + '&page=-1&order=points&dir=desc&mode=prod&group=0&screen=overview_villages';
}else{javascript:
$(".rename-icon").click();
var P = prompt("أدخل اسم القرى :");
$(".quickedit-edit").each(function(i){
$(this).find("input:first").val(P+" "+(i <= 9 ? "00" : i <= 99 ? "0" : "")+i);
$(this).find("input:last").click();
});
void(0); }
});
$("#B2").click(function(){ if (document.URL.indexOf('/game.php?village=' + game_data.village.id + '&page=-1&order=storage&dir=desc&mode=prod&group=0&screen=overview_villages')==-1){
location.search = '/game.php?village=' + game_data.village.id + '&page=-1&order=storage&dir=desc&mode=prod&group=0&screen=overview_villages';
}else{javascript:
$(".rename-icon").click();
var P = prompt("أدخل اسم القرى :");
$(".quickedit-edit").each(function(i){
$(this).find("input:first").val(P+" "+(i <= 9 ? "00" : i <= 99 ? "0" : "")+i);
$(this).find("input:last").click();
});
void(0); }
});
$("#B3").click(function(){ if (document.URL.indexOf('/game.php?village=' + game_data.village.id + '&page=-1&order=pop&dir=desc&mode=prod&group=0&screen=overview_villages')==-1){
location.search = '/game.php?village=' + game_data.village.id + '&page=-1&order=pop&dir=desc&mode=prod&group=0&screen=overview_villages';
}else{javascript:
$(".rename-icon").click();
var P = prompt("أدخل اسم القرى :");
$(".quickedit-edit").each(function(i){
$(this).find("input:first").val(P+" "+(i <= 9 ? "00" : i <= 99 ? "0" : "")+i);
$(this).find("input:last").click();
});
void(0); }
});
$("#B4").click(function(){$(".rename-icon").click();
var P = prompt("أدخل اسم القرى :");
$(".quickedit-edit").each(function(i){
$(this).find("input:first").val(P+" "+(i <= 9 ? "00" : i <= 99 ? "0" : "")+i);
$(this).find("input:last").click();
});
void(0);
});
$("#B5").click(function(){$(function(){
$("#content_value").prepend ("");
$("#name").click(function(){
$(".quickedit-content").find(".rename-icon").click();
var same = $("#same").val();
$("#content_value").each(function(){
$(this).find(".quickedit-edit input:nth-child(1)").val(same);
$(".quickedit-edit input:nth-child(2)").click();
});
});
});
});
};