diff --git a/css/profile.css b/css/profile.css index 54b5916..bd5ea8e 100644 --- a/css/profile.css +++ b/css/profile.css @@ -254,19 +254,18 @@ } #msngrswr { display: none; - margin-left: 10px; - margin-top: 10px; - height: 40px; + margin-top: 20px; + height: 30px; } #toxbtnwr, #bmbtnwr { float: left; display: none; } .bitmessage-ctc, .tox-ctc { - height: 35px; + height: 30px; width: 30px; display: inline-block; - margin-right: 10px; + margin-right: 5px; border: 1px solid #d6d8dc; background: #e3e5ea url(img/clipboard.png) center no-repeat; opacity: .8; @@ -289,8 +288,8 @@ } .profile-modal .profile-tox, .profile-modal .profile-bitmessage { display: inline-block; - width: 80px; - height: 35px; + width: 70px; + height: 30px; border: 1px solid #c0c2c6; opacity: .8; -webkit-border-radius: 5px 0 0 5px; @@ -360,6 +359,7 @@ button.follow:hover { position: absolute; top: 0; height: 100%; + width: 99%; box-sizing: border-box; border-top: 292px solid transparent; overflow: auto; diff --git a/css/style.css b/css/style.css index 26e80e3..a38e13d 100644 --- a/css/style.css +++ b/css/style.css @@ -1259,7 +1259,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder { .image-preview { max-height: 500px; - width: 100%; + max-width: 100%; } .preview-container { @@ -1973,6 +1973,15 @@ input.userMenu-search-field:focus::-ms-input-placeholder { .following ol.following-list .mini-profile-info button { margin-top: 5px; } +.gifCheckBox { + float: right; + vertical-align: middle; +} +.optionsPage .module label { + font: 14px "Open Sans", sans-serif; + display: block; + float: right; +} /* Autocomplite*/ .textcomplete-wrapper textarea { diff --git a/img/bm.png b/img/bm.png index b014f9c..0b5afc1 100644 Binary files a/img/bm.png and b/img/bm.png differ diff --git a/img/tox.png b/img/tox.png index c6a526c..69ea4f6 100644 Binary files a/img/tox.png and b/img/tox.png differ diff --git a/js/calm.js b/js/calm.js index 2a3b9be..bf3be62 100644 --- a/js/calm.js +++ b/js/calm.js @@ -1,6 +1,5 @@ $(function(){ $('.dropdown-menu').on('keydown', function(e){ - e = event || window.event; e.stopPropagation(); }) $('.post-text').on('click', 'a', function(e){ diff --git a/js/interface_common.js b/js/interface_common.js index da9493f..083cee7 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -448,11 +448,11 @@ var postSubmit = function(e) var remainingCount = tweetForm.find(".post-area-remaining"); remainingCount.text(140); $replyText.attr("placeholder", "Your message was sent!"); - closeModal($this); + if($this.closest('.post-area,.post-reply-content')){ $('.post-area-new').removeClass('open').find('textarea').blur(); }; - setTimeout('requestTimelineUpdate("latest",postsPerRefresh,followingUsers,promotedPostsOnly)', 1000); + setTimeout('requestTimelineUpdate("latest",postsPerRefresh,followingUsers,promotedPostsOnly)', 2000); } diff --git a/js/options.js b/js/options.js index a940b91..3f51a1a 100644 --- a/js/options.js +++ b/js/options.js @@ -103,9 +103,24 @@ function setTheme() { function setShowPreviewOpt(){ $('#displayPreview').val(localStorage['showPreviewOpt'] || "enable"); + $('input[type="checkbox"]').prop('checked', localStorage['showPreviewOptGif'] == 'true') + + if(localStorage['showPreviewOpt'] == 'disable'){ + $('input[type="checkbox"]').prop('disabled', true) + } + if(!localStorage['showPreviewOpt']) localStorage['showPreviewOpt'] = "enable"; + $('#displayPreview').on('change', function(){ localStorage['showPreviewOpt'] = $(this).val(); + switch($(this).val()){ + case 'enable': $('.gifCheckBox').prop('disabled', false); break; + case 'disable': $('.gifCheckBox').prop('disabled', true); break; + } + }) + + $('input[type="checkbox"]').on('click', function(){ + localStorage[$(this).attr('name')] = $(this).prop('checked') }) } diff --git a/js/twister_formatpost.js b/js/twister_formatpost.js index cb306f3..f3b010d 100644 --- a/js/twister_formatpost.js +++ b/js/twister_formatpost.js @@ -296,9 +296,10 @@ function imagePreview(post) { if (localStorage['showPreviewOpt'] == 'enable') { var link = post.find("a[rel='nofollow']"); var linkAnon = 'https://ssl-proxy.my-addr.org/myaddrproxy.php/http/'; - if (link.html() && /(\.jpg)|(\.gif)|(\.png)|(\.jpeg)/.test(link.html().toLowerCase())) + if (link.html() && /(\.jpg)|(\.gif)|(\.png)|(\.jpeg)|(\.jpe)/.test(link.html().toLowerCase())) { - var cleanLink = link.html().replace(/^http[s]?:\/\//i, '') + var cleanLink = link.html().replace(/^http[s]?:\/\//i, ''); + if(/\.gif\b/i.test(cleanLink) && localStorage['showPreviewOptGif'] == 'false') return; return ""; } } diff --git a/options.html b/options.html index bd7b30c..4e598af 100644 --- a/options.html +++ b/options.html @@ -140,9 +140,10 @@