From 100bd648a9307c01e41d8aa025adfa28c63e0637 Mon Sep 17 00:00:00 2001 From: kPherox Date: Sat, 23 Mar 2019 05:51:22 +0900 Subject: [PATCH 1/5] Fix paste image when image copied from web browser --- app/js/post/img.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/app/js/post/img.js b/app/js/post/img.js index b0ad3421..cc3c45b9 100644 --- a/app/js/post/img.js +++ b/app/js/post/img.js @@ -183,22 +183,20 @@ function toBlob(base64, type) { var element = document.querySelector("#textarea"); element.addEventListener("paste", function(e){ console.log(e) - // 画像の場合 - // e.clipboardData.types.length == 0 - // かつ - // e.clipboardData.types[0] == "Files" - // となっているので、それ以外を弾く - if (!e.clipboardData - || !e.clipboardData.types - || (e.clipboardData.types.length != 1) - || (e.clipboardData.types[0] != "Files")) { - console.log("not image") - return true; + if (!e.clipboardData || !e.clipboardData.items) { + return true; + } + // DataTransferItemList に画像が含まれいない場合は終了する + var imageItems = [...e.clipboardData.items].filter(i => i.type.startsWith('image')); + if (imageItems.length == 0) { + console.log("not image") + return true; } // ファイルとして得る - // (なぜかgetAsStringでは上手くいかなかった) - var imageFile = e.clipboardData.items[0].getAsFile(); + // DataTransferItem の kind は file なので getAsString ではなく getAsFile を呼ぶ + var imageFile = imageItems[0].getAsFile(); + var imageType = imageItems[0].type; // FileReaderで読み込む var fr = new FileReader(); @@ -209,7 +207,8 @@ element.addEventListener("paste", function(e){ if(mediav){ var i=mediav.split(",").length; } - media(base64, "image/png", i) + // DataTransferItem の type に mime tipes があるのでそれを使う + media(base64, imageType, i) }; fr.readAsDataURL(imageFile); From 4aa14a14a25ddd5d0fa8c36aa2fc8380b54b392b Mon Sep 17 00:00:00 2001 From: Cutls Date: Fri, 29 Mar 2019 02:12:25 +0900 Subject: [PATCH 2/5] TheDesk Usain (18.1.2) --- app/view/en/index.html | 2 +- app/view/en/update.html | 24 ++++++++++-------------- app/view/ja/index.html | 2 +- app/view/ja/update.html | 24 ++++++++++-------------- app/view/make/update.sample.html | 24 ++++++++++-------------- app/view/ps/index.html | 2 +- app/view/ps/update.html | 24 ++++++++++-------------- 7 files changed, 43 insertions(+), 59 deletions(-) diff --git a/app/view/en/index.html b/app/view/en/index.html index c7344587..2be31bcb 100644 --- a/app/view/en/index.html +++ b/app/view/en/index.html @@ -32,7 +32,7 @@ @@ -78,11 +75,10 @@ a,button,input,label,i{

Get latest TheDesk



- - - Snap ver may be on Snapcraft
- - + + + +
Some problems?
Please download on Oficial HP. @@ -184,12 +180,12 @@ function verck(){ var remote=electron.remote; var platform=remote.process.platform; var bit=process.arch; - if(platform=="linux"){ - $('.windows').hide() - $('.linux').show() - }else if(platform=="mac"){ - $('.windows').hide() - $('.mac').show() + if(platform=="win32"){ + $('.windows').removeClass("hide") + }else if(platform=="linux"){ + $('.linux').removeClass("hide") + }else if(platform=="darwin"){ + $('.mac').removeClass("hide") } var start="https://thedesk.top/ver.json"; fetch(start, { diff --git a/app/view/ja/index.html b/app/view/ja/index.html index d482729e..91352038 100644 --- a/app/view/ja/index.html +++ b/app/view/ja/index.html @@ -32,7 +32,7 @@ @@ -78,11 +75,10 @@ a,button,input,label,i{

アップデートがあります



- - - snap版はSnapcraft等よりDLしてください。
- - + + + +
問題が発生しますか?
公式HPからダウンロードをお試しください。 @@ -184,12 +180,12 @@ function verck(){ var remote=electron.remote; var platform=remote.process.platform; var bit=process.arch; - if(platform=="linux"){ - $('.windows').hide() - $('.linux').show() - }else if(platform=="mac"){ - $('.windows').hide() - $('.mac').show() + if(platform=="win32"){ + $('.windows').removeClass("hide") + }else if(platform=="linux"){ + $('.linux').removeClass("hide") + }else if(platform=="darwin"){ + $('.mac').removeClass("hide") } var start="https://thedesk.top/ver.json"; fetch(start, { diff --git a/app/view/make/update.sample.html b/app/view/make/update.sample.html index 2de4c573..f9cca1c8 100644 --- a/app/view/make/update.sample.html +++ b/app/view/make/update.sample.html @@ -62,9 +62,6 @@ a,button,input,label,i{ #prog{ font-size:200%; } -.linux, .mac{ - display:none; -} @@ -78,11 +75,10 @@ a,button,input,label,i{

{{updatehere}}



- - - {{snap}}
- - + + + +
{{problem1}}
{{problem2}} @@ -184,12 +180,12 @@ function verck(){ var remote=electron.remote; var platform=remote.process.platform; var bit=process.arch; - if(platform=="linux"){ - $('.windows').hide() - $('.linux').show() - }else if(platform=="mac"){ - $('.windows').hide() - $('.mac').show() + if(platform=="win32"){ + $('.windows').removeClass("hide") + }else if(platform=="linux"){ + $('.linux').removeClass("hide") + }else if(platform=="darwin"){ + $('.mac').removeClass("hide") } var start="https://thedesk.top/ver.json"; fetch(start, { diff --git a/app/view/ps/index.html b/app/view/ps/index.html index 46f9d2fb..4d7f0704 100644 --- a/app/view/ps/index.html +++ b/app/view/ps/index.html @@ -32,7 +32,7 @@ @@ -78,11 +75,10 @@ a,button,input,label,i{

crwdns669:0crwdne669:0



- - - crwdns2384:0crwdne2384:0
- - + + + +
crwdns678:0crwdne678:0
crwdns679:0crwdne679:0 @@ -184,12 +180,12 @@ function verck(){ var remote=electron.remote; var platform=remote.process.platform; var bit=process.arch; - if(platform=="linux"){ - $('.windows').hide() - $('.linux').show() - }else if(platform=="mac"){ - $('.windows').hide() - $('.mac').show() + if(platform=="win32"){ + $('.windows').removeClass("hide") + }else if(platform=="linux"){ + $('.linux').removeClass("hide") + }else if(platform=="darwin"){ + $('.mac').removeClass("hide") } var start="https://thedesk.top/ver.json"; fetch(start, { From 2ce9f55f28c1d7a6d93d51f4eb9859c4fc51bf03 Mon Sep 17 00:00:00 2001 From: Cutls Date: Fri, 29 Mar 2019 02:37:20 +0900 Subject: [PATCH 3/5] edit margin --- app/css/tl.css | 1 + 1 file changed, 1 insertion(+) diff --git a/app/css/tl.css b/app/css/tl.css index 5a12900b..31daf889 100644 --- a/app/css/tl.css +++ b/app/css/tl.css @@ -112,6 +112,7 @@ iframe { border-top:none; display:flex; flex-direction: column; + margin-bottom: -10px; } .boxIn{ height:100%; From f2ff82c8106717183d84bd31fe84eb49155c123b Mon Sep 17 00:00:00 2001 From: kPherox Date: Fri, 29 Mar 2019 18:10:15 +0900 Subject: [PATCH 4/5] Fix TweetDeck height --- app/js/ui/layout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/ui/layout.js b/app/js/ui/layout.js index 3af085f5..9a6bee76 100644 --- a/app/js/ui/layout.js +++ b/app/js/ui/layout.js @@ -433,7 +433,7 @@ function webviewParse(url,key,insert,icnsert,css){ ')" class="setting nex" title="'+lang.lang_layout_setthis +'"'+icnsert+'>settings'+ '
'+lang.lang_layout_headercolor +'
'+lang.lang_layout_headercolor +'
'; return html; @@ -453,4 +453,4 @@ function leftFoldRemove(key){ var json = JSON.stringify(obj); localStorage.setItem("column", json); parseColumn(); -} \ No newline at end of file +} From 0df8baa7bfdcec8174b54e2abb55e770b3642370 Mon Sep 17 00:00:00 2001 From: Cutls Date: Tue, 2 Apr 2019 23:42:25 +0900 Subject: [PATCH 5/5] TheDesk Usamin (18.1.2) Plus --- app/css/tl.css | 6 ++++++ app/js/lang/lang.en.js | 1 + app/js/lang/lang.ja.js | 1 + app/js/tl/filter.js | 10 ++++++++++ app/js/tl/parse.js | 3 +++ app/js/ui/layout.js | 1 + app/view/en/index.html | 6 +++--- app/view/en/setting.html | 2 +- app/view/ja/index.html | 6 +++--- app/view/ja/setting.html | 2 +- app/view/make/index.sample.html | 6 +++--- app/view/make/language/index.en.json | 1 + app/view/make/language/index.ja.json | 1 + app/view/make/setting.sample.html | 2 +- app/view/ps/index.html | 6 +++--- app/view/ps/setting.html | 2 +- 16 files changed, 40 insertions(+), 16 deletions(-) diff --git a/app/css/tl.css b/app/css/tl.css index 31daf889..04fbd169 100644 --- a/app/css/tl.css +++ b/app/css/tl.css @@ -114,6 +114,12 @@ iframe { flex-direction: column; margin-bottom: -10px; } +.img_FTL{ + display:none; +} +.bbcode_FTL{ + display:none; +} .boxIn{ height:100%; border: thin solid gray; diff --git a/app/js/lang/lang.en.js b/app/js/lang/lang.en.js index 56ec973a..37320ed2 100644 --- a/app/js/lang/lang.en.js +++ b/app/js/lang/lang.en.js @@ -153,6 +153,7 @@ var lang={ "lang_parse_faved":" favourited your toot", "lang_parse_bted":" boosted your toot", "lang_parse_btedsimple":" boosted", + "lang_parse_polled":"'s poll", "lang_parse_notftime":"Actioned at", "lang_parse_cwshow":"Show", "lang_parse_fulltext":"Full size text:", diff --git a/app/js/lang/lang.ja.js b/app/js/lang/lang.ja.js index 8d12d44e..4dacbf4b 100644 --- a/app/js/lang/lang.ja.js +++ b/app/js/lang/lang.ja.js @@ -153,6 +153,7 @@ var lang={ "lang_parse_faved":"がお気に入り登録しました", "lang_parse_bted":"がブーストしました", "lang_parse_btedsimple":"がブースト", + "lang_parse_polled":"のアンケート", "lang_parse_notftime":"通知された時間", "lang_parse_cwshow":"見る", "lang_parse_fulltext":"以下全文", diff --git a/app/js/tl/filter.js b/app/js/tl/filter.js index 09cc104c..f4a5fa0a 100644 --- a/app/js/tl/filter.js +++ b/app/js/tl/filter.js @@ -421,6 +421,16 @@ function exclude(key){ }else{ excludetxt="?exclude_types[]=follow" } + var follow=true; + }else{ + var follow=false; + } + if($('#exc-poll-'+key+':checked').val()){ + if(reply || bt || fav || follow){ + excludetxt=excludetxt+"&exclude_types[]=poll" + }else{ + excludetxt="?exclude_types[]=poll" + } }else{ } localStorage.setItem("exclude-"+key,excludetxt) diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index b29c91f3..1f0e1541 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -228,6 +228,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { if(!locale && localStorage.getItem("fav_" + acct_id)){ what = localStorage.getItem("fav_" + acct_id); } + } else if (toot.type == "poll") { + var what = lang.lang_parse_polled; + var icon = "fa-tasks purple-text"; } var noticetext = '' + date(toot.created_at, diff --git a/app/js/ui/layout.js b/app/js/ui/layout.js index 9a6bee76..b024f4e6 100644 --- a/app/js/ui/layout.js +++ b/app/js/ui/layout.js @@ -146,6 +146,7 @@ function parseColumn() { ' '+ ' '+ ' '+ + ' '+ '
'; }else if(acct.type=="home"){ var exclude=' Support on Enty - - Osushi.love: give me sushi - + + Support on Pixiv FANBOX + Amazon Wish List diff --git a/app/view/en/setting.html b/app/view/en/setting.html index 5e6b00f2..923165a0 100644 --- a/app/view/en/setting.html +++ b/app/view/en/setting.html @@ -350,10 +350,10 @@ webWebsite trending_upSupport(Enty) +trending_upSupport(Pixiv FANBOX) listHelp/Docs(Constructing) GitHub Developer: Cutls@kirishima.cloud -Give me a sushi!
Kyash

diff --git a/app/view/ja/index.html b/app/view/ja/index.html index 91352038..fc12c2dd 100644 --- a/app/view/ja/index.html +++ b/app/view/ja/index.html @@ -608,9 +608,9 @@ var tlid=0; Entyで支援 - - Osushi.loveで寿司を贈る - + + Pixiv FANBOXで支援 + Amazonほしいものリスト diff --git a/app/view/ja/setting.html b/app/view/ja/setting.html index 7a41a942..d8006b68 100644 --- a/app/view/ja/setting.html +++ b/app/view/ja/setting.html @@ -350,10 +350,10 @@ web公式HP trending_up支援(Enty) +trending_up支援(Pixiv FANBOX) listヘルプ/Docs(Constructing) GitHub Developer: Cutls@kirishima.cloud -寿司を投げる
Kyash

diff --git a/app/view/make/index.sample.html b/app/view/make/index.sample.html index 1808935e..c9503230 100644 --- a/app/view/make/index.sample.html +++ b/app/view/make/index.sample.html @@ -608,9 +608,9 @@ var tlid=0; {{EntySupport}} - - {{sendSushi}} - + + {{PixivSupport}} + {{AWLSupport}} diff --git a/app/view/make/language/index.en.json b/app/view/make/language/index.en.json index 12e5cdb8..136f19c1 100644 --- a/app/view/make/language/index.en.json +++ b/app/view/make/language/index.en.json @@ -105,6 +105,7 @@ "supportme":"Support TheDesk!", "TheDeskDes":"TheDesk has no ad, you need no charge to unlock premium features. We need your friendly support!", "EntySupport":"Support on Enty", + "PixivSupport":"Support on Pixiv FANBOX", "AWLSupport":"Amazon Wish List", "SendAmazonGift1":"Give me Amazon Gift Card:", "SendAmazonGift2":"", diff --git a/app/view/make/language/index.ja.json b/app/view/make/language/index.ja.json index 1839852d..5fab7702 100644 --- a/app/view/make/language/index.ja.json +++ b/app/view/make/language/index.ja.json @@ -105,6 +105,7 @@ "supportme":"ご支援ください。", "TheDeskDes":"TheDeskは営利目的ではないため、有料機能や広告は一切ありません。
皆様のあたたかいご支援のもとで製作されています。", "EntySupport":"Entyで支援", + "PixivSupport":"Pixiv FANBOXで支援", "AWLSupport":"Amazonほしいものリスト", "SendAmazonGift1":"", "SendAmazonGift2":"にAmazonギフトカードを送る", diff --git a/app/view/make/setting.sample.html b/app/view/make/setting.sample.html index 90144751..fa711ef3 100644 --- a/app/view/make/setting.sample.html +++ b/app/view/make/setting.sample.html @@ -350,10 +350,10 @@ web@@hp@@ trending_up@@support@@(Enty) +trending_up@@support@@(Pixiv FANBOX) list@@help@@/Docs(Constructing) GitHub Developer: Cutls@kirishima.cloud -@@sushi@@
Kyash

diff --git a/app/view/ps/index.html b/app/view/ps/index.html index 4d7f0704..4cc12d69 100644 --- a/app/view/ps/index.html +++ b/app/view/ps/index.html @@ -608,9 +608,9 @@ var tlid=0; crwdns475:0crwdne475:0 - - crwdns479:0crwdne479:0 - + + {{PixivSupport}} + crwdns476:0crwdne476:0 diff --git a/app/view/ps/setting.html b/app/view/ps/setting.html index f3dc8de6..6f63eb79 100644 --- a/app/view/ps/setting.html +++ b/app/view/ps/setting.html @@ -350,10 +350,10 @@ webcrwdns663:0crwdne663:0 trending_upcrwdns664:0crwdne664:0(Enty) +trending_upcrwdns664:0crwdne664:0(Pixiv FANBOX) listcrwdns665:0crwdne665:0/Docs(Constructing) GitHub Developer: Cutls@kirishima.cloud -crwdns666:0crwdne666:0
Kyash