From 5ffe3faf96590fbfa957de91d7a23585c03594a8 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Mon, 26 Jan 2015 17:35:44 +0100 Subject: [PATCH] follow button css class renamed to work with some adblock lists --- actions/qvitter.php | 2 +- css/qvitter.css | 34 +++++++++++++++++----------------- js/dom-functions.js | 6 +++--- js/qvitter.js | 4 ++-- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/actions/qvitter.php b/actions/qvitter.php index 2348e54..7b58de2 100644 --- a/actions/qvitter.php +++ b/actions/qvitter.php @@ -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, diff --git a/css/qvitter.css b/css/qvitter.css index b809d0b..fcbe113 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -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; diff --git a/js/dom-functions.js b/js/dom-functions.js index 336ae13..cf110da 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -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 = '
'; + var followButton = '
'; } // 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 = '
'; + var followButton = '
'; } // 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 = '
'; + var followButton = '
'; } } diff --git a/js/qvitter.js b/js/qvitter.js index 47578af..4b07dca 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -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 = '
'; + var followButton = '
' + window.sL.userFollowing + '' + window.sL.userUnfollow + '
'; // preview latest notice var noticeHtml = '';