CURRENT ISSUE

N E W S L E T T E R

Issue XXV

July . 2017

 

 

Submission #1

 

 

 

 

 

 

Submission #2

var rMT,rHR;$(document).ready(function(){var catTabBody=$(‘.ab-cat-body’),downButton=’#downVote’,upButton=’#upVote’;getRecords(‘F’);$.ajax({url:’/source/php/content/app.php?cat’,type:”GET”,dataType:’json’,success:function(data){for(var i=0;i<data.length;i++){$(‘.ab-cat-tabs’).append(‘<span class=”ab-cat-tab” data-id=”‘+data[i].id+'”>’+data[i].cat+'</span>’);$(‘#catDD’).append(‘<option value=”‘+data[i].id+'”>’+data[i].cat+'</option>’);};}})setTimeout(function(){$(‘.ab-cat-tab’).click(function(){emptyContent(1);$(‘body’).attr(‘style’,’overflow:inherit;’);$(‘.ab-nav-b-submit’).removeClass(‘ab-nav-b-submit-o’);checkVisible(‘.overlay’,’hide’,’slidefTop’);if($(window).width()<767){$(‘.ab-cat-tabs’).toggleClass(‘catHide’).toggleClass(‘slidecatTop’);}$(‘.ab-cat-body’).addClass(‘pullUp’);$(‘.ab-cat-body’).attr(‘data-content’,true);tabID=$(this).data(‘id’);setTimeout(function(){$(‘.ab-cat-content’).fadeIn();getPageRecords(tabID);},400);})},300);if(getUrlParameter(‘cat’)){emptyContent(1);$(‘body’).css(‘overflow’,’inherit’);$(‘.ab-cat-body’).addClass(‘pullUp’);setTimeout(function(){$(‘.ab-cat-content’).fadeIn();getPageRecords(getUrlParameter(‘cat’));},400);}$(‘.ab-nav-b-submit’).click(function(){$(‘.ab-nav-b-submit’).toggleClass(‘ab-nav-b-submit-o’);if($(window).width()<768){checkVisible(‘.ab-cat-tabs’,’catHide’,’slidecatTop’);}$(‘.overlay’).toggleClass(‘hide’);setTimeout(function(){$(‘.overlay’).toggleClass(‘slidefTop’);}, 200)});$(‘.ab-tabs-m-button’).click(function(){$(‘.ab-nav-b-submit’).removeClass(‘ab-nav-b-submit-o’);checkVisible(‘.overlay’,’hide’,’slidefTop’);$(‘.ab-cat-tabs’).toggleClass(‘catHide’);setTimeout(function(){$(‘.ab-cat-tabs’).toggleClass(‘slidecatTop’);}, 400)});$(‘#abSubmit’).click(function(e){formData=$(‘#abSub’).serialize();var sourceRaw=runUStrip($(‘#sourceURL’));e.preventDefault();$.ajax({url:’/source/php/content/sources.php?record=’+sourceRaw,type:’GET’,dataType:’json’,success:function(data){var sourceName=data[0].name;alert(sourceName);$.ajax({url:’/source/php/content/app.php?save&source=’+sourceName,type:’POST’,data:formData,success:function(data){$(‘#abSub’).each(function(){this.reset();});}})}});})$(document.body).on(‘click’,downButton,function(e){dID=$(‘.ab-vote’).attr(‘data-id’);$.ajax({url:’/source/php/content/app.php?down&id=’+dID,type:’POST’,success:function(){$.ajax({url:’/source/php/content/app.php?return=down&id=’+dID,type:’GET’,dataType:’json’,success:function(data){$(downButton).html(‘<i class=”fa fa-thumbs-down” aria-hidden=”true”></i>’+data[data.length-1].down);}})}})});$(document.body).on(‘click’,upButton,function(e){uID=$(‘.ab-vote’).attr(‘data-id’);$.ajax({url:’/source/php/content/app.php?up&id=’+uID,type:’POST’,success:function(){$.ajax({url:’/source/php/content/app.php?return=up&id=’+uID,type:’GET’,dataType:’json’,success:function(data){$(upButton).html(‘<i class=”fa fa-thumbs-up” aria-hidden=”true”></i>’+data[data.length-1].up);}})}})})$(document.body).on(‘click’, downButton+”C”, function(e){dID=$(this).data(‘id’);$.ajax({url:’/source/php/content/app.php?down&id=’+dID,type:’POST’,success:function(){$.ajax({url:’/source/php/content/app.php?return=down&id=’+dID,type:’GET’,dataType:’json’,success:function(data){$(downButton+’C[data-id=”‘+dID+'”]’).html(‘<i class=”fa fa-thumbs-down” aria-hidden=”true”></i>’+data[data.length – 1].down);}})}})});$(document.body).on(‘click’,upButton+”C”,function(e){uID= $(this).data(‘id’);$.ajax({url:’/source/php/content/app.php?up&id=’+uID,type:’POST’,success:function(){$.ajax({url:’/source/php/content/app.php?return=up&id=’+uID,type:’GET’,dataType:’json’,success:function(data){$(upButton+’C[data-id=”‘+uID+'”]’).html(‘<i class=”fa fa-thumbs-up” aria-hidden=”true”></i>’+data[data.length-1].up);}})}})})if($(window).width()<484){$(‘.ab-main-logo a’).html(‘aF’);}else{$(‘.ab-main-logo a’).html(‘abFacts’);}});function checkVisible(element, hide, selector){if (! $(element).hasClass(hide)){$(element).toggleClass(hide).toggleClass(selector);}}function emptyContent(ident){$(‘.ab-p-item’).hide();$(‘.ab-item-inner’).hide();$(‘.ab-cat-content’).fadeOut();$(‘h1’).empty();$(‘.ab-hl’).hide();$(‘*[data-pop=”‘+ident+'”]’).empty();}function getRecords(id){var getURL=’http://abfacts.loc/get.php?id=&#8217;;if(id===’F’){var query=”;}else{var query=’&sort=’+id;}$.ajax({url:’/source/php/content/app.php?main’+query,type:”GET”,dataType:’json’,success:function(data){var dateData=data[data.length-1].date;$(‘h1’).html(data[data.length-1].text);$(‘.ab-hl-info’).prepend(‘<span class=”ab-item-share”>

</span>’);$(‘.ab-hl-date’).html(formatDate(dateData));$(‘.ab-hl-time’).html(formatTime(dateData));$(‘.ab-hl-source’).html(‘<a href=”‘+data[data.length – 1].source+'” target=”blank”>’+data[data.length – 1].sourcen+'</a>’);$(‘.ab-vote’).attr(‘data-id’,data[data.length-1].id);$(‘#upVote’).html(‘<i class=”fa fa-thumbs-up” aria-hidden=”true”></i>’+data[data.length-1].up);$(‘#downVote’).html(‘<i class=”fa fa-thumbs-down” aria-hidden=”true”></i>’+data[data.length-1].down);}})}function getPageRecords(id){var getURL=’http://abfacts.loc/get.php?id=&#8217;;var catContainer=$(‘.ab-cat-content’);catContainer.empty();if(id===’F’){var query=”;}else{var query=’&sort=’+id;}$.ajax({url:’/source/php/content/app.php?all’+query,type:”GET”,dataType:’json’,success:function(data){for(var i=0;i<data.length;i++){catContainer.append(‘

‘)$(‘.ab-item’+i).find(‘.ab-item-inner’).append(‘<h1>’+data[i].text+'</h1>’);$(‘.ab-item’+i).find(‘.ab-item-inner’).append(‘

‘+data[i].down+’‘+data[i].up+’

‘);$(‘.ab-item’+i).find(‘.ab-item-inner’).append(‘