follow button css class renamed to work with some adblock lists

This commit is contained in:
Hannes Mannerheim 2015-01-26 17:35:44 +01:00
parent 98eea46b16
commit 5ffe3faf96
4 changed files with 23 additions and 23 deletions

View File

@ -235,7 +235,7 @@ class QvitterAction extends ApiAction
.menu-container,
.member-button.member,
.external-follow-button.following,
.follow-button.following,
.qvitter-follow-button.following,
.save-profile-button,
.crop-and-save-button,
.topbar .global-nav.show-logo:before,

View File

@ -88,7 +88,7 @@ button.icon.nav-search,
.member-button .join-text i,
.external-member-button .join-text i,
.external-follow-button .follow-text i,
.follow-button .follow-text i,
.qvitter-follow-button .follow-text i,
#logo,
.upload-cover-photo,
.upload-avatar,
@ -3105,7 +3105,7 @@ div.clearfix {
.member-button,
.external-member-button,
.external-follow-button,
.follow-button,
.qvitter-follow-button,
.edit-profile-button,
.save-profile-button,
.abort-edit-profile-button,
@ -3137,7 +3137,7 @@ div.clearfix {
cursor: pointer;
text-shadow: rgba(0, 0, 0, 0.15) 0px -1px 1px;
}
.follow-button,
.qvitter-follow-button,
.edit-profile-button,
.abort-edit-profile-button,
.member-button {
@ -3148,7 +3148,7 @@ div.clearfix {
.external-member-button.disabled,
.member-button.disabled,
.external-follow-button.disabled,
.follow-button.disabled,
.qvitter-follow-button.disabled,
.edit-profile-button.disabled,
.save-profile-button.disabled,
.crop-and-save-button.disabled {
@ -3158,13 +3158,13 @@ div.clearfix {
.external-member-button.disabled i,
.member-button.disabled i,
.external-follow-button.disabled i,
.follow-button.disabled i {
.qvitter-follow-button.disabled i {
opacity:0.2;
}
.external-member-button:not(.disabled):not(.member):hover,
.member-button:not(.disabled):not(.member):hover,
.external-follow-button:not(.disabled):not(.following):hover,
.follow-button:not(.disabled):not(.following):hover,
.qvitter-follow-button:not(.disabled):not(.following):hover,
.edit-profile-button:hover,
.abort-edit-profile-button:hover,
button.shorten:not(.disabled):hover,
@ -3175,7 +3175,7 @@ button.shorten:not(.disabled):hover,
.external-member-button:not(.disabled):not(.member):active,
.member-button:not(.disabled):not(.member):active,
.external-follow-button:not(.disabled):not(.following):active,
.follow-button:not(.disabled):not(.following):active,
.qvitter-follow-button:not(.disabled):not(.following):active,
button.shorten:not(.disabled):active {
background: none;
background-color: #D8D8D8;
@ -3185,7 +3185,7 @@ button.shorten:not(.disabled):active {
.external-member-button .button-text,
.member-button .button-text,
.external-follow-button .button-text,
.follow-button .button-text,
.qvitter-follow-button .button-text,
.edit-profile-button .button-text,
.save-profile-button .button-text,
.abort-edit-profile-button .button-text,
@ -3198,7 +3198,7 @@ button.shorten:not(.disabled):active {
.external-member-button .join-text,
.member-button .join-text,
.external-follow-button .follow-text,
.follow-button .follow-text {
.qvitter-follow-button .follow-text {
padding: 0 10px 0 40px;
text-align:right;
min-width: 0;
@ -3206,7 +3206,7 @@ button.shorten:not(.disabled):active {
.external-member-button .join-text i,
.member-button .join-text i,
.external-follow-button .follow-text i,
.follow-button .follow-text i {
.qvitter-follow-button .follow-text i {
background-position: -90px -92px;
display: block;
height: 28px;
@ -3217,7 +3217,7 @@ button.shorten:not(.disabled):active {
}
.member-button.member,
.external-follow-button.following,
.follow-button.following,
.qvitter-follow-button.following,
.save-profile-button,
.crop-and-save-button {
color:#fff;
@ -3228,7 +3228,7 @@ button.shorten:not(.disabled):active {
}
.member-button.member:hover,
.external-follow-button.following:hover,
.follow-button.following:hover {
.qvitter-follow-button.following:hover {
background-color: #c43c35;
background: -moz-linear-gradient(top, rgba(238,95,91,1) 0%, rgba(196,60,53,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(238,95,91,1)), color-stop(100%,rgba(196,60,53,1)));
@ -3242,7 +3242,7 @@ button.shorten:not(.disabled):active {
.external-member-button .join-text,
.member-button .join-text,
.external-follow-button .follow-text,
.follow-button .follow-text,
.qvitter-follow-button .follow-text,
.edit-profile-button .edit-profile-text,
.save-profile-button .edit-profile-text,
.abort-edit-profile-button .edit-profile-text,
@ -3253,28 +3253,28 @@ button.shorten:not(.disabled):active {
}
.member-button.member .join-text,
.external-follow-button.following .follow-text,
.follow-button.following .follow-text {
.qvitter-follow-button.following .follow-text {
display:none;
height: 28px;
line-height: 28px;
}
.member-button.member .ismember-text,
.external-follow-button.following .following-text,
.follow-button.following .following-text {
.qvitter-follow-button.following .following-text {
display:block;
height: 28px;
line-height: 28px;
}
.member-button.member:hover .ismember-text,
.external-follow-button.following:hover .following-text,
.follow-button.following:hover .following-text {
.qvitter-follow-button.following:hover .following-text {
display:none;
height: 28px;
line-height: 28px;
}
.member-button.member:hover .leave-text,
.external-follow-button.following:hover .unfollow-text,
.follow-button.following:hover .unfollow-text {
.qvitter-follow-button.following:hover .unfollow-text {
display:block;
height: 28px;
line-height: 28px;

View File

@ -141,7 +141,7 @@ function profileCardFromFirstObject(data,screen_name) {
}
var followButton = '';
if(typeof window.loggedIn.screen_name != 'undefined' && window.myUserID != first.user.id) {
var followButton = '<div class="user-actions"><button data-follow-user-id="' + first.user.id + '" data-follow-user="' + first.user.statusnet_profile_url + '" type="button" class="follow-button ' + followingClass + '"><span class="button-text follow-text"><i class="follow"></i>' + window.sL.userFollow + '</span><span class="button-text following-text">' + window.sL.userFollowing + '</span><span class="button-text unfollow-text">' + window.sL.userUnfollow + '</span></button></div>';
var followButton = '<div class="user-actions"><button data-follow-user-id="' + first.user.id + '" data-follow-user="' + first.user.statusnet_profile_url + '" type="button" class="qvitter-follow-button ' + followingClass + '"><span class="button-text follow-text"><i class="follow"></i>' + window.sL.userFollow + '</span><span class="button-text following-text">' + window.sL.userFollowing + '</span><span class="button-text unfollow-text">' + window.sL.userUnfollow + '</span></button></div>';
}
// follow from external instance if logged out
@ -195,7 +195,7 @@ function profileCardFromFirstObject(data,screen_name) {
}
var followButton = '';
if(typeof window.loggedIn.screen_name != 'undefined' && window.myUserID != data.id) {
var followButton = '<div class="user-actions"><button data-follow-user-id="' + data.id + '" data-follow-user="' + data.statusnet_profile_url + '" type="button" class="follow-button ' + followingClass + '"><span class="button-text follow-text"><i class="follow"></i>' + window.sL.userFollow + '</span><span class="button-text following-text">' + window.sL.userFollowing + '</span><span class="button-text unfollow-text">' + window.sL.userUnfollow + '</span></button></div>';
var followButton = '<div class="user-actions"><button data-follow-user-id="' + data.id + '" data-follow-user="' + data.statusnet_profile_url + '" type="button" class="qvitter-follow-button ' + followingClass + '"><span class="button-text follow-text"><i class="follow"></i>' + window.sL.userFollow + '</span><span class="button-text following-text">' + window.sL.userFollowing + '</span><span class="button-text unfollow-text">' + window.sL.userUnfollow + '</span></button></div>';
}
// follow from external instance if logged out
@ -1553,7 +1553,7 @@ function addToFeed(feed, after, extraClasses, isReply) {
if(typeof window.loggedIn.screen_name != 'undefined' // if logged in
&& window.myUserID != obj.id) { // not if this is me
if(!(obj.statusnet_profile_url.indexOf('/twitter.com/')>-1 && obj.following === false)) { // only unfollow twitter users
var followButton = '<div class="user-actions"><button data-follow-user-id="' + obj.id + '" data-follow-user="' + obj.statusnet_profile_url + '" type="button" class="follow-button ' + followingClass + '"><span class="button-text follow-text"><i class="follow"></i>' + window.sL.userFollow + '</span><span class="button-text following-text">' + window.sL.userFollowing + '</span><span class="button-text unfollow-text">' + window.sL.userUnfollow + '</span></button></div>';
var followButton = '<div class="user-actions"><button data-follow-user-id="' + obj.id + '" data-follow-user="' + obj.statusnet_profile_url + '" type="button" class="qvitter-follow-button ' + followingClass + '"><span class="button-text follow-text"><i class="follow"></i>' + window.sL.userFollow + '</span><span class="button-text following-text">' + window.sL.userFollowing + '</span><span class="button-text unfollow-text">' + window.sL.userUnfollow + '</span></button></div>';
}
}

View File

@ -546,7 +546,7 @@ $('body').on('click','.external-member-button',function(event){
·
· · · · · · · · · · · · · */
$('body').on('click','.follow-button',function(event){
$('body').on('click','.qvitter-follow-button',function(event){
if(!$(this).hasClass('disabled')) {
$(this).addClass('disabled');
@ -923,7 +923,7 @@ $('body').on('click','a', function(e) {
var serverUrl = data.statusnet_profile_url.replace('/' + data.screen_name,'');
var userApiUrl = serverUrl + '/api/statuses/user_timeline.json?screen_name=' + data.screen_name;
var screenNameWithServer = '@' + data.screen_name + '@' + serverUrl.replace('http://','').replace('https://','');
var followButton = '<div class="user-actions"><button' + followLocalIdHtml + ' data-follow-user="' + data.statusnet_profile_url + '" type="button" class="follow-button ' + followingClass + '"><span class="button-text follow-text"><i class="follow"></i>' + window.sL.userFollow + '</span><span class="button-text following-text">' + window.sL.userFollowing + '</span><span class="button-text unfollow-text">' + window.sL.userUnfollow + '</span></button></div>';
var followButton = '<div class="user-actions"><button' + followLocalIdHtml + ' data-follow-user="' + data.statusnet_profile_url + '" type="button" class="qvitter-follow-button ' + followingClass + '"><span class="button-text follow-text"><i class="follow"></i>' + window.sL.userFollow + '</span><span class="button-text following-text">' + window.sL.userFollowing + '</span><span class="button-text unfollow-text">' + window.sL.userUnfollow + '</span></button></div>';
// preview latest notice
var noticeHtml = '';