twister HTML + Javascript User Interface
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.3 KiB

$(function(){
$('.modal-close').html('');
$('.modal-back').html('');
$('.twister-user-remove').html('');
$('.profile-card-main').attr('style', '');
$('img[src$="img/tornado_avatar.png"]').attr("src","theme_nin/img/tornado_avatar.png");
10 years ago
$('.userMenu-search-profiles button').html('').attr('title',polyglot.t('Follow'));
$('.mini-profile-actions span').html('');
$('.post-context').each(function(){
$(this).prependTo($(this).parent());
});
$( '.userMenu-home.current a' ).on( 'click', function() {
$('html, body').animate({scrollTop:0},300);
return false
});
$( ".promoted-posts-only").click(function() {
// modify the way promoted posts are shown
//active promoted posts tab
$(this).children('.promoted-posts').addClass(promotedPostsOnly ? "active" : "disabled");
$(this).children('.normal-posts').addClass(promotedPostsOnly ? "disabled" : "active");
$('#postboard-top').removeClass(promotedPostsOnly ? "show" : "hide");
//active normal posts
$(this).children('.promoted-posts').removeClass(promotedPostsOnly ? "disabled" : "active");
$(this).children('.normal-posts').removeClass(promotedPostsOnly ? "active" : "disabled");
$('#postboard-top').addClass(promotedPostsOnly ? "hide" : "show");
});
$(window).scroll(function(){
posScroll = $(document).scrollTop();
if(posScroll >= 250)
$('.left .post-area-new').slideDown(300);
else
$('.left .post-area-new').slideUp(150);
});
$(".userMenu-search-profiles .follow")
.on("eventToggleFollow", function() {
$(this).text('').attr('title', polyglot.t('Follow'));
})
.on("eventToggleUnfollow", function() {
$(this).text('').attr('title', polyglot.t('Unfollow'));
});
if (/\/options.html$/i.test(document.location))
$(document).ready(localizeLabels);
});
function localizeLabels() {
$("label[for=tab_language]").text(polyglot.t("Language"));
$("label[for=t-2]").text(polyglot.t("Theme"));
$("label[for=t-3]").text(polyglot.t("Notifications"));
$("label[for=t-4]").text(polyglot.t("Keys"));
$("label[for=t-5]").text(polyglot.t("Appearance"));
$("label[for=t-6]").text(polyglot.t("Users"));
}