Artin Show Radio Shemroon Episode 2890 Sat - Feb 25, 2023

⭕ناهیدشید ۵ اسفند ۲۵۸۱ | فصل ۲۵ |  آدینه ای با شنوندگان رادیو شمرون | اپیزود ۲۸۹۰⭕

⭕ناهیدشید ۵ اسفند ۲۵۸۱ | فصل ۲۵ | آدینه ای با شنوندگان رادیو شمرون | اپیزود ۲۸۹۰⭕

Listen on Spotify

'); } $('.home-media-like').click(function(){ if($(this).data('authenticated') == false){ window.location = 'https://radioshemroon.net/signup'; } this_object = $(this); $(this).children('i').removeClass('animated').removeClass('rotateIn'); $(this_object).toggleClass('active'); var like_count = $(this_object).parent().find('.home-like-count span'); if($(this_object).hasClass('active')){ $(this_object).children('i').addClass('animated').addClass('bounceIn'); like_count.text( parseInt(like_count.text()) + 1 ); } else { like_count.text( parseInt(like_count.text()) - 1 ); } $.post("https://radioshemroon.net/media/add_like", { media_id: $(this).data('id') }, function(data){ }); }); $('.flag_comment').click(function(){ flag_comment($(this)); }); $('#comment-submit').click(function(){ if($('#comment').val().length >= 5){ $('#comment-submit').prepend(' '); var newComment = { comment: $('#comment').val(), media_id: $('#media_id').val() }; $.post("https://radioshemroon.net/comments", newComment, function(data){ comment = JSON.parse(data); if(comment){ $('.comment-loop').prepend( comment_template( comment ) ); $('.delete_comment').on('click', function(){ delete_comment($(this).data('id')); }); $('.edit_comment').on('click', function(){ edit_comment($(this).data('id')); }); $('.flag_comment').on('click', function(){ flag_comment($(this)); }); $('.vote-up').on('click', function(){ vote_up($(this)); }); $('.vote-down').on('click', function(){ vote_down($(this)); }); increment_comment_count(); clear_comment_fields(); } else { var no_spamming_text = "Please allow up to 3 minutes inbetween posting new comments."; var n = noty({text: no_spamming_text, layout: 'top', type: 'error', template: '
', closeWith: ['button'], timeout:2000 }); } $('#comment-submit').children('i').remove(); }); } else { var min_char_comment_text = "Sorry, your comment must be at least 5 characters long"; var n = noty({text: min_char_comment_text, layout: 'top', type: 'error', template: '
', closeWith: ['button'], timeout:2000 }); } }); img_vid_toggle(); }); function img_vid_toggle(){ $('#vid_selected').click(function(){ $(this).addClass('active'); $('#img_selected').removeClass('active'); $('#vid_container').show(); $('#img_container').hide(); }); $('#img_selected').click(function(){ $(this).addClass('active'); $('#vid_selected').removeClass('active'); $('#vid_container').hide(); $('#img_container').show(); }); } function increment_comment_count(){ cur_val = parseInt($('.current_comment_count.site_comments').text()); $('.current_comment_count.site_comments').text(cur_val + 1); } function decrement_comment_count(){ cur_val = $('.current_comment_count').text(); $('.current_comment_count').text(parseInt(cur_val) - 1); } function update_comment_votes(this_object){ $(this_object).parent().find('p').removeClass('animated').addClass('flip'); $.getJSON("https://radioshemroon.net/api/commentvotes/" + String($(this_object).data('commentid')), function(data){ $(this_object).parent().find('p').text(data); $(this_object).parent().find('p').addClass('animated').addClass('flip'); console.log(data); }); } function edit_comment(id){ container = '.comment-'+ id + ' .comment_container'; comment = $(container).find('p.comment_data'); if($(container).find('p.comment_data').css('display') == 'block'){ comment.hide(); if($(container).find('.correct-comment-btn').length != 0){ $(container).find('.correct-comment-btn').hide(); } var cancel_text = "Cancel"; $(container).append('
Update
'+cancel_text+'
'); $(container).find('.update-comment').focus(); bind_update_buttons(); } else { if($(container).find('.correct-comment-btn').length != 0){ $(container).find('.correct-comment-btn').show(); } comment.show(); $('.update-comment').hide(); } } function flag_comment(object){ this_object = $(object); $.post("https://radioshemroon.net/comments/add_flag", { comment_id: $(this_object).data('id') }, function(data){ $.getJSON("https://radioshemroon.net/api/commentflags/" + String($(this_object).data('id')), function(data){ $(this_object).parent().find('.num_flags').text(data); }); }); } function vote_up(object){ this_object = $(object); $.post("https://radioshemroon.net/comments/vote_up", { comment_id: $(this_object).data('commentid') }, function(data){ update_comment_votes(this_object); }); $(this_object).addClass('active'); $(this_object).parent().find('.vote-down').removeClass('active'); } function vote_down(object){ this_object = $(object); $.post("https://radioshemroon.net/comments/vote_down", { comment_id: $(this_object).data('commentid') }, function(data){ update_comment_votes(this_object); }); $(this).addClass('active'); $(this).parent().find('.vote-up').removeClass('active'); } function bind_update_buttons(){ $('.comment-update-cancel').bind('click', function(){ comment_id = $(this).data('commentid'); container = '.comment-'+ comment_id + ' .comment_container'; $(container).find('p.comment_data').show(); $(container).find('.update-comment').hide(); if($(container).find('.correct-comment-btn').length != 0){ $(container).find('.correct-comment-btn').show(); } }); $('.comment-update-update').bind('click', function(){ comment_id = $(this).data('commentid'); container = '.comment-'+ comment_id + ' .comment_container'; var updateComment = { comment: $('.update-comment-'+comment_id).val(), _method: 'PATCH' }; $.post("https://radioshemroon.net/comments"+comment_id, updateComment, function(data){ $(container).find('p.comment_data').html($('.update-comment-'+comment_id).val()); $(container).find('p.comment_data').show(); $(container).find('.update-comment').hide(); }); }); } function comment_template(comment){ if(comment.user_id == $('#user_id').val()){ edit = ''; } else { edit = ''; } votes = '

0

'; return false; } function clear_comment_fields(){ console.log('testclear'); $('#comment').val(''); $('#file_upload').show(); $('#preview_image').attr('src', ''); $('#img_attached').text(''); $('#video_link').val(''); } function delete_comment(id){ $.ajax({ url:"https://radioshemroon.net/comments/"+id, type: 'POST', data: { _method:'DELETE' }, success: function(data){ if(data){ $('.comment-'+id).fadeOut(); decrement_comment_count(); } } }); }