Advertisement
SalimFadhil

rename villages

Sep 30th, 2018
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. javascript:
  2. (function($){
  3. if(document.URL.indexOf('screen=overview_villages') == -1){
  4. alert('السكربت يعمل من الشكل العام');
  5. }else{
  6.     $('#combined_table').before('<center><h4 style="color:Black">تم تعديل السكربت من قبل: <a style="color:MediumBlue" href="https://forum.tribalwars.ae/index.php?members/abu-rajih.38997/" font-family="Times New Roman" target="_blank">Abu.Rajih</a></h4></center>');
  7.     $('#combined_table').before('<center><button  class="btn evt-confirm-btn btn-confirm-yes" id = "S">تسمية القرى بارقام</button><button  class="btn evt-cancel-btn btn-confirm-no" id = "N">تسمية القرى بدون ارقام</button></center>');
  8.     $('#production_table').before('<center><h4 style="color:Black">تم تعديل السكربت من قبل: <a style="color:MediumBlue" href="https://forum.tribalwars.ae/index.php?members/abu-rajih.38997/" font-family="Times New Roman" target="_blank">Abu.Rajih</a></h4></center>');
  9.     $('#production_table').before('<center><button  class="btn evt-confirm-btn btn-confirm-yes" id = "S">تسمية القرى بارقام</button><button  class="btn evt-cancel-btn btn-confirm-no" id = "N">تسمية القرى بدون ارقام</button></center>');
  10.     $('#S').click(function () {
  11.     $('.rename-icon').click();
  12. var P = prompt('أدخل اسم القرى :');
  13.         if(P == null){return false;}else{}
  14.     $('#content_value').each(function (i) {
  15.     $(this).find('input:first').val(P + ' ' + (i <= 9 ? '00' : i <= 99 ? '0' : '') + i);
  16. });
  17. $('#combined_table tbody tr input[value="موافق"]').click();
  18. $('#production_table tbody tr input[value="موافق"]').click();
  19. });
  20.     $('#N').click(function () {
  21.     $(function () {
  22.     $('#content_value').prepend("<center><table class='vis' align='center' style='border: 1px solid #7D510F;margin: 15px 5px;box-shadow: 1px 1px 2px 1px rgba(60, 30, 0, 0.2);'><tbody><tr><th  align='center' colspan='3'>تغير الاسم:</th></tr><tr><td><input  align='center' id='same' type='text' size='32' minlength='3' maxlength='32' placeholder='ضع الاسم مثلا سيد الاساطير' name='name'></input></td><td><input id='name' class='btn' type='submit' value='تغير'></input></td></tr></tbody></table></center></br>");
  23.     $('#name').click(function () {
  24.     $('.quickedit-content').find('.rename-icon').click();
  25. var same = $('#same').val();
  26.     $('#content_value').each(function () {
  27.     $(this).find('.quickedit-edit input:nth-child(1)').val(same);
  28. });
  29. $('#combined_table tbody tr td  input[value="موافق"]').click();
  30. $('#production_table tbody tr td  input[value="موافق"]').click();
  31. });
  32. });
  33. });
  34. }
  35. })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement