").attr("class","responsive_left").append($(".right_column").children()));
$(".right_column").remove();
}
else if($(window).width() >= 1200 && responsive_design == true) {
responsive_design = false;
$(".article_wrap").append($("
").attr("class","right_column").append($(".responsive_left").children()));
$(".responsive_left").remove();
}
});
$(function() {
$('input[type="file"]').val('');
});
$(function() {
$(document).on('click','a', function(e) {
e.stopPropagation();
});
$(document).on('keypress',"input.disallow_enter[type='text']", function(e) {
if((e.which == 13) || (e.keyCode == 13)){ return false; }
});
$(document).on('click','.follow_button', function(e) {
e.stopPropagation();
if ($(this).attr('mid') !== null) {
api.post('accounts/'+$(this).attr('mid')+'/follow', function (data) {
});
} else if ($(this).attr('data')!== null) {
api.post("follows", {uri:$(this).attr('data')}, function (data) {
});
}
$(this).toggleClass('follow_button');
$(this).toggleClass('following_button');
$(this).html('
'+__('Following')+'');
return false;
});
$(document).on('click','.following_button', function(e) {
e.stopPropagation();
if ($(this).attr('mid') !== null) {
api.post('accounts/'+$(this).attr('mid')+'/unfollow', function (data) {
});
}
$(this).toggleClass('following_button');
$(this).toggleClass('follow_button');
$(this).html('
'+__('Follow')+'');
return false;
});
$(document).on('click','.mute_button', function(e) {
e.stopPropagation();
const mid = $(this).attr('mid');
$("#js-overlay_content_wrap .temporary_object").empty();
$('#js-overlay_content_wrap').addClass('view');
$('#js-overlay_content_wrap').addClass('black_08');
$('.overlay_confirm').removeClass('invisible');
$('.overlay_confirm_text').text(__("Are you sure that you want to mute this user?"));
$('.overlay_confirm_yes').click(function() {
$('.close_button').click();
api.post('accounts/'+mid+'/mute', function (data) {
putMessage(__("You'll no longer receive notifications from this user"));
return false;
});
});
});
$(document).on('click','.muting_button', function(e) {
if($(this).attr('mid')!=null) {
api.post('accounts/'+$(this).attr('mid')+'/unmute', function (data) {
});
}
$(this).toggleClass('muting_button');
$(this).toggleClass('follow_button');
$(this).html('
'+__('Follow')+'');
putMessage(__("Unmuted this user"));
return false;
});
$(document).on('click','.block_button', function(e) {
e.stopPropagation();
const mid = $(this).attr('mid');
$("#js-overlay_content_wrap .temporary_object").empty();
$('#js-overlay_content_wrap').addClass('view');
$('#js-overlay_content_wrap').addClass('black_08');
$('.overlay_confirm').removeClass('invisible');
$('.overlay_confirm_text').text(__("Are you sure that you want to block this user?"));
$('.overlay_confirm_yes').click(function() {
$('.close_button').click();
api.post('accounts/'+mid+'/block', function (data) {
putMessage(__("This user has been blocked"));
return false;
});
});
});
$(document).on('click','.blocking_button', function(e) {
e.stopPropagation();
if ($(this).attr('mid') !== null) {
api.post('accounts/'+$(this).attr('mid')+'/unblock', function (data) {
});
}
$(this).toggleClass('blocking_button');
$(this).toggleClass('follow_button');
$(this).html('
'+__('Follow')+'');
putMessage(__("Unblocked this user"));
return false;
});
$(document).on('click','.boost_button', function(e) {
e.stopPropagation();
if($(this).attr('reblogged') !== 'true'){
api.post("statuses/"+$(this).attr('tid')+"/reblog", function (data) {
});
$(this).attr('reblogged', "true");
$(this).toggleClass('active');
$(".js_current_toots_count").html(++localStorage.current_statuses_count);
} else {
api.post("statuses/"+$(this).attr('tid')+"/unreblog", function (data) {
});
$(this).attr('reblogged', "hold");
$(this).toggleClass('active');
$(".js_current_toots_count").html(--localStorage.current_statuses_count);
$(this).mouseout(function(e) {
$(this).attr('reblogged', "null");
});
}
return false;
});
$(document).on('click','.fav_button', function(e) {
e.stopPropagation();
if($(this).attr('favourited') !== 'true'){
api.post("statuses/"+$(this).attr('tid')+"/favourite", function (data) {
});
$(this).attr('favourited', "true");
$(this).toggleClass('active');
} else {
api.post("statuses/"+$(this).attr('tid')+"/unfavourite", function (data) {
});
$(this).attr('favourited', "hold");
$(this).toggleClass('active');
$(this).mouseout(function(e) {
$(this).attr('favourited', "null");
});
}
return false;
});
$(document).on('click','.delete_button', function(e) {
const sid = $(this).attr('tid');
e.stopPropagation();
$("#js-overlay_content_wrap .temporary_object").empty();
$('#js-overlay_content_wrap').addClass('view');
$('#js-overlay_content_wrap').addClass('black_08');
$('.overlay_confirm').removeClass('invisible');
$('.overlay_confirm_text').text(__("Are you sure that you want to delete this toot?"));
$('.overlay_confirm_yes').click(function() {
$('.close_button').click();
api.delete("statuses/"+sid, function (data) {
if($('.toot_entry[sid="'+sid+'"] .reply_button').attr("privacy") != "direct") $(".js_current_toots_count").html(--localStorage.current_statuses_count);
$('.toot_entry[sid="'+sid+'"]').remove();
putMessage(__("Your Toot has been deleted"));
});
});
});
$(document).on('click','.pin_button', function(e) {
const sid = $(this).attr('tid');
api.post("statuses/"+sid+"/pin", function (data) {
$('.toot_entry[sid="'+sid+'"] .pin_button').removeClass("pin_button").addClass("unpin_button").text(__("Unpin Toot"));
putMessage(__("Your Toot has been pinned"));
});
});
$(document).on('click','.unpin_button', function(e) {
const sid = $(this).attr('tid');
api.post("statuses/"+sid+"/unpin", function (data) {
$('.toot_entry[sid="'+sid+'"] .unpin_button').removeClass("unpin_button").addClass("pin_button").text(__("Pin Toot"));
putMessage(__("Your Toot has been unpinned"));
});
});
$(document).on('click','.addlist_button',function(e) {
const mid = $(this).attr('mid');
e.stopPropagation();
$("#js-overlay_content_wrap .temporary_object").empty();
$('#js-overlay_content_wrap').addClass('view');
$('#js-overlay_content_wrap').addClass('black_08');
$('.overlay_addlist').removeClass('invisible');
$('.overlay_addlist .overlay_simple_header span').html(__('Add to list')+": "+$(this).attr('display_name'));
replace_emoji();
api.get("lists",function(data) {
api.get("accounts/"+mid+"/lists",function(data2) {
var inlists = new Array();
if(typeof data2 == "object") {
for(var i=0;i
").addClass("overlay_addlist_item").append(
$("").addClass("emoji_poss").text(data[i].title)).append(
$("