' + cont['title']);$(parent).append($template);});}else{$(noCont).removeClass('d-none');}$(loader).addClass('d-none');$(this).remove();});}$(document).ready(function (){$.ajax({method: "POST",data: {rel_txt: "السعودية",parent: "1675",},url: 'https://alwaffer.com/articles/get-info/580197',async: true,beforeSend: function(){},success: function(data){if (isJson(data)){var jsonData = JSON.parse(data);if (jsonData['Status'] === 'Success'){$('#articleViews').text(jsonData['views'] + ' ' + 'مشاهدة');$('#article-likes').text(jsonData['likes']);$('#article-dislikes').text(jsonData['dislikes']);var $pager = $('#artCont').find('#pagerContainer').clone(),addPager = false;if ( jsonData['Pagination']['Status'] === true ){if ( jsonData['Pagination']['PrevPage'] === false ){$pager.find('#prev_page').addClass('d-none');}else{$pager.find('#prev_page').attr('href', '?page=' + jsonData['Pagination']['PrevPage']);}if ( jsonData['Pagination']['NextPage'] === false ){$pager.find('#next_page').addClass('d-none');}else{$pager.find('#next_page').attr('href', '?page=' + jsonData['Pagination']['NextPage']);}$pager.find('#pager_current').text(jsonData['Pagination']['Current']);$pager.find('#pager_total').text(jsonData['Pagination']['TotalPages']);$pager.removeClass('d-none');addPager = true;}$('#artCont').html(jsonData['Text']);if ( addPager )$('#artCont').append($pager);$('#saCaContainer').find('.data').text(JSON.stringify(jsonData['SameCategory']));$('#toSaCaContainer').find('.data').text(JSON.stringify(jsonData['TopSameCategory']));$('#relContainer').find('.data').text(JSON.stringify(jsonData['Related']));processSections();}}},error: function(jqXHR,error, errorThrown) {},complete:function(data){}});$('.cat-custom-color').each(function (){$(this).css('color', 'rgb(' + $(this).attr('data-color') + ')');});$('.article-likes-btn').click(function (){let $curElm = $(this);$.ajax({method: "POST",data: {page: 'article'},url: $curElm.attr('data-url'),async: true,beforeSend: function(){},success: function(data){if (isJson(data)){var jsonData = JSON.parse(data);if (jsonData['Status'] === 'Success'){switch ($curElm.attr('data-na')){case 'do-like':$('#article-likes').text( parseInt( $('#article-likes').text() ) + 1 );break;case 'do-dislike':$('#article-dislikes').text( parseInt( $('#article-dislikes').text() ) + 1 );break;}}}},error: function(jqXHR,error, errorThrown) {},complete:function(data){}});});});