follow button for external users directly

This commit is contained in:
Hannes Mannerheim 2016-02-11 14:29:42 +01:00
parent 6023bf8a87
commit 6909aea0ba

View File

@ -361,21 +361,19 @@ function buildProfileCard(data) {
var followButton = ''; var followButton = '';
// only add follow button if this is a local user // follow from external instance if logged out and the user is local
if(data.is_local == true) { if(window.loggedIn === false && data.is_local == true) {
if(typeof window.loggedIn.screen_name != 'undefined' && window.loggedIn.id != data.id) { followButton = '<div class="user-actions"><button type="button" class="external-follow-button"><span class="button-text follow-text"><i class="follow"></i>' + window.sL.userExternalFollow + '</span></button></div>';
followButton = buildFollowBlockbutton(data); }
}
// follow from external instance if logged out // edit profile button if it's me
if(typeof window.loggedIn.screen_name == 'undefined') { else if(window.loggedIn !== false && window.loggedIn.id == data.id) {
followButton = '<div class="user-actions"><button type="button" class="external-follow-button"><span class="button-text follow-text"><i class="follow"></i>' + window.sL.userExternalFollow + '</span></button></div>'; followButton = '<div class="user-actions"><button type="button" class="edit-profile-button"><span class="button-text edit-profile-text">' + window.sL.editMyProfile + '</span></button></div>';
} }
// edit profile button if me // follow button for logged in users
if(typeof window.loggedIn.screen_name != 'undefined' && window.loggedIn.id == data.id) { else if(window.loggedIn !== false) {
followButton = '<div class="user-actions"><button type="button" class="edit-profile-button"><span class="button-text edit-profile-text">' + window.sL.editMyProfile + '</span></button></div>'; followButton = buildFollowBlockbutton(data);
}
} }
// is webpage empty? // is webpage empty?