From 8d0001a29cef68a611201640c3e54eda790aaa5d Mon Sep 17 00:00:00 2001 From: Hedgehog Date: Fri, 28 Mar 2014 06:25:00 +0400 Subject: [PATCH] added ability to enable/disable GIF image preview and jpe image format added ability to enable/disable GIF image preview and jpe image format --- css/profile.css | 14 +++++++------- css/style.css | 11 ++++++++++- img/bm.png | Bin 1567 -> 4928 bytes img/tox.png | Bin 884 -> 3093 bytes js/calm.js | 1 - js/interface_common.js | 4 ++-- js/options.js | 15 +++++++++++++++ js/twister_formatpost.js | 5 +++-- options.html | 5 +++-- 9 files changed, 40 insertions(+), 15 deletions(-) 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 b014f9c82fcad7849d3305774c34ce8bd49175b0..0b5afc10beff9ee14751590f62d382d48a922222 100644 GIT binary patch literal 4928 zcmZuzXIPWV)(u5^^GFjxVuTL0s<0{ zE&@iH^p12co^x*b?sw;TX5N|ouC>dW`LUyQ?!)M5IA{O>06kno^})sW?!{!IqPSR1 z0x+il0F9Epii!?gMFpti;c8>=WDNjl&}XNjAL>o8MiKCm_<=t_K;B&rKWg9?84VV4 z-Dr5Q4rydK*hlq}I`d`zM^+C%kieoqmTJtjVWAdd)Z0utovpg6YV%VVN9v6V@tx_6 z(=OD^#A5B(gzZM)SOY-kB$T|(3rP|zmWO0sUuiY^<4SMGFH&|U5(Xs62cnG)IqX1{ zboc}>m!AGwqZ7Bk4hgnuoD^u$0eg;~KTQBhs_;+%Xw*g|WP`wL^Q6goxQ|yw&dGar zQ}{(9g+*BNsPoG~vmI4V`^5`)8b76B!E<>WsQ#->VmX*bo#_l-VgZIc&nS)eyKO-L zr8WK`JOeQQ>(doKzn?lG< zIE$#Y+I&%Qk(O#-9~}dhV0HS7>3sHsl>O&V?E+c3AK11ce(LM~Or{Qxwrh-#4ME03 ztZ2fYju4-+OYl)%4a#<8w(~Xx1V%{d)WIpcUF85OH_3Qh6#Pg7R}7hiX}X)6>?#tf zJmW#B`O{cfM2uU4lB)5 z(UIG|>BZ4NWgK?&l5zkjMsZ3K7=Ag8bjX~39PmDPqFRQN3f9*9UDcN*i<0fbBvG@D zRi2@?jg5G16Ce;_+LlD6*iA(?sE(w%wxy~ZkK`e_e8VvTR7hH)mJ!cTc&$EGBf))+ zj3O$}JdK^T^XhCA3PZGbWIk%4DKwI1nf6GVZ9&3@Ni^gz^p(ZPn<6A%xq=V1#O2Ib z!H!2}ab||q*f(V3=BqNC3|$|t{@`>As$(}2aS^X1uVoy=GzPD<(-Xm4zD>8MnKwci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jO#X_(n00000NkvXXu0mjfs3_mC literal 884 zcmV-)1B?8LP)8Mw0009!NklRIJFIou@F+Dw>RL?xv)h8FgK=4s#)D_rzI=uJwJP*9XoMp~3o z(S?s>8B1bXt48V)qavHrObyY^x^Q#49Z7c12}T!x4m)V)!n*MFyZhXH-~2)V&@jx? z63TRGver?TS*QVkNxl#Vz&x8=R$%~f`^5d^33qzLR%|rozxtVt=4vtnz_VV{q10s* z0gNzLzXt&Dx_PQh^{t>{HFEjV830$SF&2k?qZhz9_v;qYYa0M+jg}F!Cjyv&{nCOq zt5T5_bBmAUGTB~GV3o(j09`(?6!4eTfGKtZMr#ICh5-eL3L=J(AX0KmgO~#rivhUS z5H%xO zI>3AgTj`L48o@ZfS#7Z*h1P==+8wstZ~$o;8Jq_sk@;t%4v^3Sn#=*r0(4pl%1lt~ zcJPTGAY!SYh($b+bsM|_QwTIHt;lnN>Z-2mcV1fSUe=BOGx=1Hw+ceft- z_yd$G0dSL%;2?lafO!@GwhkWC2I%*vd^7_#Dgtp^06PKG)q)nicpr@S%wREV)O*x? zFB>NxZ|eayj@zcu@2bHm9|JZ38o**1@RkuoL~N09XxBVu@{!T(3tzjGz#O3dHn1l#kY5hIKM0000< KMNUMnLSTYml74Xj 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 @@

Inline image preview

+