Compare commits

..

2 Commits

Author SHA1 Message Date
cutls
5db42cd9f0 fix 2020-01-05 22:42:58 +09:00
cutls
e7599a05f8 initial 2020-01-05 22:38:58 +09:00
224 changed files with 4768 additions and 8089 deletions

2
.github/FUNDING.yml vendored
View File

@@ -5,4 +5,4 @@ patreon: cutls
open_collective: # Replace with a single Open Collective username open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: https://cutls.fanbox.cc custom: https://www.pixiv.net/fanbox/creator/28105985

1
.gitignore vendored
View File

@@ -23,4 +23,3 @@ app/view/es-AR
app/git app/git
*.code-workspace *.code-workspace
releasenote.md releasenote.md
app/yarn-error.log

View File

@@ -28,6 +28,7 @@ The icon is provided under [Creative Commons BY-NC-SA](https://creativecommons.o
* [SVG 4095x4096](https://d2upiril6ywqp9.cloudfront.net/press/thedesk-fullcolor.svg) * [SVG 4095x4096](https://d2upiril6ywqp9.cloudfront.net/press/thedesk-fullcolor.svg)
* [ico 256x256](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.ico) * [ico 256x256](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.ico)
* [icns old](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.icns) * [icns old](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.icns)
* [Illustrator .ai](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.ai)
The default sounds of notifications is provided [Creative Commons BY](https://creativecommons.org/licenses/by/4.0/) The default sounds of notifications is provided [Creative Commons BY](https://creativecommons.org/licenses/by/4.0/)
@@ -46,6 +47,19 @@ The default sounds of notifications is provided [Creative Commons BY](https://cr
Crowdin project is available! Visit: https://translate.thedesk.top Crowdin project is available! Visit: https://translate.thedesk.top
## Requirement and development
* Electron 4.2 or above(install yourself)
* electron-dl(in package.json)
* Jimp(in package.json)
* font-manager(in package.json)
* Python 2.x(install yourself)
* VisualC++(Windows)(install yourself)
* itunes-nowplaying-mac(for macOS)(in package.json)
* node-notifier(in package.json)
* sumchecker(in package.json)
* Ability to read unformated files!(install yourself)
### Run on developer mode ### Run on developer mode
`npm run dev` on `app` folder. `npm run dev` on `app` folder.
@@ -145,17 +159,6 @@ Linux
macOS macOS
`electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=darwin --arch=all --electron-version=4.0.5 --icon=./app/icon.icns --overwrite` `electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=darwin --arch=all --electron-version=4.0.5 --icon=./app/icon.icns --overwrite`
### PWA support
TheDesk is a wed-based app, so you can run it on a browser. Of course, the main stream is as Electron. Some features won't work as well as Electron.
You can run `npm run build:pwa` to build as PWA, including `manifest.json` and the ServiceWorker.
**You have to rename `node_modules` to `dependencies` to run as a web application. (restricted by Netlify)**
Check the app on Chrome or Firefox: [Here](https://app.thedesk.top) (it follows the `master` branch, so not stable.)
[![Netlify Status](https://api.netlify.com/api/v1/badges/6916503b-2882-43f7-9681-ab814e6d28f9/deploy-status)](https://app.netlify.com/sites/thedesk/deploys)
## Pleroma support ## Pleroma support
Did you find a bug with Pleroma accounts? Did you find a bug with Pleroma accounts?
@@ -165,3 +168,4 @@ Please write issues to improve TheDesk affinity with Pleroma.
## Vulnerabilities when `npm i`??? ## Vulnerabilities when `npm i`???
No, if your npm says materialize-css has vulnerabilities(CVE-2019-11002/3/4), look at [here](https://github.com/Dogfalo/materialize/issues/6286) under discussion. No, if your npm says materialize-css has vulnerabilities(CVE-2019-11002/3/4), look at [here](https://github.com/Dogfalo/materialize/issues/6286) under discussion.

View File

@@ -46,6 +46,19 @@ Download:[TheDesk](https://thedesk.top) [![check](https://status.cutls.com/badge
Crowdinから翻訳に参加してみませんか: https://translate.thedesk.top Crowdinから翻訳に参加してみませんか: https://translate.thedesk.top
## 環境
* Electron 4.2以上(自分で入れて)
* electron-dl(in package.json)
* Jimp(in package.json)
* font-manager(in package.json)
* Python 2.x(自分で入れて)
* VisualC++(Windows)(自分で入れて)
* itunes-nowplaying-mac(macOS向け)(in package.json)
* node-notifier(in package.json)
* sumchecker(in package.json)
* Ability to read unformated files!(自分で入れて)
### デベロッパーモード ### デベロッパーモード
`npm run dev``app`フォルダ内で実行 `npm run dev``app`フォルダ内で実行
@@ -145,17 +158,6 @@ Linux
macOS macOS
`electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=darwin --arch=all --electron-version=4.0.5 --icon=./app/icon.icns --overwrite` `electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=darwin --arch=all --electron-version=4.0.5 --icon=./app/icon.icns --overwrite`
### PWAとして実行
TheDeskはウェブ技術を使用して作られているので、ブラウザで動かすこともできます。もちろん、Electron向けに設計されているので一部機能は動きません。
`npm run build:pwa`でビルドできます。PWAに必要な`manifest.json`やサービスワーカーなども要員されています。
**`node_modules``dependencies`にリネームしないと動きません。(Netlifyの制限です)**
ChromeまたはFirefoxでチェック: [こちら](https://app.thedesk.top) (`master`ブランチに追従しています。不安定です。)
[![Netlify Status](https://api.netlify.com/api/v1/badges/6916503b-2882-43f7-9681-ab814e6d28f9/deploy-status)](https://app.netlify.com/sites/thedesk/deploys)
## Pleromaのサポート ## Pleromaのサポート
Pleromaは、Mastodon APIとの互換性を謳っていますが、実際には様々な差異があり、TheDeskで不具合が発生することがあります。 Pleromaは、Mastodon APIとの互換性を謳っていますが、実際には様々な差異があり、TheDeskで不具合が発生することがあります。

View File

@@ -1,139 +1,135 @@
<!DOCTYPE html> <!doctype html>
<html lang="ja"> <html lang="ja">
<head>
<title>TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport" />
<link href="./node_modules/materialize-css/dist/css/materialize.css" type="text/css" rel="stylesheet" />
<link href="./css/font-awesome.css" rel="stylesheet" type="text/css" />
<link href="./css/themes.css" type="text/css" rel="stylesheet" />
<link href="./css/master.css" type="text/css" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300|Baloo+Bhai" rel="stylesheet" />
<meta charset="utf-8" />
<style>
body {
font-family: 'Open Sans';
-webkit-app-region: drag;
cursor: move;
padding: 5px;
padding-top: 15px;
}
a, <head>
button { <title>TheDesk</title>
-webkit-app-region: no-drag; <meta content="width=device-width,initial-scale=1.0" name="viewport">
} <link href="./node_modules/materialize-css/dist/css/materialize.css" type="text/css" rel="stylesheet">
<link href='./css/font-awesome.css' rel='stylesheet' type='text/css'>
<link href="./css/themes.css" type="text/css" rel="stylesheet">
<link href="./css/master.css" type="text/css" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300|Baloo+Bhai" rel="stylesheet">
<meta charset="utf-8">
<style>
body {
font-family: 'Open Sans';
-webkit-app-region: drag;
cursor: move;
padding: 5px;
padding-top: 15px;
}
.container { a,
width: 100%; button {
display: grid; -webkit-app-region: no-drag;
grid-template-columns: 1fr 1fr; }
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
grid-template-areas: 'name1 data1' 'name2 data2' 'name3 data3' 'name4 data4' 'name5 data5' 'name6 data6';
text-align: left;
margin: 5px;
}
.area-name1 { .container {
grid-area: name1; width: 100%;
} display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
grid-template-areas: 'name1 data1''name2 data2''name3 data3''name4 data4''name5 data5''name6 data6';
text-align: left;
margin: 5px;
}
.area-data1 { .area-name1 {
grid-area: data1; grid-area: name1;
} }
.area-name2 { .area-data1 {
grid-area: name2; grid-area: data1;
} }
.area-data2 { .area-name2 {
grid-area: data2; grid-area: name2;
} }
.area-name3 { .area-data2 {
grid-area: name3; grid-area: data2;
} }
.area-data3 { .area-name3 {
grid-area: data3; grid-area: name3;
} }
.area-name4 { .area-data3 {
grid-area: name4; grid-area: data3;
} }
.area-data4 { .area-name4 {
grid-area: data4; grid-area: name4;
} }
.area-name5 { .area-data4 {
grid-area: name5; grid-area: data4;
} }
.area-data5 { .area-name5 {
grid-area: data5; grid-area: name5;
} }
.area-name6 { .area-data5 {
grid-area: name6; grid-area: data5;
} }
.area-data6 { .area-name6 {
grid-area: data6; grid-area: name6;
} }
</style>
</head>
<body class="center" style="overflow: hidden;"> .area-data6 {
<script type="text/javascript" src="./node_modules/jquery/dist/jquery.js"></script> grid-area: data6;
<script type="text/javascript" src="./js/platform/first-not-view.js"></script> }
<script type="text/javascript" src="./node_modules/materialize-css/dist/js/materialize.js"></script> </style>
<img src="./img/desk.svg" style="max-width: 62%;" /> </head>
<h5>TheDesk</h5>
<div class="container"> <body class="center " style="overflow:hidden">
<div class="area-name1">Display version</div> <script type="text/javascript" src="./node_modules/jquery/dist/jquery.js"></script>
<div class="area-data1" id="now"></div> <script type="text/javascript" src="./js/platform/first-not-view.js"></script>
<div class="area-name2">Internal version</div> <script type="text/javascript" src="./node_modules/materialize-css/dist/js/materialize.js"></script>
<div class="area-data2" id="ver"></div> <img src="./img/desk.svg" style="max-width:62%;">
<div class="area-name3">Commit(7chars)</div> <h5>TheDesk</h5>
<div class="area-data3" id="hash"></div> <div class="container">
<div class="area-name4">Chromium</div> <div class="area-name1">Display version</div>
<div class="area-data4" id="chrome"></div> <div class="area-data1" id="now"></div>
<div class="area-name5">Electron</div> <div class="area-name2">Internal version</div>
<div class="area-data5" id="electron"></div> <div class="area-data2" id="ver"></div>
<div class="area-name6">Node.js</div> <div class="area-name3">Commit(7chars)</div>
<div class="area-data6" id="node"></div> <div class="area-data3" id="hash"></div>
</div> <div class="area-name4">Chromium</div>
<div class="cp"> <div class="area-data4" id="chrome"></div>
Copyright &copy; TheDesk 2018<br /> <div class="area-name5">Electron</div>
Main developer(author): <a href="https://cutls.com/@Cutls" target="_blank">Cutls P</a><br /> <div class="area-data5" id="electron"></div>
Thanks:<a href="https://minohdon.jp/@toneji" target="_blank">toneji</a>/<a href="https://popon.pptdn.jp/@popn_ja" target="_blank">popn_ja</a>/<a <div class="area-name6">Node.js</div>
href="https://pl.kpherox.dev/kPherox" <div class="area-data6" id="node"></div>
target="_blank" </div>
>kPherox</a <div class="cp">Copyright &copy; TheDesk 2018<br>
> Main developer(author): <a href="https://cutls.com/@Cutls" target="_blank">Cutls P</a><br>
and all users Thanks:<a href="https://minohdon.jp/@toneji" target="_blank">toneji</a>/<a
<img draggable="false" style="width: 0.8rem; top: 1px; margin-left: 1px; position: relative;" alt="❤️" title=":heart:" src="https://twemoji.maxcdn.com/2/72x72/2764.png" /> href="https://popon.pptdn.jp/@popn_ja" target="_blank">popn_ja</a>/<a href="https://pl.kpherox.dev/kPherox"
<br /><a href="https://thedesk.top" target="_blank">Web site</a> target="_blank">kPherox</a> and all users
</div> <img draggable="false" style="width:0.8rem;top: 1px;margin-left: 1px;position: relative;" alt="❤️"
<button onclick="window.close()" class="btn waves-effect indigo" style="width: calc(100% - 10px);"><i class="material-icons left">close</i>Close</button> title=":heart:" src="https://twemoji.maxcdn.com/2/72x72/2764.png">
<script type="text/javascript" src="./js/ui/theme.js"></script> <br><a href="https://thedesk.top" target="_blank">Web site</a></div>
<script> <button onclick="window.close()" class="btn waves-effect indigo" style="width:calc(100% - 10px);"><i
var about = JSON.parse(localStorage.getItem('about')) class="material-icons left">close</i>Close</button>
$('#now').text(localStorage.getItem('ver')) <script type="text/javascript" src="./js/ui/theme.js"></script>
$('#node').text(about[0]) <script>
$('#chrome').text(about[1]) var about = JSON.parse(localStorage.getItem("about"));
$('#electron').text(about[2]) $("#now").text(localStorage.getItem("ver"));
if (location.search) { $("#node").text(about[0]);
var m = location.search.match(/\?ver=([a-zA-Z-0-9.]+)/) $("#chrome").text(about[1]);
var ver = m[1] $("#electron").text(about[2]);
$('#ver').text(ver) if (location.search) {
} var m = location.search.match(/\?ver=([a-zA-Z-0-9.]+)/);
$('#hash').html('<a href="https://github.com/cutls/TheDesk/commits/' + about[3] + '" target="_blank">' + about[3].slice(0, 7) + '</a>') var ver = m[1];
$(document).on('click', 'a', (e) => { $("#ver").text(ver);
var url = $(e.target).attr('href') }
postMessage(['openUrl', url], '*') $("#hash").html('<a href="https://github.com/cutls/TheDesk/commits/' + about[3] + '" target="_blank">' + about[3].slice(0, 7) + '</a>');
return false $(document).on('click', 'a', e => {
}) var url = $(e.target).attr('href');
</script> postMessage(["openUrl", url], "*")
</body> return false;
</html> });
</script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -48,12 +48,6 @@ html {
.first .hide-first { .first .hide-first {
display: none; display: none;
} }
.hide-second {
display: none;
}
.first .hide-second {
display: inline;
}
#compt { #compt {
margin-top: 20px; margin-top: 20px;

View File

@@ -1,608 +1,544 @@
/*共通CSS*/ /*共通CSS*/
html, html,
body { body {
/*transform: translate3d(0,0,0);*/ /*transform: translate3d(0,0,0);*/
overflow: hidden; overflow: hidden;
user-select: none; user-select: none;
cursor: default; cursor: default;
height: 100vh; font-size: 13px;
color: var(--color); height: 100vh;
color: var(--color);
} }
html { .btn {
font-size: 13px; margin: 5px;
} text-transform: none;
.titlebar,
.menubar-menu-container,
.action-menu-item {
background-color: var(--notfbox) !important;
filter: brightness(110%) !important;
color: var(--color) !important;
}
.action-menu-item:hover {
filter: brightness(80%) !important;
}
.btn, .btn-flat {
font-size: 1.1rem;
margin: 0.4rem;
text-transform: none;
height: 2.76rem;
line-height: 2.76rem;
} }
.markdown { .markdown {
display: none; display: none;
} }
.accessMark { help {
font-size: 12px; display: none;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
background-color: var(--emphasized);
padding-left: 5px;
padding-right: 5px;
}
.accessibility .scr {
display: none !important;
} }
.show-help { .show-help {
display: inline; display: inline;
} }
option { option {
display: none; display: none;
} }
#mainView { #mainView {
padding: 10px; padding: 10px;
overflow: scroll; overflow: scroll;
height: auto; height: auto;
} }
#message { #message {
display: none; display: none;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
background-color: black; background-color: black;
color: white; color: white;
z-index: 9999; z-index: 9999;
} }
#imagemodal, #imagemodal,
#videomodal { #videomodal {
display: none; display: none;
max-width: 100vw; max-width: 100vw;
max-height: 100vh; max-height: 100vh;
position: fixed; position: fixed;
z-index: 9; z-index: 9;
top: 0 !important; top: 0 !important;
} }
#videomodal, #videomodal,
#tootmodal { #tootmodal {
background-color: var(--modal); background-color: var(--modal);
} }
#imagemodal .modal-content { #imagemodal .modal-content {
overflow: hidden; overflow: hidden;
padding: 0; padding: 0;
} }
#imagemodal .modal-footer { #imagemodal .modal-footer {
overflow-x: hidden; overflow-x: scroll;
overflow-y: hidden; overflow-y: hidden;
} }
#imagewrap { #imagewrap {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }
.badge { .badge {
min-width: 0 !important; min-width: 0 !important;
margin-left: 0.4rem !important; margin-left: 5px !important;
} }
.unvisible { .unvisible {
opacity: 0; opacity: 0;
} }
.bbcode-pulse-loadings, .bbcode-pulse-loadings,
.bbcode-pulse-loading, .bbcode-pulse-loading,
.fa-pulse { .fa-pulse {
display: inline-block; display: inline-block;
animation-duration: 3s; animation-duration: 3s;
animation-fill-mode: both; animation-fill-mode: both;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-name: pulse; animation-name: pulse;
} }
@keyframes pulse { @keyframes pulse {
from, from,
50%, 50%,
to { to {
opacity: 1; opacity: 1;
} }
25%, 25%,
75% { 75% {
opacity: 0; opacity: 0;
} }
} }
@keyframes shake { @keyframes shake {
from, from,
to { to {
-webkit-transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0);
} }
10%, 10%,
30%, 30%,
50%, 50%,
70%, 70%,
90% { 90% {
-webkit-transform: translate3d(-10px, 0, 0); -webkit-transform: translate3d(-10px, 0, 0);
transform: translate3d(-10px, 0, 0); transform: translate3d(-10px, 0, 0);
} }
20%, 20%,
40%, 40%,
60%, 60%,
80% { 80% {
-webkit-transform: translate3d(10px, 0, 0); -webkit-transform: translate3d(10px, 0, 0);
transform: translate3d(10px, 0, 0); transform: translate3d(10px, 0, 0);
} }
} }
.shake { .shake {
display: inline-block; display: inline-block;
animation-duration: 1s; animation-duration: 1s;
animation-fill-mode: both; animation-fill-mode: both;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-name: shake; animation-name: shake;
} }
code:before, code:before,
.pre:before { .pre:before {
content: 'Code'; content: "Code";
font-size: 1.8rem; font-size: 1.8rem;
line-height: 1em; line-height: 1em;
font-family: monospace, monospace; font-family: monospace, monospace;
color: #999; color: #999;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
} }
code, code,
pre { pre {
color: white; color: white;
display: block; display: block;
border-left: 5px solid; border-left: 5px solid;
border-color: #079903; border-color: #079903;
padding-left: 0.75rem; padding-left: 10px;
margin-top: 0.75rem; margin-top: 5px;
margin-bottom: 0.75rem; margin-bottom: 5px;
margin-left: 0.75rem; margin-left: 5px;
background-color: #000; background-color: #000;
padding: 1em 1em 1em; padding: 1em 1em 1em;
position: relative; position: relative;
border-top-left-radius: 0.75rem; border-top-left-radius: 10px;
border-bottom-right-radius: 0.75rem; border-bottom-right-radius: 10px;
border-bottom-left-radius: 0.75rem; border-bottom-left-radius: 10px;
white-space: normal;
} }
blockquote, blockquote,
.quote p { .quote p {
margin: 0; margin: 0;
} }
blockquote, blockquote,
.quote { .quote {
color: black; color: black;
background-color: #ddd; background-color: #ddd;
padding: 1em 1em 1em; padding: 1em 1em 1em;
position: relative; position: relative;
border-top-left-radius: 0.75rem; border-top-left-radius: 10px;
border-bottom-right-radius: 0.75rem; border-bottom-right-radius: 10px;
border-bottom-left-radius: 0.5rem; border-bottom-left-radius: 10px;
} }
blockquote:before, blockquote:before,
.quote:before { .quote:before {
content: 'Quote'; content: "Quote";
font-size: 1.8rem; font-size: 1.8rem;
line-height: 1em; line-height: 1em;
font-family: Open Sans, cursive; font-family: Open Sans, cursive;
color: #999; color: #999;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
} }
.pixiv-post { .pixiv-post {
color: black; color: black;
background-color: #fff; background-color: #fff;
padding: 1em 1em 1em; padding: 1em 1em 1em;
position: relative; position: relative;
border-top-left-radius: 0.75rem; border-top-left-radius: 10px;
border-bottom-right-radius: 0.75rem; border-bottom-right-radius: 10px;
border-bottom-left-radius: 0.75rem; border-bottom-left-radius: 10px;
border-left: 5px solid #0096fa; border-left: 5px solid #0096fa;
} }
.pixiv-post :before { .pixiv-post :before {
content: 'From Pixiv'; content: "From Pixiv";
font-size: 1.8rem; font-size: 1.8rem;
line-height: 1em; line-height: 1em;
font-family: Open Sans; font-family: Open Sans;
color: #999; color: #999;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
} }
#start { #start {
display: none; display: none;
position: fixed; position: fixed;
width: 100vw; width: 100vw;
height: calc(100vh - 3rem); height: calc(100vh - 40px);
background-color: var(--bg); background-color: var(--bg);
color: var(--color); color: var(--color);
z-index: 99999; z-index: 99999;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
#drag { #drag {
display: none; display: none;
position: fixed; position: fixed;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
background-color: var(--bg); background-color: var(--bg);
color: var(--color); color: var(--color);
z-index: 99999; z-index: 99999;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
#drag-content { #drag-content {
font-size: 2rem; font-size: 2rem;
} }
#pip { #pip {
z-index: 504; z-index: 504;
width: 418px; width: 418px;
background-color: var(--subcolor); background-color: var(--subcolor);
position: absolute; position: absolute;
} }
.pip-bottom { .pip-bottom {
bottom: 10px; bottom: 10px;
} }
.pip-left { .pip-left {
left: 10px; left: 10px;
} }
.pip-top { .pip-top {
top: 10px; top: 10px;
} }
.pip-right { .pip-right {
right: 10px; right: 10px;
} }
#pip-content .material-icons { #pip-content .material-icons {
display: none; display: none;
} }
.big-text { .big-text {
font-size: 1.2rem; font-size: 1.2rem;
} }
#releasenote { #releasenote {
background-color: var(--modal); background-color: var(--modal);
} }
#releasenote li { #releasenote li {
list-style-type: disc; list-style-type: disc;
} }
@media only screen and (min-width: 993px) { @media only screen and (min-width: 993px) {
#toast-container { #toast-container {
top: auto; top: auto;
right: auto; right: auto;
bottom: 5%; bottom: 5%;
left: 4%; left: 4%;
max-width: 86%; max-width: 86%;
} }
} }
.show { .show {
animation: show 0.2s linear 0s; animation: show 0.2s linear 0s;
} }
@keyframes show { @keyframes show {
from { from {
opacity: 0; opacity: 0;
} }
to { to {
opacity: 1; opacity: 1;
} }
} }
.hide-anime { .hide-anime {
animation: hide 0.2s linear 0s; animation: hide 0.2s linear 0s;
display: none; display: none;
} }
@keyframes hide { @keyframes hide {
from { from {
opacity: 1; opacity: 1;
} }
to { to {
opacity: 0; opacity: 0;
} }
} }
.collapsible-header, .collapsible-header,
.tabs { .tabs {
background-color: var(--subcolor); background-color: var(--subcolor);
} }
.collapsible-header:focus { .collapsible-header:focus {
background-color: var(--subcolor) !important; background-color: var(--subcolor) !important;
} }
.modal-footer { .modal-footer {
background-color: var(--modalfooter) !important; background-color: var(--modalfooter) !important;
} }
.font { .font {
font-size: 1.5rem; font-size: 1.5rem;
margin-bottom: 0.4rem; margin-bottom: 5px;
} }
.font:hover { .font:hover {
background-color: #999; background-color: #999;
} }
.release-do { .release-do {
border: solid 2px; border: solid 2px;
border-color: var(--color); border-color: var(--color);
padding: 5px; padding: 5px;
} }
#pickers { #pickers {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
#menu { #menu {
position: fixed; position: fixed;
z-index: 9999; z-index: 9999;
background-color: var(--postbox); background-color: var(--postbox);
width: 540px; width: 540px;
top: calc(50% - 150px); top: calc(50% - 150px);
left: calc(50% - 250px); left: calc(50% - 250px);
padding: 0.4rem; padding: 5px;
border: thin solid gray; border: thin solid gray;
border-radius: 0.4rem; border-radius: 5px;
overflow: hidden; overflow: hidden;
} }
#menu-wrapper { #menu-wrapper {
margin-left: -5px; margin-left: -5px;
display: flex; display: flex;
height: calc(100% - 3.5rem); height: calc(100% - 3.5rem);
overflow: hidden; overflow: hidden;
} }
#left-menu { #left-menu {
width: 17.7rem; width: 230px;
} }
#left-menu a { #left-menu div {
padding-left: 0.4rem; padding-left: 5px;
width: 100%; width: 100%;
height: 3rem; height: 50px;
display: flex; display: flex;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
color: var(--color);
} }
#left-menu a:hover { #left-menu div:hover {
background-color: var(--beforehover); background-color: var(--beforehover);
} }
#left-menu span { #left-menu span {
margin-left: 0.4rem; margin-left: 5px;
} }
#left-menu a.active { #left-menu div.active {
background-color: var(--emphasized); background-color: var(--emphasized);
} }
#right-menu { #right-menu {
width: 100%; width: 100%;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
padding: 0.4rem; padding: 5px;
} }
#tltype { #tltype {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
#tltype .type { #tltype .type {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
width: 13rem; width: 170px;
height: 3.1rem; height: 40px;
cursor: pointer; cursor: pointer;
color: var(--color);
} }
#tltype .type span { #tltype .type span {
width: calc(100% - 2.3rem); width: calc(100% - 30px);
} }
#tltype .type:hover { #tltype .type:hover {
background-color: var(--beforehover); background-color: var(--beforehover);
} }
#tltype .active { #tltype .active {
background-color: var(--emphasized); background-color: var(--emphasized);
} }
#tltype i { #tltype i {
font-size: 2.3rem; font-size: 30px;
} }
#tltype i.sub-icon { #tltype i.sub-icon {
font-size: 1.53rem; font-size: 20px;
position: absolute; position: absolute;
color: var(--beforehover); color: var(--beforehover);
left: 0.9rem; left: 10px;
bottom: 0.4rem; bottom: 5px;
background-color: #fff; background-color: #fff;
} }
.drag-bar { .drag-bar {
cursor: move; cursor: move;
text-align: center; text-align: center;
width: calc(100% + 0.8rem); width: calc(100% + 10px);
border-radius: 5px; border-radius: 5px;
background-color: var(--box); background-color: var(--box);
filter: brightness(80%); filter: brightness(80%);
margin-left: -0.4rem; margin-left: -5px;
margin-right: -0.4rem; margin-right: -5px;
margin-top: -0.4rem; margin-top: -5px;
font-size: 1.3rem; font-size: 16px;
padding: 0.3rem; padding: 4px;
} }
#something-wrong { #something-wrong {
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
#support-btm { #support-btm {
position: fixed; position: fixed;
bottom: -300px; bottom: -300px;
width: 100vw; width: 100vw;
background-color: var(--box); background-color: var(--box);
z-index: 9999; z-index: 9999;
padding: 0.8rem; padding: 10px;
display: grid; display: grid;
grid-template-columns: 3fr 1fr 1fr; grid-template-columns: 3fr 1fr 1fr;
grid-template-rows: 1fr 2.7rem; grid-template-rows: 1fr 36px;
grid-template-areas: 'note middle right' 'note close close'; grid-template-areas: "note middle right" "note close close";
} }
#support-btm-en, #support-btm-en,
#support-btm-ja { #support-btm-ja {
grid-area: note; grid-area: note;
} }
#support-btm-middle { #support-btm-middle {
grid-area: middle; grid-area: middle;
} }
#support-btm-right { #support-btm-right {
grid-area: right; grid-area: right;
} }
#support-btm-close { #support-btm-close {
grid-area: close; grid-area: close;
} }
.select-wrapper .dropdown-content { .select-wrapper .dropdown-content {
width: 19.2rem !important; width: 250px !important;
} }
input, input,
textarea { textarea {
color: var(--color); color: var(--color);
font-size: 1rem !important; font-size: 1rem !important;
font-family: inherit; font-family: inherit;
} }
.swal2-popup { .swal2-popup {
background-color: var(--notfbox) !important; background-color: var(--notfbox) !important;
} }
.swal2-title, .swal2-title,
.swal2-content { .swal2-content {
color: var(--color) !important; color: var(--color) !important;
} }
#src-contents svg { #src-contents svg {
margin-right: 0.4rem; margin-right: 5px;
} }
.contributor { .contributor {
cursor: pointer; cursor: pointer;
} }
.contributor img { .contributor img {
width: 1rem; width: 1rem;
} }
.tagComp { .tagComp{
display: grid; display: grid;
grid-template-columns: 4.6rem 6.15rem 1fr; grid-template-columns: 60px 80px 1fr;
grid-template-rows: 1fr 1fr; grid-template-rows: 1fr 1fr;
grid-template-areas: 'svg toot user' 'svg toot tag' 'svg toots tag'; grid-template-areas: "svg toot user" "svg toot tag" "svg toots tag";
border-top: dotted 0.5px var(--gray); border-top: dotted 0.5px var(--gray);
padding: 0.4rem; padding: 5px
} }
.tagCompSvg { .tagCompSvg {
grid-area: svg; grid-area: svg;
} }
.tagCompToot { .tagCompToot {
grid-area: toot; grid-area: toot;
text-align: center; text-align: center;
} }
.tagCompToots { .tagCompToots {
grid-area: toots; grid-area: toots;
text-align: center; text-align: center;
} }
.tagCompUser { .tagCompUser {
grid-area: user; grid-area: user;
} }
.tagCompTag { .tagCompTag {
grid-area: tag; grid-area: tag;
padding-top: 0.4rem; padding-top: 10px;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
#sabakanMark {
background-color: var(--emphasized);
}
#pageSrc {
position: absolute;
top: 0;
left: calc(50vw - 11.53rem);
width: 23rem;
max-width: 100%;
background-color: var(--box);
z-index: 501;
padding: 0.4rem;
}
#pageSrcInput {
width: 12.3rem;
}
.voice {
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
}
@media (max-width: 500px) {
#pageSrc {
left: 0;
}
}
/*スクロールバー*/ /*スクロールバー*/
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 5px; width: 5px;
height: 10px; height: 10px;
background: rgba(0, 0, 0, 0.05); background: rgba(0, 0, 0, 0.05);
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
border-radius: 5px; border-radius: 5px;
} }
/* Handle */ /* Handle */
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
border-radius: 5px; border-radius: 5px;
background: #607d8b; background: #607d8b;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5); -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
} }
/* Web Fonts */ /* Web Fonts */
@font-face { @font-face {
font-family: 'Open Sans'; font-family: "Open Sans";
font-style: normal; font-style: normal;
font-weight: 300; font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url('../fonts/OpenSans-Light.ttf') format('truetype'); src: local("Open Sans Light"), local("OpenSans-Light"),
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; url(https://fonts.gstatic.com/s/opensans/v17/mem5YaGs126MiZpBA-UN_r8OUuhp.woff2)
format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
U+FEFF, U+FFFD;
} }
@font-face { @font-face {
font-family: 'Material Icons'; font-family: "Material Icons";
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2'); src: url(https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2)
format("woff2");
} }
.material-icons { .material-icons {
font-family: 'Material Icons'; font-family: "Material Icons";
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-size: 1.84rem; font-size: 24px;
line-height: 1; line-height: 1;
letter-spacing: normal; letter-spacing: normal;
text-transform: none; text-transform: none;
display: inline-block; display: inline-block;
white-space: nowrap; white-space: nowrap;
word-wrap: normal; word-wrap: normal;
direction: ltr; direction: ltr;
-webkit-font-feature-settings: 'liga'; -webkit-font-feature-settings: "liga";
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
}
.pwaView .pwa,
.pwaView .mac,
.pwaView .win {
display: none;
}
.win32 .mac,
.linux .mac {
display: none;
}
.linux .win,
.darwin .win {
display: none;
} }

View File

@@ -1,148 +1,144 @@
/*トゥートボックス向けCSS*/ /*トゥートボックス向けCSS*/
#post-box { #post-box {
display: none; display: none;
position: fixed; position: fixed;
left: calc(50vw - 150px); left: calc(50vw - 150px);
top: 50vh; top: 50vh;
background-color: var(--postbox); background-color: var(--postbox);
border: thin solid gray; border: thin solid gray;
z-index: 501; z-index: 501;
max-width: 100%; max-width: 100%;
padding: 0.4rem; padding: 5px;
border-radius: 0.4rem; border-radius: 5px;
overflow: hidden; overflow: hidden;
} }
textarea { textarea {
min-height: 7.7rem !important; min-height: 100px !important;
font-family: inherit; font-family: inherit;
} }
#post-box .ui-resizable-s, #post-box .ui-resizable-s, #post-box .ui-resizable-se{
#post-box .ui-resizable-se { display: none !important;
display: none !important;
} }
.cancel { .cancel {
font-size: 0.5rem; font-size: 0.5rem;
color: gray; color: gray;
cursor: pointer; cursor: pointer;
position: absolute; position: absolute;
right: 2px; right: 2px;
top: 4px; top: 4px;
} }
.more-show { .more-show {
display: none; display: none;
} }
#drag { #drag {
width: 100%; width: 100%;
height: 100px; height: 100px;
} }
#post-btn { #post-btn {
display: none; display: none;
} }
#vis { #vis {
text-transform: capitalize; text-transform: capitalize;
} }
#cw-text { #cw-text {
display: none; display: none;
} }
#sch-box { #sch-box {
display: none; display: none;
} }
#sch-box input { #sch-box input {
width: auto; width: auto;
} }
.picker__close, .picker__close,
.picker__today, .picker__today,
.picker__clear { .picker__clear {
color: #26a69a !important; color: #26a69a !important;
} }
.cw { .cw {
display: none; display: none;
} }
.sensitive { .sensitive {
filter: blur(50px); filter: blur(50px);
} }
#emoji { #emoji {
} }
#suggest { #suggest {
max-height: 23rem; max-height: 300px;
overflow-y: scroll; overflow-y: scroll;
} }
#emoji-list { #emoji-list {
width: 100%; width: 100%;
height: 15.4rem; height: 200px;
overflow-y: scroll; overflow-y: scroll;
} }
#preview-field { #preview-field {
display: none; display: none;
} }
.preview-img { .preview-img {
width: 4rem; width: 50px;
max-height: 7.6rem; max-height: 100px;
} }
.pi-wrap { .pi-wrap {
display: inline-block; display: inline-block;
width: 3.8rem; width: 50px;
max-height: 7.7rem; max-height: 100px;
} }
#default-emoji a { #default-emoji a {
color: var(--color); color: var(--color);
margin-right: 0.15rem; margin-right: 2px;
} }
.character-counter { .character-counter {
position: relative; position: relative;
top: -1.9rem; top: -25px;
} }
.trendtag { .trendtag {
overflow-y: scroll; overflow-y: scroll;
max-height: 7.7rem; max-height: 100px;
} }
#toot-btn-field { #toot-btn-field {
display: flex; display: flex;
} }
#toot-post-btn { #toot-post-btn {
width: calc(100% - 0.7rem); width: calc(100% - 10px);
padding: 0; padding: 0;
margin-top: 0.7rem; margin-top: 10px;
height: 2.7rem;
} }
#toot-sec-btn { #toot-sec-btn {
width: 2.3rem; width: 30px;
padding: 0; padding: 0;
margin-top: 0.7rem; margin-top: 10px;
} }
#left-side { #left-side {
float: left; float: left;
overflow-x: hidden; overflow-x: hidden;
height: calc(100% - 2.5rem); height: calc(100% - 32px);
} }
#right-side { #right-side {
display: none; display: none;
float: left; float: left;
width: 23rem; width: 300px;
padding: 0.4rem; padding: 5px;
overflow-x: hidden; overflow-x: hidden;
height: calc(100% - 2.5rem); height: calc(100% - 32px);
} }
#posttgl, #posttgl,#toot-post-btn {
#toot-post-btn { background-color: var(--accentbtn);
background-color: var(--accentbtn);
color: var(--color);
} }
/*mini*/ /*mini*/
.mini-post .mize { .mini-post .mize {
display: none !important; display: none !important;
} }
.mini-post #textarea { .mini-post #textarea {
padding: 0; padding: 0;
} }
.mini-post #post-box { .mini-post #post-box {
width: 15.4rem; width: 200px;
min-width: 7.7rem; min-width: 100px;
} }
.mini-post #toot-field { .mini-post #toot-field {
padding: 0; padding: 0;
} }
.mini-post #toot-btn-field { .mini-post #toot-btn-field {
padding: 0; padding: 0;
} }

View File

@@ -3,29 +3,29 @@
cursor: move; cursor: move;
user-select: none; user-select: none;
background-color: var(--modalfooter); background-color: var(--modalfooter);
margin: 0.4rem; margin: 5px;
border-radius: 0.4rem; border-radius: 5px;
color: var(--color); color: var(--color);
padding: 3px; padding: 3px;
display: grid; display: grid;
grid-template-columns: 3.3rem 1fr 4.6rem; grid-template-columns: 43px 1fr 60px;
grid-template-areas: "sorticon sorttitle sorttitle" "sorticon sortacct sortaction"; grid-template-areas: "sorticon sorttitle sorttitle" "sorticon sortacct sortaction";
} }
.sorticon { .sorticon {
grid-area: sorticon; grid-area: sorticon;
} }
.sorticon i { .sorticon i {
font-size: 3.3rem; font-size: 43px;
} }
.sorttitle { .sorttitle {
margin-left: 0.4rem; margin-left: 5px;
grid-area: sorttitle; grid-area: sorttitle;
} }
.sortacct { .sortacct {
margin-left: 0.4rem; margin-left: 5px;
grid-area: sortacct; grid-area: sortacct;
} }
.sortaction { .sortaction {
margin-left: 0.4rem; margin-left: 5px;
grid-area: sortaction; grid-area: sortaction;
} }

View File

@@ -142,51 +142,3 @@
.bluetheme #imagemodal { .bluetheme #imagemodal {
background: url("../img/pixel.white.svg"); background: url("../img/pixel.white.svg");
} }
.polartheme {
--bg: #2e3440;
--drag: rgba(0, 0, 0, 0.8);
--color: white;
--beforehover: #8d94a0;
--modal: #3b4252;
--subcolor: #434c5e;
--box: #4c566a;
--sidebar: #3b4252;
--shared: #2d3b58;
--notfbox: #2a3857;
--emphasized: #2f4b86;
--his-data: rgba(0, 0, 0, 0.8);
--active: #2a3857;
--postbox: #434c5e;
--modalfooter: #485166;
--accentbtn: #2f4b86;
--selected: #464f61;
--selectedWithShare: #3e527e;
--gray: #cccccc;
}
.polartheme #imagemodal {
background: url("../img/pixel.svg");
}
.snowtheme {
--bg: #eceff4;
--drag: rgba(255, 255, 255, 0.8);
--color: #36425a;
--beforehover: #344058;
--modal: #e5e9f0;
--subcolor: #d8dee9;
--box: #c0c8d6;
--sidebar: #eeeeee;
--shared: #c3d4e6;
--notfbox: #d8dee9;
--emphasized: #88c0d0;
--his-data: rgba(255, 255, 255, 0.9);
--active: #8fbcbb;
--postbox: #d8dee9;
--modalfooter: #b2bed4;
--accentbtn: #81a1c1;
--selected: #b4bdd0;
--selectedWithShare: #a3afbb;
--gray: #5c6c8c;
}
.snowtheme #imagemodal {
background: url("../img/pixel.white.svg");
}

View File

@@ -1,7 +1,7 @@
/*TL CSS(ただしBBCode pulse:master.css/spin:font-awesome*/ /*TL CSS(ただしBBCode pulse:master.css/spin:font-awesome*/
#main { #main {
width: 100vw; width: 100vw;
height: calc(100% - 3rem); height: calc(100vh - 40px);
} }
#timeline-container { #timeline-container {
overflow-x: scroll; overflow-x: scroll;
@@ -11,19 +11,18 @@
} }
#bottom { #bottom {
position: absolute; position: absolute;
overflow: hidden;
bottom: 0; bottom: 0;
width: 100vw; width: 100vw;
height: 3rem; height: 40px;
padding: 0.23rem; padding: 3px;
padding-right: 0; padding-right: 0;
padding-left: 3rem; padding-left: 40px;
background-color: var(--sidebar); background-color: var(--sidebar);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
z-index: 500; z-index: 500;
box-shadow: 0.77rem 0 0.77rem, 0.77rem rgba(0, 0, 0, 0.2); box-shadow: 10px 0 10px 10px rgba(0, 0, 0, 0.2);
} }
#demobottom { #demobottom {
width: 500px; width: 500px;
@@ -31,24 +30,24 @@
} }
#bottom.reverse { #bottom.reverse {
padding-left: 0; padding-left: 0;
padding-right: 3rem; padding-right: 40px;
} }
.reverse { .reverse {
flex-direction: row-reverse; flex-direction: row-reverse;
} }
#bottom #dambox { #bottom #dambox {
width: 23rem; width: 300px;
margin-right: 0.76rem; margin-right: 10px;
} }
#bottom.reverse #dambox { #bottom.reverse #dambox {
margin-right: 0; margin-right: 0;
} }
#bottom .trendtag { #bottom .trendtag {
height: 3rem; height: 40px;
} }
#bottom #group, #bottom #group,
#demogroup { #demogroup {
margin-right: 3rem; margin-right: 40px;
} }
#bottom .leftside { #bottom .leftside {
display: flex; display: flex;
@@ -58,41 +57,41 @@
align-items: center; align-items: center;
} }
#bottom #tips img { #bottom #tips img {
vertical-align: -0.23rem; vertical-align: -3px;
} }
#bottom a, #bottom a,
#demogroup a { #demogroup a {
color: var(--color); color: var(--color);
} }
#bottom i { #bottom i {
font-size: 2.3rem; font-size: 30px;
} }
.exc-icons { .exc-icons {
font-size: 1.53rem; font-size: 20px;
} }
.exc-chb { .exc-chb {
padding-left: 1.84rem !important; padding-left: 24px !important;
} }
.btnsgroup { .btnsgroup {
border: 1px solid; border: 1px solid;
padding-top: 1px; padding-top: 1px;
padding-left: 0.4rem; padding-left: 5px;
padding-right: 0.4rem; padding-right: 5px;
margin-right: 1.15rem; margin-right: 15px;
border-radius: 0.4rem; border-radius: 5px;
height: 2.7rem; height: 35px;
} }
.bgReport { .bgReport {
height: 2.61rem; height: 34px;
padding-top: 0.45rem; padding-top: 0.45rem;
text-decoration: underline; text-decoration: underline;
padding-left: 0.4rem; padding-left: 5px;
padding-right: 0.4rem; padding-right: 5px;
} }
#spot-box { #spot-box {
display: grid; display: grid;
grid-template-columns: 3rem 2.3rem 2.5fr 1fr 4.6rem; grid-template-columns: 40px 30px 2.5fr 1fr 60px;
grid-template-rows: 1.7rem 1.5rem; grid-template-rows: 22px 20px;
grid-template-areas: 'cover name name artist refresh' 'cover progress progress progress time'; grid-template-areas: 'cover name name artist refresh' 'cover progress progress progress time';
} }
#spot-refresh { #spot-refresh {
@@ -106,14 +105,14 @@
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
line-height: 1.92rem; line-height: 25px;
} }
#spot-artist { #spot-artist {
grid-area: artist; grid-area: artist;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
line-height: 1.92rem; line-height: 25px;
} }
#spot-img { #spot-img {
width: 90%; width: 90%;
@@ -127,7 +126,7 @@
} }
.btnsgroup .grouptitle { .btnsgroup .grouptitle {
font-family: Open Sans; font-family: Open Sans;
font-size: 1.1rem; font-size: 15px;
} }
@media screen and (max-width: 890px) { @media screen and (max-width: 890px) {
.btnsgroup .grouptitle { .btnsgroup .grouptitle {
@@ -141,7 +140,7 @@
iframe, iframe,
.cvo video { .cvo video {
max-width: 100%; max-width: 100%;
max-height: 23rem; max-height: 300px;
} }
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
.mobile #timeline-container { .mobile #timeline-container {
@@ -157,12 +156,12 @@ iframe,
} }
.box { .box {
overflow: hidden; overflow: hidden;
min-width: 23rem; min-width: 300px;
flex: 1; flex: 1;
border-top: none; border-top: none;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-bottom: -0.75rem; margin-bottom: -10px;
} }
.img_FTL { .img_FTL {
display: none; display: none;
@@ -216,16 +215,16 @@ iframe,
} }
.emoji, .emoji,
.emoji-img { .emoji-img {
width: 1.153rem; width: 15px;
} }
.area-toot .emoji, .area-toot .emoji,
.area-toot .emoji-img { .area-toot .emoji-img {
width: 1.538rem; width: 20px;
vertical-align: middle; vertical-align: middle;
margin: -1px 0; margin: -1px 0;
} }
.bigemoji { .bigemoji {
width: 7.7rem !important; width: 100px !important;
height: auto !important; height: auto !important;
position: relative; position: relative;
z-index: 9999; z-index: 9999;
@@ -254,13 +253,13 @@ iframe,
} }
.cvo { .cvo {
user-select: text; user-select: text;
padding-left: 0.4rem; padding-left: 5px;
border-bottom: 0.5px solid; border-bottom: 0.5px solid;
padding-right: 0.15rem; padding-right: 2px;
word-break: break-word; word-break: break-word;
width: 100%; width: 100%;
display: grid; display: grid;
grid-template-columns: 3.3rem 2fr 1fr; grid-template-columns: 43px 2fr 1fr;
grid-template-rows: auto 1.6rem 1fr auto 2.5rem; grid-template-rows: auto 1.6rem 1fr auto 2.5rem;
grid-template-areas: 'notice notice notice' 'icon display_name display_name' 'space toot toot' 'space additional additional' 'vis actions side'; grid-template-areas: 'notice notice notice' 'icon display_name display_name' 'space toot toot' 'space additional additional' 'vis actions side';
} }
@@ -286,21 +285,21 @@ iframe,
} }
.area-notice { .area-notice {
margin: 0.15rem; margin: 2px;
grid-area: notice; grid-area: notice;
} }
.area-icon { .area-icon {
width: 3rem; width: 40px;
margin: 0.15rem; margin: 2px;
grid-area: icon; grid-area: icon;
} }
.area-display_name { .area-display_name {
user-select: text; user-select: text;
height: 1.5em; height: 1.5em;
margin: 0.15rem; margin: 2px;
margin-left: 0.4rem; margin-left: 5px;
overflow: hidden; overflow: hidden;
grid-area: display_name; grid-area: display_name;
white-space: nowrap; white-space: nowrap;
@@ -311,7 +310,7 @@ iframe,
flex-wrap: nowrap; flex-wrap: nowrap;
} }
.flex-name { .flex-name {
max-width: calc(100% - 4.6rem); max-width: calc(100% - 60px);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
@@ -319,9 +318,9 @@ iframe,
.area-toot { .area-toot {
cursor: text; cursor: text;
user-select: auto; user-select: auto;
margin-top: 0.4rem; margin-top: 5px;
margin-bottom: 0.4rem; margin-bottom: 5px;
margin-left: 0.4rem; margin-left: 5px;
grid-area: toot; grid-area: toot;
} }
@@ -354,7 +353,7 @@ iframe,
.area-actions { .area-actions {
padding: 0; padding: 0;
margin: 0; margin: 0;
top: -0.4rem; top: -5px;
position: relative; position: relative;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
@@ -362,28 +361,28 @@ iframe,
grid-area: actions; grid-area: actions;
} }
.area-vis { .area-vis {
margin: 0.4rem; margin: 2px;
grid-area: vis; grid-area: vis;
text-align: center; text-align: center;
} }
.area-side { .area-side {
display: flex; display: flex;
top: -0.4rem; top: -5px;
position: relative; position: relative;
justify-content: flex-end; justify-content: flex-end;
margin: 0.15rem; margin: 2px;
grid-area: side; grid-area: side;
} }
.cusr { .cusr {
user-select: text; user-select: text;
padding-left: 0.4rem; padding-left: 5px;
border-bottom: 0.5px solid; border-bottom: 0.5px solid;
padding-right: 0.15rem; padding-right: 2px;
word-break: break-word; word-break: break-word;
width: 100%; width: 100%;
display: grid; display: grid;
grid-template-columns: 3.3rem 2fr 1fr; grid-template-columns: 43px 2fr 1fr;
grid-template-rows: auto 1.6rem 2fr auto; grid-template-rows: auto 1.6rem 2fr auto;
grid-template-areas: 'notice notice notice' 'icon display_name display_name' 'space status status' 'space actions actions'; grid-template-areas: 'notice notice notice' 'icon display_name display_name' 'space status status' 'space actions actions';
} }
@@ -392,12 +391,12 @@ iframe,
grid-area: status; grid-area: status;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 0.75rem; margin-bottom: 5px;
} }
.cusr .cbadge { .cusr .cbadge {
margin-top: 0.46rem; margin-top: 6px;
margin-left: 0.46rem; margin-left: 6px;
} }
.quote-inline { .quote-inline {
@@ -405,16 +404,16 @@ iframe,
} }
.quote-renote { .quote-renote {
display: grid; display: grid;
grid-template-columns: 3.3rem 2fr 1.92rem; grid-template-columns: 43px 2fr 25px;
grid-template-areas: 'ricon ruser rdet' 'ricon rtext rdet'; grid-template-areas: 'ricon ruser rdet' 'ricon rtext rdet';
border: 1px solid; border: 1px solid;
margin-top: 0.23rem; margin-top: 3px;
padding: 1px; padding: 1px;
border-radius: 0.23rem; border-radius: 3px;
} }
.renote-icon { .renote-icon {
grid-area: ricon; grid-area: ricon;
padding: 0.4rem; padding: 5px;
} }
.renote-details { .renote-details {
grid-area: rdet; grid-area: rdet;
@@ -433,17 +432,17 @@ iframe,
color: var(--color); color: var(--color);
} }
.area-side i { .area-side i {
margin-left: 0.75rem; margin-left: 10px;
} }
.viabadge { .viabadge {
margin-top: 0.75rem; margin-top: 10px;
} }
.action i { .action i {
font-size: 1.2rem; font-size: 1.2rem;
margin-right: 0.15rem; margin-right: 2px;
} }
.action .fa-quote-right { .action .fa-quote-right {
margin-top: 0.15rem; margin-top: 2px;
} }
.actct { .actct {
color: var(--beforehover); color: var(--beforehover);
@@ -462,24 +461,24 @@ iframe,
position: fixed; position: fixed;
background-color: var(--box); background-color: var(--box);
z-index: 9999; z-index: 9999;
border-radius: 0.4rem; border-radius: 5px;
padding: 0.4rem; padding: 5px;
} }
.contextMenu.bottom:before { .contextMenu.bottom:before {
content: ''; content: '';
position: absolute; position: absolute;
top: 100%; top: 100%;
right: 2rem; right: 27px;
border: 1.2rem solid transparent; border: 15px solid transparent;
border-top: 1.2rem solid var(--box); border-top: 15px solid var(--box);
} }
.contextMenu.top:before { .contextMenu.top:before {
content: ''; content: '';
position: absolute; position: absolute;
top: -2.3rem; top: -30px;
right: 2rem; right: 27px;
border: 1.5rem solid transparent; border: 15px solid transparent;
border-bottom: 1.5rem solid var(--box); border-bottom: 15px solid var(--box);
} }
.contextMenu .btn-flat { .contextMenu .btn-flat {
text-transform: none !important; text-transform: none !important;
@@ -502,26 +501,26 @@ iframe,
} }
.toot img:not(.emoji-img) { .toot img:not(.emoji-img) {
max-width: 100%; max-width: 100%;
max-height: 23rem; max-height: 300px;
} }
.cbadge { .cbadge {
display: inline-block; display: inline-block;
min-width: 0.76rem; min-width: 10px;
max-width: 7.7rem; max-width: 100px;
padding: 0.23rem 0.5rem; padding: 3px 7px;
font-size: 0.8em; font-size: 0.8em;
margin-right: 0.4rem; margin-right: 5px;
line-height: 1; line-height: 1;
color: #fff; color: #fff;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: middle; vertical-align: middle;
background-color: #777; background-color: #777;
border-radius: 0.75rem; border-radius: 10px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
height: calc(0.8em + 0.6rem); height: calc(0.8em + 8px);
user-select: none; user-select: none;
} }
.cbadge-hover { .cbadge-hover {
@@ -535,10 +534,10 @@ iframe,
p { p {
margin: 0; margin: 0;
margin-bottom: 0px; margin-bottom: 0px;
line-height: 1.53rem; line-height: 20px;
} }
p:not(:last-child) { p:not(:last-child) {
margin-bottom: 0.76rem; margin-bottom: 10px;
} }
.shared { .shared {
background-color: var(--shared); background-color: var(--shared);
@@ -554,14 +553,14 @@ p:not(:last-child) {
background-color: var(--notfbox); background-color: var(--notfbox);
filter: brightness(110%); filter: brightness(110%);
position: relative; position: relative;
margin-right: 0.7rem; margin-right: 10px;
width: 100%; width: 100%;
min-height: 4.6rem; min-height: 60px;
z-index: 500; z-index: 500;
padding: 0.4rem; padding: 5px;
display: grid; display: grid;
grid-template-columns: 3rem 5rem 1fr 1.8rem; grid-template-columns: 40px 1fr 1fr 24px;
grid-template-rows: 2.3rem 2.3rem; grid-template-rows: 30px 30px;
grid-template-areas: 'notice notice_name notice_name a2' 'notice a1 sta a3' 'notf-box notf-box notf-box notf-box'; grid-template-areas: 'notice notice_name notice_name a2' 'notice a1 sta a3' 'notf-box notf-box notf-box notf-box';
} }
.emp { .emp {
@@ -605,8 +604,8 @@ p:not(:last-child) {
} }
#tools { #tools {
position: fixed; position: fixed;
top: 0.76rem; top: 10px;
right: 0.76rem; right: 10px;
float: right; float: right;
} }
.setting { .setting {
@@ -619,14 +618,14 @@ p:not(:last-child) {
} }
.notf-box { .notf-box {
position: fixed; position: fixed;
right: 5.4rem; right: 70px;
background-color: var(--box); background-color: var(--box);
border: thin solid gray; border: thin solid gray;
z-index: 501; z-index: 501;
width: 30rem; width: 400px;
padding: 0.4rem; padding: 5px;
min-height: 7.7rem; min-height: 100px;
max-height: 38.4rem; max-height: 500px;
} }
.column-hide { .column-hide {
display: none; display: none;
@@ -634,21 +633,17 @@ p:not(:last-child) {
height: 0; height: 0;
} }
.prof-img { .prof-img {
border-radius: 0.23rem; border-radius: 3px;
width: 3rem;
}
.prof-img-sml {
width: 1.5rem;
} }
.notf-icon { .notf-icon {
position: relative; position: relative;
top: -1.53rem; top: -20px;
width: 1.5rem; width: 20px;
left: 1.5rem; left: 20px;
} }
.notf-indv-box { .notf-indv-box {
width: 100%; width: 100%;
max-height: 30.7rem; max-height: 400px;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
border: thin solid gray; border: thin solid gray;
@@ -681,44 +676,44 @@ p:not(:last-child) {
.vote { .vote {
width: 100%; width: 100%;
border: 1px solid; border: 1px solid;
margin-top: 0.23rem; margin-top: 3px;
padding: 1px; padding: 1px;
border-radius: 0.23rem; border-radius: 3px;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
} }
.fa-2x > .emoji-img { .fa-2x > .emoji-img {
width: 2.3rem !important; width: 36px !important;
height: 2.3rem !important; height: 36px !important;
} }
.fa-3x > .emoji-img { .fa-3x > .emoji-img {
width: 4.15rem !important; width: 54px !important;
height: 4.15rem !important; height: 54px !important;
} }
.fa-4x > .emoji-img { .fa-4x > .emoji-img {
width: 4.6rem !important; width: 72px !important;
height: 4.6rem !important; height: 72px !important;
} }
.fa-5x > .emoji-img { .fa-5x > .emoji-img {
width: 6.9rem !important; width: 90px !important;
height: 6.9rem !important; height: 90px !important;
} }
#lists-user { #lists-user {
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
max-height: 15.4rem; max-height: 200px;
} }
.votebtn { .votebtn {
border: 1px solid; border: 1px solid;
color: var(--bg); color: var(--bg);
background-color: var(--beforehover); background-color: var(--beforehover);
cursor: pointer; cursor: pointer;
width: 3.8rem; width: 50px;
height: 1.7rem; padding: 2px;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
margin-top: 0.38rem; margin-top: 5px;
border-radius: 0.75rem; border-radius: 10px;
transition-duration: 0.5s; transition-duration: 0.5s;
} }
.votebtn:hover { .votebtn:hover {
@@ -727,8 +722,8 @@ p:not(:last-child) {
.leadPoll { .leadPoll {
position: absolute; position: absolute;
background-color: var(--box); background-color: var(--box);
height: 1.5rem; height: 20px;
border-radius: 0.23rem; border-radius: 3px;
} }
.lpAnime { .lpAnime {
animation-duration: 1s; animation-duration: 1s;
@@ -745,7 +740,7 @@ p:not(:last-child) {
width: 1.2rem !important; width: 1.2rem !important;
position: relative; position: relative;
top: -1px; top: -1px;
margin-left: 0.38rem !important; margin-left: 5px !important;
} }
.jump { .jump {
display: inline-block; display: inline-block;
@@ -770,9 +765,6 @@ p:not(:last-child) {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.fav_ct, .rt_ct, .rep_ct {
font-size: 1.1rem;
}
.shared.selectedToot { .shared.selectedToot {
background-color: var(--selectedWithShare); background-color: var(--selectedWithShare);
} }
@@ -786,18 +778,18 @@ audio {
white-space: normal; white-space: normal;
} }
.cw_btn { .cw_btn {
margin: 0.23rem; margin: 3px;
background-color: var(--emphasized); background-color: var(--emphasized);
color: var(--color); color: var(--color);
padding-left: 0.23rem; padding-left: 3px;
padding-right: 0.23rem; padding-right: 3px;
border-radius: 0.23rem; border-radius: 3px;
border: 1px solid var(--color); border: 1px solid var(--color);
user-select: none; user-select: none;
} }
.vis-data { .vis-data {
font-size: 1rem !important; font-size: 1rem !important;
margin: 0.4rem; margin: 5px;
user-select: none; user-select: none;
} }
@keyframes jump { @keyframes jump {
@@ -870,31 +862,3 @@ audio {
.box .ui-resizable-se { .box .ui-resizable-se {
display: none !important; display: none !important;
} }
.announcement {
padding: 0.38rem;
border-bottom: 1px solid;
}
.announReaction {
width: 2.7rem;
height: 1.7rem;
font-size: 1.1rem;
margin: 0.23rem;
cursor: pointer;
border: solid 1px;
padding-left: 0.15rem;
background-color: var(--notfbox);
border-radius: 0.15rem;
}
.announReaction img {
position: relative;
top: 0.23rem;
}
.announReaction.reactioned {
background-color: var(--emphasized);
}
.announReaction.add {
width: 1.46rem;
}
.reactionsPack {
display: flex;
}

View File

@@ -1,7 +1,7 @@
/*アイコンをクリックした時とかにでてくるユーザーデータ*/ /*アイコンをクリックした時とかにでてくるユーザーデータ*/
#his-data { #his-data {
background-repeat: no-repeat; background-repeat: no-repeat;
background-image: url("../img/loading.svg"); background-image: url("../../loading.svg");
overflow-y: hidden; overflow-y: hidden;
} }
#his-data .btn .material-icons{ #his-data .btn .material-icons{
@@ -16,27 +16,31 @@
} }
#his-prof { #his-prof {
float: left; float: left;
width: 7.7rem; width: 100px;
margin-right: 0.4rem; margin-right: 5px;
} }
.his-float { .his-float {
overflow-y: scroll; overflow-y: scroll;
padding: 0.4rem; padding: 5px;
} }
#his-float-data { #his-float-data {
height: 100%; height: 100%;
overflow-y: hidden; overflow-y: hidden;
} }
#his-leftside { #his-leftside {
width: 38.4rem; width: 500px;
} }
#his-float-timeline { #his-float-timeline {
max-width: 59.6rem; max-width: 775px;
height: 100%; height: 100%;
overflow-y: hidden; overflow-y: hidden;
} }
#his-basic-prof { #his-basic-prof {
min-height: 10rem; min-height: 130px;
}
#his-matching-list {
overflow-y: scroll;
overflow-x: hidden;
} }
#his-field { #his-field {
vertical-align: baseline; vertical-align: baseline;
@@ -51,14 +55,14 @@
padding: 0; padding: 0;
background-color: #757575; background-color: #757575;
text-align: center; text-align: center;
padding: 0.4rem; padding: 5px;
margin-bottom: 1px; margin-bottom: 1px;
width: 30%; width: 30%;
} }
.his-field-content { .his-field-content {
height: 1.5rem; height: 1.5rem;
padding: 0; padding: 0;
padding-left: 0.4rem; padding-left: 5px;
} }
.his-var-content a span.ellipsis:after { .his-var-content a span.ellipsis:after {
content: "..."; content: "...";
@@ -72,13 +76,13 @@
display: inline !important; display: inline !important;
} }
#his-data-show { #his-data-show {
margin: 1.5rem; margin: 20px;
margin-left: 3.8rem; margin-left: 50px;
margin-right: 3.8rem; margin-right: 50px;
background-color: var(--his-data); background-color: var(--his-data);
height: calc(100% - 1.5rem); height: calc(100% - 20px);
margin-bottom: 0; margin-bottom: 0;
padding: 0.4rem; padding: 5px;
} }
#his-data-wrap { #his-data-wrap {
display: flex; display: flex;
@@ -86,39 +90,39 @@
.his-var-content { .his-var-content {
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
height: calc(100% - 3.4rem); height: calc(100% - 45px);
} }
#my-data-nav .btn { #my-data-nav .btn {
width: 10.7rem; width: 140px;
} }
.active-back { .active-back {
background-color: var(--active); background-color: var(--active);
} }
#his-name .emojione, #his-name .emojione,
#his-name .emoji-img { #his-name .emoji-img {
width: 1.538rem; width: 20px;
} }
#his-plus-action .btn { #his-plus-action .btn {
padding-right: 0.4rem; padding-right: 5px;
padding-left: 0.4rem; padding-left: 5px;
} }
.tabs { .tabs {
display: flex; display: flex;
} }
.tabs .tab a { .tabs .tab a {
padding: 0.6rem 0.9rem; padding: 8px 12px;
} }
#his-des { #his-des {
max-height: 17.7rem; max-height: 250px;
overflow-y: scroll; overflow-y: scroll;
} }
#his-sign-action { #his-sign-action {
border: 1px solid; border: 1px solid;
border-radius: 0.4rem; border-radius: 5px;
display: flex; display: flex;
align-items: center; align-items: center;
padding-left: 0.75rem; padding-left: 10px;
padding-right: 0.75rem; padding-right: 10px;
flex-wrap: wrap; flex-wrap: wrap;
} }
#his-sign-action .btn { #his-sign-action .btn {
@@ -129,7 +133,7 @@
cursor: pointer; cursor: pointer;
} }
#his-table{ #his-table{
max-height: 11.538rem; max-height: 150px;
overflow-y: scroll; overflow-y: scroll;
} }
#his-float-blocked { #his-float-blocked {

Binary file not shown.

View File

@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 4096 4096" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="TheDesk">
<g id="back">
<g transform="matrix(1,0,0,1.53232,-11.8871,-1144.65)">
<rect x="1044.02" y="1686.36" width="2335.77" height="782.558" style="fill:rgba(255,255,255,0);">
<animate attributeName="fill" begin="0.5s" dur="0.1s" fill="freeze" values="rgba(255,255,255,0);rgba(255,255,255,1)" />
</rect>
</g>
<rect x="1058.89" y="609.971" width="711.146" height="2885.69" style="fill:rgba(255,255,255,0);">
<animate attributeName="fill" begin="0.5s" dur="0.1s" fill="freeze" values="rgba(255,255,255,0);rgba(255,255,255,1)" />
</rect>
<g transform="matrix(1.08582,0,0,1,-142.973,0)">
<rect x="1665.9" y="1021.89" width="776.607" height="2050.26" style="fill:rgba(255,255,255,0);">
<animate attributeName="fill" begin="0.5s" dur="0.1s" fill="freeze" values="rgba(255,255,255,0);rgba(255,255,255,1)" />
</rect>
</g>
</g>
<g transform="matrix(1,0,0,0.998821,0,4.65666)" id="gray">
<rect x="678.5" y="128.48" width="450" height="3821.5" style="fill:rgb(84,82,81);"/>
</g>
<g transform="matrix(0.999978,-5.55112e-17,-2.20005e-08,0.996112,-1237.17,972.039)" id="orange">
<rect x="1915.71" y="-583.55" width="450" height="3117.62" style="fill:rgb(240,132,46);" r="3117.62">
<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0,1915.71,-583.55" to="-60,1915.71,-583.55" dur="0.5s" repeatCount="1" fill="freeze" />
</rect>
</g>
<g transform="matrix(0.999978,5.55112e-17,-5.55112e-17,0.999978,-1236.96,-1164.58)" id="blue">
<rect x="1915.5" y="1775.41" width="450" height="3105.58" style="fill:rgb(54,76,159);" r="3117.62">
<animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0,1915.71,4881" to="60,1915.71,4881" dur="0.5s" repeatCount="1" fill="freeze" />
</rect>
</g>
<path id="cat" d="M1592.47,2584L2048.94,2584C2048.94,2519.11 2044.31,2506.24 1936.84,2506.24C1954.01,2454.74 2023.79,2330.13 2062.57,2330.13C2096.88,2330.13 2137.81,2332.02 2137.81,2410.3C2137.81,2499.17 2287.37,2642.46 2323.63,2584C2377.67,2496.88 2230.72,2523.45 2230.72,2313.35C2230.72,2025.92 2398.46,2066.84 2398.46,1905.36C2398.46,1824.57 2376.14,1813.66 2376.14,1755.9C2376.14,1679.56 2443.39,1683.99 2430.31,1620.7C2421.27,1576.98 2414.2,1541.92 2408.93,1489.05C2405.19,1451.54 2404,1411.55 2365.03,1413.16C2319.25,1415.05 2301.88,1495.63 2230.72,1501.41C2159.7,1507.18 2099.15,1440.95 2071.66,1450.41C2044.41,1459.79 2052.98,1533.73 2069.14,1586.24C2094.54,1668.78 2149.93,1776.1 2048.94,1792.26C1947.95,1808.42 1774.25,1824.58 1649.02,1990.2C1523.79,2155.82 1528.42,2350.19 1479.36,2410.31C1314.72,2612.08 1146,2529.23 1146,2697.11C1146,2772.27 1273.35,2826.38 1293.55,2802.14C1313.75,2777.9 1121.93,2705.68 1336.56,2620.36C1519.91,2547.46 1536.28,2532.58 1592.47,2584Z" style="fill:rgba(0,0,0,0);">
<animate attributeName="fill" begin="0.6s" dur="0.5s" fill="freeze" values="rgba(0,0,0,0);rgba(0,0,0,1)" repeatCount="1" />
</path>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,26 +1,35 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg width="100%" height="100%" viewBox="0 0 4096 4096" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
<g id="TheDesk"> viewBox="0 0 4096 4096" style="enable-background:new 0 0 4096 4096;" xml:space="preserve">
<g> <style type="text/css">
<g transform="matrix(1,0,0,1.53232,-11.8871,-1144.65)"> .st0{display:none;}
<rect x="1044.02" y="1686.36" width="2335.77" height="782.558" style="fill:white;"/> .st1{fill:#FFFFFF;}
</g> .st2{fill:#545251;stroke:#040000;stroke-miterlimit:10;}
<rect x="1058.89" y="609.971" width="711.146" height="2885.69" style="fill:white;"/> .st3{fill:#F0842E;}
<g transform="matrix(1.08582,0,0,1,-142.973,0)"> .st4{fill:#364C9F;}
<rect x="1665.9" y="1021.89" width="776.607" height="2050.26" style="fill:white;"/> .st5{fill:#FFFFFF;stroke:#040000;stroke-miterlimit:10;}
</g> .st6{fill-rule:evenodd;clip-rule:evenodd;fill:#040000;}
</g> .st7{fill-rule:evenodd;clip-rule:evenodd;fill:none;}
<g transform="matrix(1,0,0,0.998821,0,4.65666)"> </style>
<rect x="678.5" y="128.48" width="450" height="3821.5" style="fill:rgb(84,82,81);"/> <g id="レイヤー_1" class="st0">
</g> </g>
<g transform="matrix(0.5,-0.866,0.862652,0.498067,224.046,2340.41)"> <g id="レイヤー_2">
<rect x="1915.71" y="-583.55" width="450" height="3117.62" style="fill:rgb(240,132,46);"/> <polyline class="st1" points="1128.5,650.67 3378,1950 3378,2137 1128.5,3432.67 "/>
</g> <rect x="678.5" y="128.48" class="st2" width="450" height="3821.5"/>
<g transform="matrix(0.5,0.866,-0.866,0.5,3757.17,-299.625)">
<rect x="1915.5" y="1555.41" width="450" height="3105.58" style="fill:rgb(54,76,159);"/> <rect x="1915.71" y="-583.55" transform="matrix(0.5 -0.866 0.866 0.5 225.753 2341.5386)" class="st3" width="450" height="3117.62"/>
</g>
<path id="cat" d="M1592.47,2584L2048.94,2584C2048.94,2519.11 2044.31,2506.24 1936.84,2506.24C1954.01,2454.74 2023.79,2330.13 2062.57,2330.13C2096.88,2330.13 2137.81,2332.02 2137.81,2410.3C2137.81,2499.17 2287.37,2642.46 2323.63,2584C2377.67,2496.88 2230.72,2523.45 2230.72,2313.35C2230.72,2025.92 2398.46,2066.84 2398.46,1905.36C2398.46,1824.57 2376.14,1813.66 2376.14,1755.9C2376.14,1679.56 2443.39,1683.99 2430.31,1620.7C2421.27,1576.98 2414.2,1541.92 2408.93,1489.05C2405.19,1451.54 2404,1411.55 2365.03,1413.16C2319.25,1415.05 2301.88,1495.63 2230.72,1501.41C2159.7,1507.18 2099.15,1440.95 2071.66,1450.41C2044.41,1459.79 2052.98,1533.73 2069.14,1586.24C2094.54,1668.78 2149.93,1776.1 2048.94,1792.26C1947.95,1808.42 1774.25,1824.58 1649.02,1990.2C1523.79,2155.82 1528.42,2350.19 1479.36,2410.31C1314.72,2612.08 1146,2529.23 1146,2697.11C1146,2772.27 1273.35,2826.38 1293.55,2802.14C1313.75,2777.9 1121.93,2705.68 1336.56,2620.36C1519.91,2547.46 1536.28,2532.58 1592.47,2584Z" style="fill:rgb(4,0,0);"/> <rect x="1915.5" y="1555.41" transform="matrix(0.5 0.866 -0.866 0.5 3762.031 -299.6245)" class="st4" width="450" height="3105.58"/>
<rect x="0" y="0" width="4096" height="4096" style="fill:none;"/> <path class="st5" d="M714.5,2953.5"/>
</g> <path id="path1891" class="st6" d="M1592.47,2584h456.47c0-64.89-4.63-77.76-112.1-77.76c17.17-51.5,86.95-176.11,125.73-176.11
c34.31,0,75.24,1.89,75.24,80.17c0,88.87,149.56,232.16,185.82,173.7c54.04-87.12-92.91-60.55-92.91-270.65
c0-287.43,167.74-246.51,167.74-407.99c0-80.79-22.32-91.7-22.32-149.46c0-76.34,67.25-71.91,54.17-135.2
c-9.04-43.72-16.11-78.78-21.38-131.65c-3.74-37.51-4.93-77.5-43.9-75.89c-45.78,1.89-63.15,82.47-134.31,88.25
c-71.02,5.77-131.57-60.46-159.06-51c-27.25,9.38-18.68,83.32-2.52,135.83c25.4,82.54,80.79,189.86-20.2,206.02
c-100.99,16.16-274.69,32.32-399.92,197.94s-120.6,359.99-169.66,420.11C1314.72,2612.08,1146,2529.23,1146,2697.11
c0,75.16,127.35,129.27,147.55,105.03c20.2-24.24-171.62-96.46,43.01-181.78C1519.91,2547.46,1536.28,2532.58,1592.47,2584z"/>
<rect class="st7" width="4096" height="4096"/>
<path class="st1" d="M-58,1122"/>
</g>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,9 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!--
TheDesk icon, Cutls P.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
-->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 4096 4096" style="enable-background:new 0 0 4096 4096;" xml:space="preserve"> viewBox="0 0 4096 4096" style="enable-background:new 0 0 4096 4096;" xml:space="preserve">
<style type="text/css"> <style type="text/css">

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,2 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>

Before

Width:  |  Height:  |  Size: 259 B

View File

@@ -1,8 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--
ThinkingDesk: Cutls P's icon, Cutls P.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
-->
<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 4096 4096" style="enable-background:new 0 0 4096 4096;" xml:space="preserve"> viewBox="0 0 4096 4096" style="enable-background:new 0 0 4096 4096;" xml:space="preserve">

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -1,7 +0,0 @@
<!doctype html>
<html>
<head>
<meta http-equiv=”refresh” content=”0;URL=./view/ja'” />
<script>location.href = './view/ja';</script>
</head>
</html>

View File

@@ -1,4 +1,3 @@
//@ts-check
//このソフトについて //このソフトについて
function about() { function about() {
postMessage(["sendSinmpleIpc", "about"], "*") postMessage(["sendSinmpleIpc", "about"], "*")

View File

@@ -1,204 +1,191 @@
selectedColumn = 0 selectedColumn = 0
selectedToot = 0 selectedToot = 0
$(function($) { $(function ($) {
//キーボードショートカット //キーボードショートカット
$(window).keydown(function(e) { $(window).keydown(function (e) {
var hasFocus = $('input').is(':focus') var hasFocus = $('input').is(':focus');
var hasFocus2 = $('textarea').is(':focus') var hasFocus2 = $('textarea').is(':focus');
if (document.getElementById('webview')) { if (document.getElementById("webview")) {
if ($('#webviewsel:checked').val()) { if ($("#webviewsel:checked").val()) {
var wv = false var wv = false;
} else { } else {
var wv = true var wv = true;
} }
} else { } else {
var wv = true var wv = true;
} }
//Enter //Enter
if (e.keyCode === 13) { if (e.keyCode === 13) {
if ($('#src').is(':focus')) { if($("#src").is(':focus')){
src() src()
return false return false;
} }
if ($('#list-add').is(':focus')) { if($("#list-add").is(':focus')){
makeNewList() makeNewList()
return false return false;
} }
} }
//Ctrl+Shift+Enter:Lgen //Ctrl+Shift+Enter:Lgen
if (event.metaKey || (event.ctrlKey && wv)) { if (event.metaKey || event.ctrlKey && wv) {
if (event.shiftKey) { if (event.shiftKey) {
if (e.keyCode === 13) { if (e.keyCode === 13) {
post('local') post('local');
return false return false;
} }
} }
} }
//Ctrl+Enter:投稿 //Ctrl+Enter:投稿
if (event.metaKey || (event.ctrlKey && wv)) { if (event.metaKey || event.ctrlKey && wv) {
if (e.keyCode === 13) { if (e.keyCode === 13) {
post() post();
return false return false;
} }
} }
//Alt+Enter:セカンダリー //Alt+Enter:セカンダリー
if (event.metaKey || (event.altKey && wv)) { if (event.metaKey || event.altKey && wv) {
if (e.keyCode === 13) { if (e.keyCode === 13) {
sec() sec();
return false return false;
} }
} }
//Esc:消す //Esc:消す
if (e.keyCode === 27 && wv) { if (e.keyCode === 27 && wv) {
hide() hide();
return false return false;
} }
//F5リロード //F5リロード
if (e.keyCode === 116 && wv) { if (e.keyCode === 116 && wv) {
location.href = 'index.html' location.href = "index.html";
return false return false;
} }
//Ctrl+Sift+C:全消し //Ctrl+Sift+C:全消し
if ((event.metaKey || event.ctrlKey) && event.shiftKey && wv) { if (((event.metaKey || event.ctrlKey) && event.shiftKey) && wv) {
if (e.keyCode === 67) { if (e.keyCode === 67) {
clear() clear();
return false return false;
} }
} }
//Ctrl+Sift+N:NowPlaying //Ctrl+Sift+N:NowPlaying
if ((event.metaKey || event.ctrlKey) && event.shiftKey && wv) { if (((event.metaKey || event.ctrlKey) && event.shiftKey) && wv) {
if (e.keyCode === 78) { if (e.keyCode === 78) {
show() show();
nowplaying() nowplaying()
return false return false;
} }
} }
//input/textareaにフォーカスなし時 //input/textareaにフォーカスなし時
if (!hasFocus && !hasFocus2 && wv) { if ((!hasFocus && !hasFocus2) && wv) {
if (!wv) { if (!wv) {
return true return true;
} }
//Ctrl+V:いつもの //Ctrl+V:いつもの
if (event.metaKey || event.ctrlKey) { if (event.metaKey || event.ctrlKey) {
if (e.keyCode === 86) { if (e.keyCode === 86) {
show() show();
}
}
//Ctrl+F:検索
if (event.metaKey || event.ctrlKey) {
if (e.keyCode === 70) {
srcBox()
} }
} }
//X:開閉 //X:開閉
if (e.keyCode === 88) { if (e.keyCode === 88) {
if (!$('#post-box').hasClass('appear')) { if (!$("#post-box").hasClass("appear")) {
show() show();
$('textarea').focus() $('textarea').focus();
} else { } else {
hide() hide();
} }
return false return false;
} }
//N:新トゥート //N:新トゥート
if (e.keyCode === 78) { if (e.keyCode === 78) {
if (!$('#post-box').hasClass('appear')) { if (!$("#post-box").hasClass("appear")) {
show() show();
} }
$('textarea').focus() $('textarea').focus();
return false return false;
} }
//Ctrl+E:全ての通知未読を既読にする //Ctrl+E:全ての通知未読を既読にする
if (event.metaKey || event.ctrlKey) { if (event.metaKey || event.ctrlKey) {
if (e.keyCode === 69) { if (e.keyCode === 69) {
allNotfRead() allNotfRead();
return false return false;
}
}
//Ctrl+K:メニュー開閉
if (event.metaKey || event.ctrlKey) {
if (e.keyCode === 75) {
menu()
return false
} }
} }
//Ctrl+Space:読み込み //Ctrl+Space:読み込み
if (event.metaKey || event.ctrlKey) { if (event.metaKey || event.ctrlKey) {
if (e.keyCode === 32) { if (e.keyCode === 32) {
parseColumn() parseColumn();
return false return false;
} }
} }
//Ctrl+Sift+S:設定 //Ctrl+Sift+S:設定
if ((event.metaKey || event.ctrlKey) && event.shiftKey) { if ((event.metaKey || event.ctrlKey) && event.shiftKey) {
if (e.keyCode === 83) { if (e.keyCode === 83) {
location.href = 'setting.html' location.href = "setting.html";
return false return false;
} }
} }
//Ctrl+Sift+M:アカマネ //Ctrl+Sift+M:アカマネ
if ((event.metaKey || event.ctrlKey) && event.shiftKey) { if ((event.metaKey || event.ctrlKey) && event.shiftKey) {
if (e.keyCode === 77) { if (e.keyCode === 77) {
location.href = 'acct.html' location.href = "acct.html";
return false return false;
} }
} }
//Ctrl+Sift+P:プロフ //Ctrl+Sift+P:プロフ
if ((event.metaKey || event.ctrlKey) && event.shiftKey) { if ((event.metaKey || event.ctrlKey) && event.shiftKey) {
if (e.keyCode === 80) { if (e.keyCode === 80) {
profShow() profShow()
return false return false;
} }
} }
//数字:TL //数字:TL
if (event.metaKey || event.ctrlKey) { if (event.metaKey || event.ctrlKey) {
if (e.keyCode >= 49 && e.keyCode <= 57) { if (e.keyCode >= 49 && e.keyCode <= 57) {
var kz = e.keyCode - 49 var kz = e.keyCode - 49;
goColumn(kz) goColumn(kz);
return false return false;
} }
} }
//矢印:選択 //矢印:選択
if (e.code == 'ArrowLeft') { if (e.code == "ArrowLeft") {
//left //left
if ($('#imagemodal').hasClass('open')) { if ($("#imagemodal").hasClass("open")) {
imgCont('prev') imgCont('prev');
return false return false;
} }
if (selectedColumn > 0) { if (selectedColumn > 0) {
selectedColumn-- selectedColumn--
} }
tootSelector(selectedColumn, selectedToot) tootSelector(selectedColumn, selectedToot)
return false return false;
} else if (e.code == 'ArrowUp') { } else if (e.code == "ArrowUp") {
//up //up
if ($('#imagemodal').hasClass('open')) { if ($("#imagemodal").hasClass("open")) {
return false return false;
} }
if (selectedToot > 0) { if (selectedToot > 0) {
selectedToot-- selectedToot--
} }
tootSelector(selectedColumn, selectedToot) tootSelector(selectedColumn, selectedToot)
return false return false;
} else if (e.code == 'ArrowRight') { } else if (e.code == "ArrowRight") {
//right //right
if ($('#imagemodal').hasClass('open')) { if ($("#imagemodal").hasClass("open")) {
imgCont('next') imgCont('next');
return false return false;
} }
if (selectedColumn < $('.tl-box').length - 1) { if (selectedColumn < $(".tl-box").length - 1) {
selectedColumn++ selectedColumn++
} }
tootSelector(selectedColumn, selectedToot) tootSelector(selectedColumn, selectedToot)
return false return false;
} else if (e.code == 'ArrowDown') { } else if (e.code == "ArrowDown") {
//down //down
if ($('#imagemodal').hasClass('open')) { if ($("#imagemodal").hasClass("open")) {
return false return false;
} }
selectedToot++ selectedToot++
tootSelector(selectedColumn, selectedToot) tootSelector(selectedColumn, selectedToot)
return false return false;
} }
//Ctrl+U:0,0選択 //Ctrl+U:0,0選択
if (event.ctrlKey || event.metaKey) { if (event.ctrlKey || event.metaKey) {
@@ -206,29 +193,29 @@ $(function($) {
selectedToot = 0 selectedToot = 0
selectedColumn = 0 selectedColumn = 0
tootSelector(0, 0) tootSelector(0, 0)
return false return false;
} }
} }
//選択時 //選択時
if (e.keyCode == 70) { if (e.keyCode == 70) {
var id = $('.selectedToot').attr('unique-id') var id = $(".selectedToot").attr('unique-id')
var acct_id = $('#timeline_' + selectedColumn).attr('data-acct') var acct_id = $('#timeline_' + selectedColumn).attr("data-acct")
fav(id, acct_id, false) fav(id, acct_id, false)
return false return false;
} }
if (e.keyCode == 66) { if (e.keyCode == 66) {
var id = $('.selectedToot').attr('unique-id') var id = $(".selectedToot").attr('unique-id')
var acct_id = $('#timeline_' + selectedColumn).attr('data-acct') var acct_id = $('#timeline_' + selectedColumn).attr("data-acct")
rt(id, acct_id, false) rt(id, acct_id, false)
return false return false;
} }
if (e.keyCode == 82) { if (e.keyCode == 82) {
var id = $('.selectedToot').attr('unique-id') var id = $(".selectedToot").attr('unique-id')
var acct_id = $('#timeline_' + selectedColumn).attr('data-acct') var acct_id = $('#timeline_' + selectedColumn).attr("data-acct")
var ats_cm = $('.selectedToot .rep-btn').attr('data-men') var ats_cm = $('.selectedToot .rep-btn').attr("data-men")
var mode = $('.selectedToot .rep-btn').attr('data-visen') var mode = $('.selectedToot .rep-btn').attr("data-visen")
re(id, ats_cm, acct_id, mode) re(id, ats_cm, acct_id, mode)
return false return false;
} }
} }
//textareaフォーカス時 //textareaフォーカス時
@@ -237,27 +224,23 @@ $(function($) {
//C+S+(No):ワンクリ //C+S+(No):ワンクリ
if ((event.metaKey || event.ctrlKey) && event.shiftKey) { if ((event.metaKey || event.ctrlKey) && event.shiftKey) {
if (e.keyCode >= 49 && e.keyCode <= 51) { if (e.keyCode >= 49 && e.keyCode <= 51) {
var no = e.keyCode - 48 var no = e.keyCode - 48;
if (localStorage.getItem('oks-' + no)) { if (localStorage.getItem("oks-" + no)) { $("#textarea").val($("#textarea").val() + localStorage.getItem("oks-" + no)) }
$('#textarea').val($('#textarea').val() + localStorage.getItem('oks-' + no)) return false;
}
return false
} }
} }
} }
} }
}) });
//クリアボタン //クリアボタン
$('#clear').click(function() { $("#clear").click(function () {
clear() clear();
}) });
}) });
//選択する //選択する
function tootSelector(column, toot) { function tootSelector(column, toot) {
$('.cvo').removeClass('selectedToot') $('.cvo').removeClass("selectedToot")
$('#timeline_' + column + ' .cvo') $('#timeline_' + column + ' .cvo').eq(toot).addClass("selectedToot")
.eq(toot)
.addClass('selectedToot')
var scr = $('.tl-box[tlid=' + column + ']').scrollTop() var scr = $('.tl-box[tlid=' + column + ']').scrollTop()
var elem = $('.selectedToot').offset().top var elem = $('.selectedToot').offset().top
var top = elem - $('.tl-box').height() + scr var top = elem - $('.tl-box').height() + scr

View File

@@ -1,28 +1,24 @@
//バージョンチェッカー //バージョンチェッカー
function verck(ver, jp) { function verck(ver, jp) {
console.log('%c Welcome😊 ' + ver, 'color: red;font-size:200%;') console.log('%c Welcome😊', 'color: red;font-size:200%;')
$('body').addClass(localStorage.getItem('platform'))
var date = new Date() var date = new Date()
var showVer = false var show = false
//Spotify
if (localStorage.getItem('spotify')) {
localStorage.removeItem('spotify')
localStorage.removeItem('spotify-refresh')
var spDc = 'Spotify NowPlaying sysytem was changed, please re-login to Spotify'
if(lang.language == 'ja') {
spDc = 'Spotify NowPlayingの機能が変更されたため、もう一度ログインしてください'
}
Swal.fire({
type: 'info',
title: spDc,
})
}
//Spotify(e)
if (localStorage.getItem('ver') != ver && localStorage.getItem('winstore')) { if (localStorage.getItem('ver') != ver && localStorage.getItem('winstore')) {
showVer = true //ちょっと削除とリンク解析の都合上アレ(s)
//対象外のアプデ:storageが20の最初まで"Usamin (18.6.5)"
if (!localStorage.getItem('usamin_18_6_5_flag')) {
localStorage.setItem('usamin_18_6_5_flag', true)
var multi = localStorage.getItem('column')
var obj = JSON.parse(multi)
for (var i = 0; i < obj.length; i++) {
localStorage.removeItem('card_' + i)
}
}
//ちょっと削除とリンク解析の都合上アレ(e)
show = true
console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;') console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;')
$(document).ready(function() { $(document).ready(function() {
if (localStorage.getItem('winstore') && !pwa) { if (localStorage.getItem('winstore')) {
$('#releasenote').modal('open') $('#releasenote').modal('open')
} }
verp = ver.replace('(', '') verp = ver.replace('(', '')
@@ -41,8 +37,8 @@ function verck(ver, jp) {
}) })
} }
localStorage.setItem('ver', ver) localStorage.setItem('ver', ver)
if (!showVer) { if (!show) {
console.log(showVer) console.log(show)
if ( if (
date.getFullYear() * 100 + date.getMonth() + 1 >= localStorage.getItem('showSupportMe') || date.getFullYear() * 100 + date.getMonth() + 1 >= localStorage.getItem('showSupportMe') ||
!localStorage.getItem('showSupportMe') !localStorage.getItem('showSupportMe')
@@ -72,7 +68,7 @@ function verck(ver, jp) {
} }
var platform = localStorage.getItem('platform') var platform = localStorage.getItem('platform')
console.log('Your platform:' + platform) console.log('Your platform:' + platform)
if (!localStorage.getItem('winstore') && !pwa) { if (!localStorage.getItem('winstore')) {
$('#start').css('display', 'flex') $('#start').css('display', 'flex')
} }
if ( if (
@@ -146,10 +142,9 @@ function verck(ver, jp) {
if (!localStorage.getItem('last-notice-id')) { if (!localStorage.getItem('last-notice-id')) {
localStorage.setItem('last-notice-id', 0) localStorage.setItem('last-notice-id', 0)
} }
var start = 'https://thedesk.top/notice/index.php?since_id=' + localStorage.getItem('last-notice-id') var start = 'https://thedesk.top/notice?since_id=' + localStorage.getItem('last-notice-id')
fetch(start, { fetch(start, {
method: 'GET', method: 'GET'
cors: true
}) })
.then(function(response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
@@ -177,7 +172,7 @@ function verck(ver, jp) {
} else { } else {
if (obj.type == 'textv2') { if (obj.type == 'textv2') {
if (~obj.languages.indexOf(lang.language)) { if (~obj.languages.indexOf(lang.language)) {
var showVer = true var show = true
if (obj.toot != '') { if (obj.toot != '') {
var toot = var toot =
'<button class="btn-flat toast-action" onclick="detEx(\'' + '<button class="btn-flat toast-action" onclick="detEx(\'' +
@@ -188,25 +183,25 @@ function verck(ver, jp) {
} }
if (obj.ver != '') { if (obj.ver != '') {
if (obj.ver == ver) { if (obj.ver == ver) {
showVer = true show = true
} else { } else {
showVer = false show = false
} }
} }
if (obj.domain != '') { if (obj.domain != '') {
var multi = localStorage.getItem('multi') var multi = localStorage.getItem('multi')
if (multi) { if (multi) {
showVer = false show = false
var accts = JSON.parse(multi) var accts = JSON.parse(multi)
Object.keys(accts).forEach(function(key) { Object.keys(accts).forEach(function(key) {
var acct = accts[key] var acct = accts[key]
if (acct.domain == obj.domain) { if (acct.domain == obj.domain) {
showVer = true show = true
} }
}) })
} }
} }
if (showVer) { if (show) {
M.toast({ M.toast({
html: html:
escapeHTML(obj.text) + escapeHTML(obj.text) +
@@ -236,7 +231,7 @@ function infowebsocket() {
if (obj.type == 'textv2') { if (obj.type == 'textv2') {
if (~obj.languages.indexOf(lang.language)) { if (~obj.languages.indexOf(lang.language)) {
localStorage.setItem('last-notice-id', obj.id) localStorage.setItem('last-notice-id', obj.id)
var showVer = true var show = true
if (obj.toot != '') { if (obj.toot != '') {
var toot = var toot =
'<button class="btn-flat toast-action" onclick="detEx(\'' + '<button class="btn-flat toast-action" onclick="detEx(\'' +
@@ -247,25 +242,25 @@ function infowebsocket() {
} }
if (obj.ver != '') { if (obj.ver != '') {
if (obj.ver == ver) { if (obj.ver == ver) {
showVer = true show = true
} else { } else {
showVer = false show = false
} }
} }
if (obj.domain != '') { if (obj.domain != '') {
var multi = localStorage.getItem('multi') var multi = localStorage.getItem('multi')
if (multi) { if (multi) {
showVer = false show = false
var accts = JSON.parse(multi) var accts = JSON.parse(multi)
Object.keys(accts).forEach(function(key) { Object.keys(accts).forEach(function(key) {
var acct = accts[key] var acct = accts[key]
if (acct.domain == obj.domain) { if (acct.domain == obj.domain) {
showVer = true show = true
} }
}) })
} }
} }
if (showVer) { if (show) {
console.log(obj.text) console.log(obj.text)
console.log(escapeHTML(obj.text)) console.log(escapeHTML(obj.text))
M.toast({ M.toast({
@@ -328,77 +323,49 @@ function closeSupport() {
) )
} }
function storeDialog(platform, ver) { function storeDialog(platform, ver) {
if($('body').hasClass('accessibility')) return false
if (platform == 'win32') { if (platform == 'win32') {
var mes = lang.lang_version_platform var mes = lang.lang_version_platform
} else if (platform == 'linux') { } else if (platform == 'linux') {
var mes = lang.lang_version_platform_linux var mes = lang.lang_version_platform_linux
} else if (platform == 'darwin') { } else if (platform == 'darwin') {
var mes = lang.lang_version_platform_mac var mes = lang.lang_version_platform_mac
} else {
var mes = false
} }
if (mes) { Swal.fire({
Swal.fire({ title: 'Select your platform',
title: 'Select your platform', text: mes,
text: mes, type: 'info',
type: 'info', showCancelButton: true,
showCancelButton: true, confirmButtonColor: '#3085d6',
confirmButtonColor: '#3085d6', cancelButtonColor: '#3085d6',
cancelButtonColor: '#3085d6', confirmButtonText: lang.lang_no,
confirmButtonText: lang.lang_no, cancelButtonText: lang.lang_yesno
cancelButtonText: lang.lang_yesno }).then(result => {
}).then(result => { //逆にしてる
//逆にしてる if (!result.value) {
if (!result.value) { localStorage.setItem('winstore', 'winstore')
localStorage.setItem('winstore', 'winstore') } else {
} else { localStorage.setItem('winstore', 'localinstall')
localStorage.setItem('winstore', 'localinstall') }
}
localStorage.setItem('ver', ver)
showVer = true
if(pwa) return false
console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;')
$(document).ready(function() {
$('#releasenote').modal('open')
verp = ver.replace('(', '')
verp = verp.replace('.', '-')
verp = verp.replace('.', '-')
verp = verp.replace('[', '-')
verp = verp.replace(']', '')
verp = verp.replace(')', '')
verp = verp.replace(' ', '_')
console.log('%c ' + verp, 'color: red;font-size:200%;')
if (lang.language == 'ja') {
$('#release-' + verp).show()
} else {
$('#release-en').show()
}
})
})
} else {
localStorage.setItem('ver', ver) localStorage.setItem('ver', ver)
showVer = true show = true
console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;') console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;')
$(document).ready(function() { $(document).ready(function() {
if(pwa) return false $('#releasenote').modal('open')
$('#releasenote').modal('open') verp = ver.replace('(', '')
verp = ver.replace('(', '') verp = verp.replace('.', '-')
verp = verp.replace('.', '-') verp = verp.replace('.', '-')
verp = verp.replace('.', '-') verp = verp.replace('[', '-')
verp = verp.replace('[', '-') verp = verp.replace(']', '')
verp = verp.replace(']', '') verp = verp.replace(')', '')
verp = verp.replace(')', '') verp = verp.replace(' ', '_')
verp = verp.replace(' ', '_') console.log('%c ' + verp, 'color: red;font-size:200%;')
console.log('%c ' + verp, 'color: red;font-size:200%;') if (lang.language == 'ja') {
if (lang.language == 'ja') { $('#release-' + verp).show()
$('#release-' + verp).show() } else {
} else { $('#release-en').show()
$('#release-en').show() }
} })
}) })
}
} }
function closeStart() { function closeStart() {
$('#start').css('display', 'none') $('#start').css('display', 'none')

View File

@@ -1,105 +1,84 @@
var defaultemojiList = ['activity', 'flag', 'food', 'nature', 'object', 'people', 'place', 'symbol'] var defaultemojiList = ["activity", "flag", "food", "nature", "object", "people", "place", "symbol"];
var defaultemoji = { var defaultemoji = {
activity: activity, activity: activity,
flag: flag, flag: flag,
food: food, food: food,
nature: nature, nature: nature,
object: object, object: object,
people: people, people: people,
place: place, place: place,
symbol: symbol symbol: symbol
} };
if (lang == 'ja') { if (lang == "ja") {
var defaultemojiname = { var defaultemojiname = {
activity: '活動', activity: "活動",
flag: '国旗', flag: "国旗",
food: '食べ物', food: "食べ物",
nature: '自然', nature: "自然",
object: 'もの', object: "もの",
people: 'ひと', people: "ひと",
place: '場所', place: "場所",
symbol: '記号' symbol: "記号"
} };
} else { } else {
var defaultemojiname = { var defaultemojiname = {
activity: 'Activities', activity: "Activities",
flag: 'Flags', flag: "Flags",
food: 'Foods', food: "Foods",
nature: 'Nature', nature: "Nature",
object: 'Tools', object: "Tools",
people: 'People', people: "People",
place: 'Places', place: "Places",
symbol: 'Symbols' symbol: "Symbols"
} };
} }
function defaultEmoji(target) { function defaultEmoji(target) {
var announcement = false var json = defaultemoji[target];
if ($('#media').val() == 'announcement') { var emojis = "";
announcement = true Object.keys(json).forEach(function (key) {
} var emoji = json[key];
var json = defaultemoji[target] emojis = emojis + '<a onclick="defEmoji(\'' + emoji["shortcode"] + '\')" class="pointer"><span style="width: 20px; height: 20px; display: inline-block; background-image: url(\'../../img/sheet.png\'); background-size: 4900%; background-position: ' + emoji["css"] + ';"></span></a>';
var emojis = '' });
Object.keys(json).forEach(function(key) { $("#emoji-list").html(emojis);
var emoji = json[key] $("#now-emoji").text(lang.lang_defaultemojis_text.replace("{{cat}}", defaultemojiname[target]));
if (announcement) { $(".emoji-control").addClass("hide");
var def = `<a onclick="emojiReactionDef('${emoji['shortcode']}')" class="pointer">`
} else {
var def = `<a onclick="defEmoji('${emoji['shortcode']}')" class="pointer">`
}
emojis =
emojis +
`${def}
<span style="
width: 20px; height: 20px; display: inline-block; background-image: url('../../img/sheet.png'); background-size: 4900%;
background-position:${emoji['css']};"></span>
</a>`
})
$('#emoji-list').html(emojis)
$('#now-emoji').text(lang.lang_defaultemojis_text.replace('{{cat}}', defaultemojiname[target]))
$('.emoji-control').addClass('hide')
} }
function customEmoji() { function customEmoji() {
$('#emoji-suggest').val('') $("#emoji-suggest").val("");
$('.emoji-control').removeClass('hide') $(".emoji-control").removeClass("hide");
emojiList('home') emojiList('home')
} }
function defEmoji(target) { function defEmoji(target) {
var selin = $('#textarea').prop('selectionStart') var selin = $("#textarea").prop('selectionStart');
if (!selin) { if (!selin) {
selin = 0 selin = 0;
} }
var emojiraw = newpack.filter(function(item, index) { var emojiraw = newpack.filter(function (item, index) {
if (item.short_name == target) return true if (item.short_name == target) return true;
}) });
var hex = emojiraw[0].unified.split('-') var hex = emojiraw[0].unified.split("-");
if (hex.length === 2) { if (hex.length === 2) {
emoji = twemoji.convert.fromCodePoint(hex[0]) + twemoji.convert.fromCodePoint(hex[1]) emoji = twemoji.convert.fromCodePoint(hex[0]) + twemoji.convert.fromCodePoint(hex[1]);
} else { } else {
emoji = twemoji.convert.fromCodePoint(hex[0]) emoji = twemoji.convert.fromCodePoint(hex[0]);
} }
var now = $('#textarea').val() var now = $("#textarea").val();
var before = now.substr(0, selin) var before = now.substr(0, selin);
var after = now.substr(selin, now.length) var after = now.substr(selin, now.length);
newt = before + emoji + after newt = before + emoji + after;
$('#textarea').val(newt) $("#textarea").val(newt);
$('#textarea').focus() $("#textarea").focus();
} }
function faicon() { function faicon() {
var json = faicons var json = faicons;
var emojis = '' var emojis = "";
Object.keys(json).forEach(function(key) { Object.keys(json).forEach(function (key) {
var emoji = json[key] var emoji = json[key];
var eje = emoji.replace(/fa-/g, '') var eje = emoji.replace(/fa-/g, "");
emojis = emojis = emojis + '<a onclick="emojiInsert(\'[faicon]' + eje + '[/faicon]\')" class="pointer white-text" style="font-size:24px"><i class="fa ' + emoji + '"></i></a>';
emojis + });
'<a onclick="emojiInsert(\'[faicon]' + $("#emoji-list").html(emojis);
eje + $("#now-emoji").text("faicon");
'[/faicon]\')" class="pointer white-text" style="font-size:24px"><i class="fa ' + $(".emoji-control").addClass("hide");
emoji +
'"></i></a>'
})
$('#emoji-list').html(emojis)
$('#now-emoji').text('faicon')
$('.emoji-control').addClass('hide')
} }

View File

@@ -47,9 +47,6 @@ function ck() {
multiSelector(false) multiSelector(false)
verck(ver, jp) verck(ver, jp)
$('.stw').show() $('.stw').show()
if (localStorage.getItem('tips')) {
tips(localStorage.getItem('tips'))
}
$('#something-wrong img').attr('src', '../../img/thinking.svg') $('#something-wrong img').attr('src', '../../img/thinking.svg')
} }
} }
@@ -590,10 +587,9 @@ function enc(ver) {
} }
//インスタンスティッカー //インスタンスティッカー
function ticker() { function ticker() {
var start = 'https://s.0px.io/json' var start = 'https://toot.app/toot/'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
cors: true,
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
} }
@@ -611,8 +607,7 @@ function ticker() {
}) })
.then(function(json) { .then(function(json) {
if (json) { if (json) {
localStorage.removeItem('ticker') localStorage.setItem('ticker', JSON.stringify(json))
localStorage.setItem('sticker', JSON.stringify(json))
} }
}) })
} }

View File

@@ -252,31 +252,11 @@ function multiDel(target) {
var newdom = oldcol.domain var newdom = oldcol.domain
} }
var type = oldcol.type var type = oldcol.type
var data = null
if(oldcol.data) {
data = oldcol.data
}
var background = null
if(oldcol.background) {
background = oldcol.background
}
var text = null
if(oldcol.text) {
text = oldcol.text
}
var left_fold = false
if(oldcol.left_fold) {
left_fold = true
}
//消した垢のコラムじゃないときコピー //消した垢のコラムじゃないときコピー
if (target != oldcol.domain) { if (target != oldcol.domain) {
var add = { var add = {
domain: newdom, domain: newdom,
type: type, type: type
data: data,
background: background,
text: text,
left_fold: left_fold
} }
newcols.push(add) newcols.push(add)
} }
@@ -526,7 +506,7 @@ function misskeyLogin(url) {
if (!url) { if (!url) {
var url = $('#misskey-url').val() var url = $('#misskey-url').val()
} }
var start = 'https://' + url + '/api/app/create' var start = 'http://' + url + '/api/app/create'
var httpreq = new XMLHttpRequest() var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true) httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json') httpreq.setRequestHeader('Content-Type', 'application/json')

View File

@@ -46,17 +46,10 @@ $(document).on('click', 'a', e => {
udgEx(url, 'main') udgEx(url, 'main')
return false return false
} else { } else {
if(pwa) { postMessage(['openUrl', url], '*')
return true
} else {
postMessage(['openUrl', url], '*')
}
} }
} }
} else { } else {
if(pwa) {
return true
}
//hrefがhttp/httpsならブラウザで //hrefがhttp/httpsならブラウザで
if (urls) { if (urls) {
if (urls[0]) { if (urls[0]) {
@@ -140,7 +133,6 @@ function nano() {
postMessage(['nano', null], '*') postMessage(['nano', null], '*')
} }
onmessage = function(e) { onmessage = function(e) {
console.log(e)
if (e.data[0] == 'details') { if (e.data[0] == 'details') {
details(e.data[1][0], e.data[1][1]) details(e.data[1][0], e.data[1][1])
} else if (e.data[0] == 'udg') { } else if (e.data[0] == 'udg') {
@@ -150,10 +142,10 @@ onmessage = function(e) {
} else if (e.data[0] == 'post') { } else if (e.data[0] == 'post') {
post('pass') post('pass')
} else if (e.data[0] == 'toastSaved') { } else if (e.data[0] == 'toastSaved') {
var showTxt = `${lang.lang_img_DLDone}${ var show = `${lang.lang_img_DLDone}${
e.data[1][0] e.data[1][0]
}<button class="btn-flat toast-action" onclick="openFinder('${e.data[1][1]}')">Show</button>` }<button class="btn-flat toast-action" onclick="openFinder('${e.data[1][1]}')">Show</button>`
M.toast({ html: showTxt, displayLength: 5000 }) M.toast({ html: show, displayLength: 5000 })
} else if (e.data[0] == 'parseColumn') { } else if (e.data[0] == 'parseColumn') {
parseColumn(e.data[1]) parseColumn(e.data[1])
} else if (e.data[0] == 'exportSettingsCore') { } else if (e.data[0] == 'exportSettingsCore') {
@@ -187,10 +179,6 @@ onmessage = function(e) {
asRead() asRead()
} else if (e.data[0] == 'asReadEnd') { } else if (e.data[0] == 'asReadEnd') {
asReadEnd() asReadEnd()
} else if (e.data[0] == 'accessibility') {
console.log('atrue')
$('body').addClass('accessibility')
$('.window-title').before('<div class="accessMark">Screen Reader Optimized</div>')
} else if (e.data[0] == 'logData') { } else if (e.data[0] == 'logData') {
$('#logs').val(e.data[1]) $('#logs').val(e.data[1])
var obj = document.getElementById('logs') var obj = document.getElementById('logs')
@@ -202,23 +190,3 @@ onmessage = function(e) {
}) })
} }
} }
/* PWA */
if(pwa) {
function postMessage(e) {
if (e[0] == 'openUrl') {
urls = e[1].match(/https?:\/\/(.+)/)
if (urls) {
Swal.fire({
title: 'Open URL',
icon: 'info',
html:
`If you are OK, click: <a href="${urls[0]}" target="_blank" class="btn waves-effect">Here</a>`,
showCloseButton: false,
showCancelButton: true,
focusConfirm: false,
confirmButtonText: 'Close'
})
}
}
}
}

View File

@@ -1,3 +1,4 @@
document.title = 'TheDesk'
$.strip_tags = function(str, allowed) { $.strip_tags = function(str, allowed) {
if (!str) { if (!str) {
return '' return ''
@@ -204,7 +205,7 @@ function escapeCsv(str) {
return str return str
} }
var result var result
result = str.toString().replace(/\"/g, '""') result = str.replace(/\"/g, '""')
if (result.indexOf(',') >= 0) { if (result.indexOf(',') >= 0) {
result = '"' + result + '"' result = '"' + result + '"'
} }

View File

@@ -1,28 +1,6 @@
var electron = require('electron') var electron = require('electron')
const shell = electron.shell const shell = electron.shell
var ipc = electron.ipcRenderer var ipc = electron.ipcRenderer
//title bar
const customTitlebar = require('custom-electron-titlebar')
window.addEventListener('DOMContentLoaded', () => {
document.title = 'TheDesk'
ipc.send('acsCheck', '')
ipc.send('frameCheck', '')
ipc.on('frame', function(event, args) {
const file = location.href.substr(-10)
if (
file == 'index.html' ||
file == '/acct.html' ||
file == 'tting.html'
) {
new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#000'),
titleHorizontalAlignment: 'right',
icon: '../../img/desk.png'
})
}
})
})
onmessage = function(e) { onmessage = function(e) {
if (e.data[0] == 'openUrl') { if (e.data[0] == 'openUrl') {
urls = e.data[1].match(/https?:\/\/(.+)/) urls = e.data[1].match(/https?:\/\/(.+)/)
@@ -49,7 +27,7 @@ onmessage = function(e) {
} else if (e.data[0] == 'generalDL') { } else if (e.data[0] == 'generalDL') {
ipc.send('general-dl', e.data[1]) ipc.send('general-dl', e.data[1])
} else if (e.data[0] == 'openFinder') { } else if (e.data[0] == 'openFinder') {
ipc.send('openFinder', e.data[1]) ipc.send('open-finder', e.data[1])
} else if (e.data[0] == 'columnDel') { } else if (e.data[0] == 'columnDel') {
ipc.send('column-del', e.data[1]) ipc.send('column-del', e.data[1])
} else if (e.data[0] == 'lang') { } else if (e.data[0] == 'lang') {
@@ -70,8 +48,6 @@ onmessage = function(e) {
ipc.send('theme-json-request', e.data[1]) ipc.send('theme-json-request', e.data[1])
} else if (e.data[0] == 'ha') { } else if (e.data[0] == 'ha') {
ipc.send('ha', e.data[1]) ipc.send('ha', e.data[1])
} else if (e.data[0] == 'frameSet') {
ipc.send('frameSet', e.data[1])
} else if (e.data[0] == 'ua') { } else if (e.data[0] == 'ua') {
ipc.send('ua', e.data[1]) ipc.send('ua', e.data[1])
} else if (e.data[0] == 'aboutData') { } else if (e.data[0] == 'aboutData') {
@@ -156,12 +132,12 @@ ipc.on('resizeJudgement', function(event, b64) {
var width = element.naturalWidth var width = element.naturalWidth
var height = element.naturalHeight var height = element.naturalHeight
if (width > resize || height > resize) { if (width > resize || height > resize) {
ipc.send('resize-image', [b64[0], resize]) ipc.send('resize-image', [b64, resize])
} else { } else {
postMessage(['media', [b64[0], 'image/png', b64[1]]], '*') postMessage(['media', [b64[0], 'image/png', b64[1]]], '*')
} }
} }
element.src = 'data:image/png;base64,' + b64[0] element.src = b64
} else { } else {
postMessage(['media', [b64[0], 'image/png', b64[1]]], '*') postMessage(['media', [b64[0], 'image/png', b64[1]]], '*')
} }
@@ -171,7 +147,7 @@ ipc.on('general-dl-prog', function(event, arg) {
console.log('Progress: ' + arg) console.log('Progress: ' + arg)
}) })
ipc.on('general-dl-message', function(event, arg) { ipc.on('general-dl-message', function(event, arg) {
var argC = arg.replace(/\\/g, '\\\\') var argC = arg.replace(/\\/g, '\\\\') + '\\\\.'
console.log('saved') console.log('saved')
postMessage(['toastSaved', [arg, argC]], '*') postMessage(['toastSaved', [arg, argC]], '*')
}) })
@@ -232,16 +208,12 @@ ipc.on('prog', function(event, arg) {
ipc.on('mess', function(event, arg) { ipc.on('mess', function(event, arg) {
postMessage(['updateMess', arg], '*') postMessage(['updateMess', arg], '*')
}) })
//misc
ipc.on('asRead', function(event, arg) { ipc.on('asRead', function(event, arg) {
postMessage(['asRead', ''], '*') postMessage(['asRead', ''], '*')
}) })
ipc.on('asReadEnd', function(event, arg) { ipc.on('asReadEnd', function(event, arg) {
postMessage(['asReadEnd', ''], '*') postMessage(['asReadEnd', ''], '*')
}) })
ipc.on('accessibility', function(event, arg) {
postMessage(['accessibility', 'true'], '*')
})
var webviewDom = document.getElementById('webview') var webviewDom = document.getElementById('webview')
if (webviewDom) { if (webviewDom) {
webviewDom.addEventListener('new-window', function(e) { webviewDom.addEventListener('new-window', function(e) {

View File

@@ -193,15 +193,7 @@ function emojiGet(parse, started) {
function emojiList(target, reaction) { function emojiList(target, reaction) {
$('#now-emoji').text(lang.lang_emoji_custom) $('#now-emoji').text(lang.lang_emoji_custom)
var acct_id = $('#post-acct-sel').val() var acct_id = $('#post-acct-sel').val()
if(reaction && $('#media').val() == 'misskey') { if (reaction && localStorage.getItem('emojiReaction_' + acct_id) != 'true') {
var misskeyReact = true
} else {
var misskeyReact = false
}
if (
misskeyReact &&
localStorage.getItem('emojiReaction_' + acct_id) != 'true'
) {
console.error('Disabled') console.error('Disabled')
clear() clear()
hide() hide()
@@ -271,20 +263,9 @@ function emojiList(target, reaction) {
var emoji = obj[i] var emoji = obj[i]
if (emoji) { if (emoji) {
if (reaction) { if (reaction) {
if (emoji.divider) { html =
html = html + '<p style="margin-bottom:0">' + emoji.cat + '</p>' html +
} else { `<a onclick="emojiReaction(':${emoji.shortcode}:')" class="pointer"><img src="${emoji.url}" width="20" title="${emoji.shortcode}"></a>`
if (emoji.listed) {
if(misskeyReact) {
var shortcode = `:${emoji.shortcode}:`
} else {
var shortcode = emoji.shortcode
}
html =
html +
`<a onclick="emojiReaction('${shortcode}')" class="pointer"><img src="${emoji.url}" width="20" title="${emoji.shortcode}"></a>`
}
}
} else { } else {
if (emoji.divider) { if (emoji.divider) {
html = html + '<p style="margin-bottom:0">' + emoji.cat + '</p>' html = html + '<p style="margin-bottom:0">' + emoji.cat + '</p>'

View File

@@ -86,7 +86,7 @@ function handleFileUpload(files, obj, no) {
} }
//ファイルアップロード //ファイルアップロード
async function media(b64, type, no, stamped) { function media(b64, type, no, stamped) {
var acct_id = $('#post-acct-sel').val() var acct_id = $('#post-acct-sel').val()
var domain = localStorage.getItem('domain_' + acct_id) var domain = localStorage.getItem('domain_' + acct_id)
var user = localStorage.getItem('user_' + acct_id) var user = localStorage.getItem('user_' + acct_id)
@@ -130,57 +130,18 @@ async function media(b64, type, no, stamped) {
httpreq.send(fd) httpreq.send(fd)
} else { } else {
var previewer = 'preview_url' var previewer = 'preview_url'
//v2/media var start = 'https://' + domain + '/api/v1/media'
try { httpreq.open('POST', start, true)
var id = await v2MediaUpload(domain, at, fd) httpreq.upload.addEventListener('progress', progshow, false)
if(!id) { httpreq.responseType = 'json'
var start = 'https://' + domain + '/api/v1/media' httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.open('POST', start, true) httpreq.send(fd)
httpreq.upload.addEventListener('progress', progshow, false)
httpreq.responseType = 'json'
httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.send(fd)
} else {
var mediav = $('#media').val()
var regExp = new RegExp('tmp_' + r, 'g')
mediav = mediav.replace(regExp, id)
$('#media').val(mediav)
var html = `<img src="../../img/picture.svg" class="preview-img pointer unknown" data-media="${id}" oncontextmenu="deleteImage('${id}')" onclick="altImage('${acct_id}','${id}')" title="${lang.lang_postimg_delete}">`
$('#preview').append(html)
todc()
if (localStorage.getItem('nsfw_' + acct_id)) {
$('#nsfw').addClass('yellow-text')
$('#nsfw').html('visibility')
$('#nsfw').addClass('nsfw-avail')
}
$('.toot-btn-group').prop('disabled', false)
$('select').formSelect()
$('#mec').text(lang.lang_there)
M.toast({ html: '<span>' + lang.lang_postimg_sync + '</span><button class="btn-flat toast-action" onclick="syncDetail()">Click</button>', displayLength: 3000 })
$('#imgup').text('')
$('#imgsel').show()
localStorage.removeItem('image')
}
} catch {
var start = 'https://' + domain + '/api/v1/media'
httpreq.open('POST', start, true)
httpreq.upload.addEventListener('progress', progshow, false)
httpreq.responseType = 'json'
httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.send(fd)
}
} }
httpreq.onreadystatechange = function() { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response var json = httpreq.response
if (this.status !== 200) { if (this.status !== 200) {
setLog(start, this.status, json) setLog(start, this.status, json)
$('.toot-btn-group').prop('disabled', false)
$('select').formSelect()
$('#mec').text(lang.lang_there)
M.toast({ html: this.status + ':' +json, displayLength: 2000 })
$('#imgup').text('')
$('#imgsel').show()
} }
if (!json.id) { if (!json.id) {
todc() todc()
@@ -192,10 +153,6 @@ async function media(b64, type, no, stamped) {
M.toast({ html: lang.lang_postimg_failupload, displayLength: 5000 }) M.toast({ html: lang.lang_postimg_failupload, displayLength: 5000 })
return false return false
} }
$('#imgup').text('')
$('.toot-btn-group').prop('disabled', false)
$('select').formSelect()
$('#imgsel').show()
var img = localStorage.getItem('img') var img = localStorage.getItem('img')
if (json.type.indexOf('image') != -1) { if (json.type.indexOf('image') != -1) {
var html = `<img src="${json[previewer]}" class="preview-img pointer" data-media="${json['id']}" oncontextmenu="deleteImage('${json['id']}')" onclick="altImage('${acct_id}','${json['id']}')" title="${lang.lang_postimg_delete}">` var html = `<img src="${json[previewer]}" class="preview-img pointer" data-media="${json['id']}" oncontextmenu="deleteImage('${json['id']}')" onclick="altImage('${acct_id}','${json['id']}')" title="${lang.lang_postimg_delete}">`
@@ -215,6 +172,19 @@ async function media(b64, type, no, stamped) {
if (img == 'url' && json['text_url']) { if (img == 'url' && json['text_url']) {
$('#textarea').val($('#textarea').val() + ' ' + json['text_url']) $('#textarea').val($('#textarea').val() + ' ' + json['text_url'])
} }
todc()
if (localStorage.getItem('nsfw_' + acct_id)) {
$('#nsfw').addClass('yellow-text')
$('#nsfw').html('visibility')
$('#nsfw').addClass('nsfw-avail')
}
$('.toot-btn-group').prop('disabled', false)
$('select').formSelect()
$('#mec').text(lang.lang_there)
M.toast({ html: lang.lang_postimg_aftupload, displayLength: 1000 })
$('#imgup').text('')
$('#imgsel').show()
localStorage.removeItem('image')
} }
} }
} }
@@ -299,84 +269,54 @@ function altImage(acct_id, id) {
var domain = localStorage.getItem('domain_' + acct_id) var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem('acct_' + acct_id + '_at') var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = 'https://' + domain + '/api/v1/media/' + id var start = 'https://' + domain + '/api/v1/media/' + id
if($('[data-media=' + id + ']').hasClass('unknown')) {
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
Authorization: 'Bearer ' + at
}
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
console.log(json)
$('[data-media=' + id + ']').removeClass('unknown')
if(json.preview_url) {
$('[data-media=' + id + ']').attr('src', json.preview_url)
}
})
} else {
Swal.fire({
title: lang.lang_postimg_desc,
text: lang.lang_postimg_leadContext,
input: 'text',
inputAttributes: {
autocapitalize: 'off'
},
showCancelButton: true,
confirmButtonText: 'Post',
showLoaderOnConfirm: true,
preConfirm: data => {
return fetch(start, {
method: 'PUT',
headers: {
'content-type': 'application/json',
Authorization: 'Bearer ' + at
},
body: JSON.stringify({
description: data
})
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
console.log(json)
$('[data-media=' + id + ']').attr('title', data)
})
},
allowOutsideClick: () => !Swal.isLoading()
}).then(result => {
if (result.value) {
Swal.fire({
title: 'Complete'
})
}
})
}
Swal.fire({
title: lang.lang_postimg_desc,
text: lang.lang_postimg_leadContext,
input: 'text',
inputAttributes: {
autocapitalize: 'off'
},
showCancelButton: true,
confirmButtonText: 'Post',
showLoaderOnConfirm: true,
preConfirm: data => {
return fetch(start, {
method: 'PUT',
headers: {
'content-type': 'application/json',
Authorization: 'Bearer ' + at
},
body: JSON.stringify({
description: data
})
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
console.log(json)
$('[data-media=' + id + ']').attr('title', data)
})
},
allowOutsideClick: () => !Swal.isLoading()
}).then(result => {
if (result.value) {
Swal.fire({
title: 'Complete'
})
}
})
} }
function stamp() { function stamp() {
if ($('#stamp').hasClass('stamp-avail')) { if ($('#stamp').hasClass('stamp-avail')) {
@@ -387,41 +327,3 @@ function stamp() {
$('#stamp').addClass('stamp-avail') $('#stamp').addClass('stamp-avail')
} }
} }
//v2/media対応
async function v2MediaUpload(domain, at, fd) {
var start = 'https://' + domain + '/api/v2/media'
let promise = await fetch(start, {
method: 'POST',
headers: {
Authorization:
'Bearer ' + at
},
body: fd
})
var json = await promise.json()
if(json.id) {
return json.id
} else {
return false
}
}
function alertProcessUnfinished() {
Swal.fire({
title: lang.lang_post_unfinishedMedia,
type: 'error',
showCancelButton: true,
confirmButtonText: lang.lang_post_retry,
cancelButtonText: lang.lang_no
}).then(result => {
if (result.value) {
post()
}
})
}
function syncDetail() {
Swal.fire({
title: lang.lang_post_syncDetail,
text: lang.lang_post_syncDetailText,
type: 'info'
})
}

View File

@@ -116,7 +116,6 @@ function reactiontoggle(id, acct_id, tlid) {
//reactioncustom //reactioncustom
function reactioncustom(acct_id, id) { function reactioncustom(acct_id, id) {
$('#reply').val(id) $('#reply').val(id)
$('#media').val('misskey')
$('#unreact').hide() $('#unreact').hide()
$('#addreact').removeClass('hide') $('#addreact').removeClass('hide')
$('#post-acct-sel').val(acct_id) $('#post-acct-sel').val(acct_id)
@@ -187,14 +186,9 @@ function reactRefreshCore(json) {
} }
} }
function emojiReaction(emoji) { function emojiReaction(emoji) {
var media = $('#media').val()
var acct_id = $('#post-acct-sel').val() var acct_id = $('#post-acct-sel').val()
var id = $('#reply').val() var id = $('#reply').val()
if(media == 'announcement') { reaction(emoji, id, acct_id, null)
announReaction(id, acct_id, 0, false, emoji)
} else {
reaction(emoji, id, acct_id, null)
}
clear() clear()
hide() hide()
} }

View File

@@ -122,10 +122,6 @@ function post(mode, postvis) {
console.log('This toot will be posted at:' + scheduled) console.log('This toot will be posted at:' + scheduled)
schedule() schedule()
toot.scheduled_at = scheduled toot.scheduled_at = scheduled
if($('#sch-box').hasClass('expire')) {
toot.scheduled_at = null
toot.expires_at = scheduled
}
} else { } else {
var scheduled = '' var scheduled = ''
} }
@@ -170,49 +166,21 @@ function post(mode, postvis) {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response var json = httpreq.response
if (this.status !== 200) { if (this.status !== 200) {
if(media && this.status == 422) { setLog(start, this.status, json)
$('#ideKey').val('')
$('.toot-btn-group').prop('disabled', false)
alertProcessUnfinished()
} else {
setLog(start, this.status, json)
var box = localStorage.getItem('box')
if (box == 'yes' || !box) {
$('#textarea').blur()
hide()
}
$('.toot-btn-group').prop('disabled', false)
todc()
clear()
}
} else { } else {
$('#ideKey').val('') $('#ideKey').val('')
var box = localStorage.getItem('box')
if (box == 'yes' || !box) {
$('#textarea').blur()
hide()
}
$('.toot-btn-group').prop('disabled', false)
todc()
clear()
} }
var box = localStorage.getItem('box')
if (box == 'yes' || !box) {
$('#textarea').blur()
hide()
}
$('.toot-btn-group').prop('disabled', false)
todc()
clear()
} }
} }
} }
function expPostMode() {
$('#sch-box').toggleClass('expire')
if($('#sch-box').hasClass('expire')) {
Swal.fire({
type: 'info',
title: 'Expiring toot On'
})
} else {
Swal.fire({
type: 'info',
title: 'Expireing toot Off'
})
}
}
function misskeyPost() { function misskeyPost() {
var str = $('#textarea').val() var str = $('#textarea').val()
var acct_id = $('#post-acct-sel').val() var acct_id = $('#post-acct-sel').val()

View File

@@ -96,9 +96,9 @@ function cw() {
} }
} }
//TLでコンテントワーニングを表示トグル //TLでコンテントワーニングを表示トグル
function cw_show(e) { function cw_show(id) {
$(e).parent().parent().find('.cw_hide').toggleClass('cw') $('.cw_hide_' + id).toggleClass('cw')
$(e).parent().find('.cw_long').toggleClass('hide') $('.cw-long-' + id).toggleClass('hide')
} }
$(function() { $(function() {
$('#cw-text').on('change', function(event) { $('#cw-text').on('change', function(event) {

View File

@@ -160,14 +160,8 @@ function bkm(id, acct_id, tlid) {
//フォロー //フォロー
async function follow(acct_id, resolve) { async function follow(acct_id, resolve) {
if($('#his-data').hasClass('locked')) {
locked = true
} else {
locked = false
}
if (!acct_id && acct_id != 'selector') { if (!acct_id && acct_id != 'selector') {
var acct_id = $('#his-data').attr('use-acct') var acct_id = $('#his-data').attr('use-acct')
} else if (acct_id == 'selector') { } else if (acct_id == 'selector') {
var acct_id = $('#user-acct-sel').val() var acct_id = $('#user-acct-sel').val()
} }
@@ -178,7 +172,6 @@ async function follow(acct_id, resolve) {
var flag = 'follow' var flag = 'follow'
var flagm = 'create' var flagm = 'create'
} }
var id = $('#his-data').attr('user-id') var id = $('#his-data').attr('user-id')
if (resolve == 'selector') { if (resolve == 'selector') {
var fullacct = $('#his-acct').attr('fullname') var fullacct = $('#his-acct').attr('fullname')
@@ -212,11 +205,7 @@ async function follow(acct_id, resolve) {
$('#his-follow-btn-text').text(lang.lang_status_follow) $('#his-follow-btn-text').text(lang.lang_status_follow)
} else { } else {
$('#his-data').addClass('following') $('#his-data').addClass('following')
if(locked) { $('#his-follow-btn-text').text(lang.lang_status_unfollow)
$('#his-follow-btn-text').text(lang.lang_status_requesting)
} else {
$('#his-follow-btn-text').text(lang.lang_status_unfollow)
}
} }
} }
} }

View File

@@ -1,145 +0,0 @@
function announParse(obj, acct_id, tlid) {
var template = ''
var datetype = localStorage.getItem('datetype')
var gif = localStorage.getItem('gif')
//Ticker
var tickerck = localStorage.getItem('ticker_ok')
if (tickerck == 'yes') {
var ticker = true
} else if (!ticker || ticker == 'no') {
var ticker = false
}
if (!datetype) {
datetype = 'absolute'
}
if (!gif) {
var gif = 'yes'
}
Object.keys(obj).forEach(function(key) {
var toot = obj[key]
var content = toot.content
if (toot.emojis) {
Object.keys(toot.emojis).forEach(function(key1) {
var emoji = toot.emojis[key1]
var shortcode = emoji.shortcode
if (gif == 'yes') {
var emoSource = emoji.url
} else {
var emoSource = emoji.static_url
}
var emoji_url = `
<img draggable="false" src="${emoSource}" class="emoji-img" data-emoji="${shortcode}"
alt=" :${shortcode}: " title="${shortcode}" onclick="this.classList.toggle('bigemoji');">
`
var regExp = new RegExp(':' + shortcode + ':', 'g')
content = content.replace(regExp, emoji_url)
})
}
content = twemoji.parse(content)
var reactions = ''
//既存のリアクション
if (toot.reactions) {
Object.keys(toot.reactions).forEach(function(key2) {
var reaction = toot.reactions[key2]
//普通の絵文字 or カスタム絵文字 は文字数判断。ただしスコットランド国旗みたいなやべぇやつに注意
var splitter = new GraphemeSplitter()
if (splitter.splitGraphemes(reaction.name).length > 1) {
//カスタム絵文字
var shortcode = reaction.shortcode
if (gif == 'yes') {
var emoSource = reaction.url
} else {
var emoSource = reaction.static_url
}
var emoji_url = `
<img draggable="false" src="${emoSource}" class="emoji-img" data-emoji="${shortcode}"
alt=" :${shortcode}: " title="${shortcode}">`
} else {
emoji_url = twemoji.parse(reaction.name)
}
var addClass = ''
if (reaction.me) {
addClass = 'reactioned'
}
reactions =
reactions +
`<div class="announReaction ${addClass}" onclick="announReaction('${toot.id}', '${acct_id}', '${tlid}', ${reaction.me},'${reaction.name}')">
${emoji_url} ${reaction.count}
</div>`
})
}
if (toot.ends_at) {
var ended = `<div class="announReaction" title="${date(toot.ends_at, 'absolute')}" style="width: auto; cursor: default;">
<i class="fas fa-arrow-right"></i>
${date(toot.ends_at, datetype)}
</div>`
} else {
var ended = ''
}
template =
template +
`<div class="announcement" data-id="${toot.id}">
${content}
<div class="reactionsPack">
${reactions}
<div class="announReaction add" onclick="announReactionNew('${toot.id}', '${acct_id}', '${tlid}')"><i class="fas fa-plus"></i></div>
${ended}
</div>
</div>`
})
return template
}
function announReaction(id, acct_id, tlid, del, name) {
var at = localStorage.getItem('acct_' + acct_id + '_at')
var domain = localStorage.getItem('domain_' + acct_id)
var start = 'https://' + domain + '/api/v1/announcements/' + id + '/reactions/' + encodeURIComponent(name)
var httpreq = new XMLHttpRequest()
if(del) {
var method = 'DELETE'
} else {
var method = 'PUT'
}
httpreq.open(method, start, true)
httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = 'json'
httpreq.send()
httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) {
var json = httpreq.response
if (this.status !== 200) {
setLog(start, this.status, this.response)
}
announ(acct_id, tlid)
}
}
}
function announReactionNew(id, acct_id, tlid) {
$('#reply').val(id)
$('#media').val('announcement')
$('#unreact').hide()
$('#addreact').removeClass('hide')
$('#post-acct-sel').val(acct_id)
$('select').formSelect()
localStorage.setItem('nohide', true)
show()
emojiToggle(true)
$('#left-side').hide()
}
function emojiReactionDef(target) {
var emojiraw = newpack.filter(function(item, index) {
if (item.short_name == target) return true
})
var hex = emojiraw[0].unified.split('-')
if (hex.length === 2) {
emoji = twemoji.convert.fromCodePoint(hex[0]) + twemoji.convert.fromCodePoint(hex[1])
} else {
emoji = twemoji.convert.fromCodePoint(hex[0])
}
var acct_id = $('#post-acct-sel').val()
var id = $('#reply').val()
announReaction(id, acct_id, 0, false, emoji)
clear()
hide()
}

View File

@@ -3,7 +3,7 @@
function dirMenu() { function dirMenu() {
$("#dir-contents").html(""); $("#dir-contents").html("");
directory(); directory();
$("#left-menu a").removeClass("active"); $("#left-menu div").removeClass("active");
$("#dirMenu").addClass("active"); $("#dirMenu").addClass("active");
$(".menu-content").addClass("hide"); $(".menu-content").addClass("hide");
$("#dir-box").removeClass("hide"); $("#dir-box").removeClass("hide");

View File

@@ -14,46 +14,6 @@ function mediaToggle(tlid) {
$('#timeline_' + tlid).addClass('media-filter') $('#timeline_' + tlid).addClass('media-filter')
} }
} }
/* Remote only */
function remoteOnly(tlid, type) {
var multi = localStorage.getItem('column')
var obj = JSON.parse(multi)
if (obj[tlid].data) {
if (obj[tlid].data.remote) {
obj[tlid].data.remote = false
var json = JSON.stringify(obj)
localStorage.setItem('column', json)
$('#sta-remote-' + tlid).text('Off')
$('#sta-remote-' + tlid).css('color', '#009688')
} else {
obj[tlid].data.remote = true
var json = JSON.stringify(obj)
localStorage.setItem('column', json)
$('#sta-remote-' + tlid).text('On')
$('#sta-remote-' + tlid).css('color', 'red')
}
} else {
obj[tlid].data = {}
obj[tlid].data.remote = true
var json = JSON.stringify(obj)
localStorage.setItem('column', json)
$('#sta-remote-' + tlid).text('On')
$('#sta-remote-' + tlid).css('color', 'red')
}
columnReload(tlid, type)
}
function remoteOnlyCk(tlid) {
var multi = localStorage.getItem('column')
var obj = JSON.parse(multi)
if (obj[tlid].data) {
if (obj[tlid].data.remote) {
$('#sta-remote-' + tlid).text('On')
$('#sta-remote-' + tlid).css('color', 'red')
return true
}
}
return false
}
//各TL上方のBT[BTOnly/BTExc/Off] //各TL上方のBT[BTOnly/BTExc/Off]
function ebtToggle(tlid) { function ebtToggle(tlid) {
var ebt = localStorage.getItem('ebt_' + tlid) var ebt = localStorage.getItem('ebt_' + tlid)
@@ -141,7 +101,7 @@ function delreset(tlid) {
} }
/*ワードフィルター機能*/ /*ワードフィルター機能*/
function filterMenu() { function filterMenu() {
$('#left-menu a').removeClass('active') $('#left-menu div').removeClass('active')
$('#filterMenu').addClass('active') $('#filterMenu').addClass('active')
$('.menu-content').addClass('hide') $('.menu-content').addClass('hide')
$('#filter-box').removeClass('hide') $('#filter-box').removeClass('hide')
@@ -157,26 +117,26 @@ function filter() {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
Authorization: 'Bearer ' + at, Authorization: 'Bearer ' + at
}, }
}) })
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error)
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function (json) { .then(function(json) {
if (json) { if (json) {
var filters = '' var filters = ''
Object.keys(json).forEach(function (key) { Object.keys(json).forEach(function(key) {
var filterword = json[key] var filterword = json[key]
var context = filterword.context.join(',') var context = filterword.context.join(',')
filters = filters =
@@ -220,9 +180,6 @@ function makeNewFilter() {
if ($('#conv_filter:checked').val()) { if ($('#conv_filter:checked').val()) {
cont.push('thread') cont.push('thread')
} }
if ($('#prof_filter:checked').val()) {
cont.push('profiles')
}
if (!cont.length) { if (!cont.length) {
$('#filtered-words').html('Error:' + lang.lang_filter_errordegree) $('#filtered-words').html('Error:' + lang.lang_filter_errordegree)
} }
@@ -231,7 +188,10 @@ function makeNewFilter() {
if (!who) { if (!who) {
who = false who = false
} }
var time = $('#days_filter').val() * 24 * 60 * 60 + $('#hours_filter').val() * 60 * 60 + $('#mins_filter').val() * 60 var time =
$('#days_filter').val() * 24 * 60 * 60 +
$('#hours_filter').val() * 60 * 60 +
$('#mins_filter').val() * 60
var domain = localStorage.getItem('domain_' + acct_id) var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem('acct_' + acct_id + '_at') var at = localStorage.getItem('acct_' + acct_id + '_at')
if ($('#filter-edit-id').val()) { if ($('#filter-edit-id').val()) {
@@ -253,10 +213,10 @@ function makeNewFilter() {
context: cont, context: cont,
irreversible: exc, irreversible: exc,
whole_word: who, whole_word: who,
expires_in: time, expires_in: time
}) })
) )
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response var json = httpreq.response
if (this.status !== 200) { if (this.status !== 200) {
@@ -269,7 +229,6 @@ function makeNewFilter() {
$('#local_filter').prop('checked', false) $('#local_filter').prop('checked', false)
$('#notf_filter').prop('checked', false) $('#notf_filter').prop('checked', false)
$('#conv_filter').prop('checked', false) $('#conv_filter').prop('checked', false)
$('#prof_filter').prop('checked', false)
$('#except_filter').prop('checked', false) $('#except_filter').prop('checked', false)
$('#wholeword_filter').prop('checked', false) $('#wholeword_filter').prop('checked', false)
$('#days_filter').val('0') $('#days_filter').val('0')
@@ -300,29 +259,29 @@ function filterEdit(id, acct_id) {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
Authorization: 'Bearer ' + at, Authorization: 'Bearer ' + at
}, }
}) })
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error)
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function (json) { .then(function(json) {
if (json) { if (json) {
var now = new Date() var now = new Date()
now = now.getTime() now = now.getTime()
var now = Math.floor(now / 1000) var now = Math.floor(now / 1000)
$('#filter-add-word').val(json.phrase) $('#filter-add-word').val(json.phrase)
Object.keys(json.context).forEach(function (key) { Object.keys(json.context).forEach(function(key) {
var context = json.context[key] var context = json.context[key]
$('[value=' + context + ']').prop('checked', true) $('[value=' + context + ']').prop('checked', true)
}) })
@@ -352,7 +311,7 @@ function filterDel(id, acct_id) {
httpreq.setRequestHeader('Authorization', 'Bearer ' + at) httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = 'json' httpreq.responseType = 'json'
httpreq.send() httpreq.send()
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response var json = httpreq.response
if (this.status !== 200) { if (this.status !== 200) {
@@ -372,23 +331,23 @@ function getFilter(acct_id) {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
Authorization: 'Bearer ' + at, Authorization: 'Bearer ' + at
}, }
}) })
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error)
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function (json) { .then(function(json) {
localStorage.setItem('filter_' + acct_id, JSON.stringify(json)) localStorage.setItem('filter_' + acct_id, JSON.stringify(json))
}) })
} else { } else {
@@ -407,13 +366,13 @@ function getFilterType(json, type) {
type = 'notifi' type = 'notifi'
} }
var mutedfilters = [] var mutedfilters = []
Object.keys(json).forEach(function (key) { Object.keys(json).forEach(function(key) {
var filterword = json[key] var filterword = json[key]
var phrases = filterword.phrase var phrases = filterword.phrase
var arr = filterword.context var arr = filterword.context
if (arr.join(',').indexOf(type) !== -1) { if (arr.join(',').indexOf(type) !== -1) {
mutedfilters.push(phrases) mutedfilters.push(phrases)
} else if (type == 'mix') { } else if (type == 'mix'){
if (arr.indexOf('home') !== -1 || arr.indexOf('public') !== -1) { if (arr.indexOf('home') !== -1 || arr.indexOf('public') !== -1) {
mutedfilters.push(phrases) mutedfilters.push(phrases)
} }
@@ -437,23 +396,23 @@ function filterUpdate(acct_id) {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
Authorization: 'Bearer ' + at, Authorization: 'Bearer ' + at
}, }
}) })
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error)
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function (json) { .then(function(json) {
localStorage.setItem('filter_' + acct_id, JSON.stringify(json)) localStorage.setItem('filter_' + acct_id, JSON.stringify(json))
filterUpdateInternal(json, 'home') filterUpdateInternal(json, 'home')
filterUpdateInternal(json, 'local') filterUpdateInternal(json, 'local')
@@ -469,11 +428,13 @@ function filterUpdateInternal(json, type) {
home = home.concat(wordmute) home = home.concat(wordmute)
} }
if (home) { if (home) {
$('[data-acct=' + acct_id + '] [data-type=' + type + '] .cvo').each(function (i, elem) { $('[data-acct=' + acct_id + '] [data-type=' + type + '] .cvo').each(function(i, elem) {
var id = $(elem).attr('toot-id') var id = $(elem).attr('toot-id')
$('[toot-id=' + id + ']').removeClass('hide') $('[toot-id=' + id + ']').removeClass('hide')
var text = $(elem).find('.toot').html() var text = $(elem)
Object.keys(home).forEach(function (key8) { .find('.toot')
.html()
Object.keys(home).forEach(function(key8) {
var word = home[key8] var word = home[key8]
var regExp = new RegExp(word.replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&'), 'g') var regExp = new RegExp(word.replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&'), 'g')
if ($.strip_tags(text).match(regExp)) { if ($.strip_tags(text).match(regExp)) {
@@ -553,6 +514,7 @@ function resetNotfFilter(tlid) {
} }
function notfFilter(id, tlid, acct_id) { function notfFilter(id, tlid, acct_id) {
var excludetxt = localStorage.getItem('exclude-' + tlid) var excludetxt = localStorage.getItem('exclude-' + tlid)
console.log(excludetxt)
if (excludetxt || excludetxt != '') { if (excludetxt || excludetxt != '') {
excludetxt = excludetxt + '&account_id=' + id excludetxt = excludetxt + '&account_id=' + id
} else { } else {

View File

@@ -1,5 +1,5 @@
function listMenu() { function listMenu() {
$('#left-menu a').removeClass('active') $('#left-menu div').removeClass('active')
$('#listMenu').addClass('active') $('#listMenu').addClass('active')
$('.menu-content').addClass('hide') $('.menu-content').addClass('hide')
$('#list-box').removeClass('hide') $('#list-box').removeClass('hide')

View File

@@ -360,20 +360,22 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
if ((toot.cw || toot.cw == "") && cw) { if ((toot.cw || toot.cw == "") && cw) {
var content = escapeHTML(toot.text); var content = escapeHTML(toot.text);
var spoil = escapeHTMLtemp(toot.cw); var spoil = escapeHTMLtemp(toot.cw);
var spoiler = "cw cw_hide"; var spoiler = "cw cw_hide_" + toot.id;
var api_spoil = "gray"; var api_spoil = "gray";
var spoiler_show = '<a href="#" onclick="cw_show(this)" class="nex parsed cw_btn">' + lang.lang_parse_cwshow + '</a><br>'; var spoiler_show = '<a href="#" onclick="cw_show(\'' + toot.id +
'\')" class="nex parsed cw_btn">' + lang.lang_parse_cwshow + '</a><br>';
} else { } else {
var ct1 = nl2br(toot.text).split('<br />').length - 2; var ct1 = nl2br(toot.text).split('<br />').length - 2;
var ct2 = nl2br(toot.text).split('<br>').length - 2; var ct2 = nl2br(toot.text).split('<br>').length - 2;
if (ct1 > ct2) { var ct = ct1; } else { var ct = ct2; } if (ct1 > ct2) { var ct = ct1; } else { var ct = ct2; }
if ((sent < ct && $.mb_strlen($.strip_tagstemp(toot.text)) > 5) || ($.strip_tagstemp(toot.text).length > ltr && $.mb_strlen($.strip_tagstemp(toot.text)) > 5)) { if ((sent < ct && $.mb_strlen($.strip_tagstemp(toot.text)) > 5) || ($.strip_tagstemp(toot.text).length > ltr && $.mb_strlen($.strip_tagstemp(toot.text)) > 5)) {
var content = '<span class="gray">' + lang.lang_parse_fulltext + '</span><br>' + escapeHTMLtemp(toot.text) var content = '<span class="gray">' + lang.lang_parse_fulltext + '</span><br>' + escapeHTMLtemp(toot.text)
var spoil = '<span class="cw_long">' + $.mb_substr($.strip_tagstemp( var spoil = '<span class="cw-long-' + toot.id + '">' + $.mb_substr($.strip_tagstemp(
toot.text), 0, 100) + toot.text), 0, 100) +
'</span><span class="gray">' + lang.lang_parse_autofold + '</span>'; '</span><span class="gray">' + lang.lang_parse_autofold + '</span>';
var spoiler = "cw cw_hide"; var spoiler = "cw cw_hide_" + toot.id;
var spoiler_show = '<a href="#" onclick="cw_show(this)" class="nex parsed cw_btn">' + lang.lang_parse_more + '</a><br>'; var spoiler_show = '<a href="#" onclick="cw_show(\'' + toot.id +
'\')" class="nex parsed cw_btn">' + lang.lang_parse_more + '</a><br>';
} else { } else {
var content = escapeHTMLtemp(toot.text); var content = escapeHTMLtemp(toot.text);
if (toot.cw) { if (toot.cw) {
@@ -878,7 +880,7 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
} }
var ftxt = lang.lang_parse_followed; var ftxt = lang.lang_parse_followed;
if (popup > 0 || popup == -1) { if (popup > 0 || popup == -1) {
var notftext = '<span class="cbadge" title="' + date(toot.createdAt, var notftext = '<span class="cbadge"title="' + date(toot.createdAt,
'absolute') + '(' + lang.lang_parse_notftime + ')"><i class="far fa-clock"></i>' + date(toot.createdAt, 'absolute') + '(' + lang.lang_parse_notftime + ')"><i class="far fa-clock"></i>' + date(toot.createdAt,
datetype) + datetype) +
'</span>' + ftxt + '<br>'; '</span>' + ftxt + '<br>';

View File

@@ -239,10 +239,8 @@ function notfWS(misskey, acct_id, tlid, domain, at) {
localStorage.setItem('lastnotf_' + acct_id, obj.id) localStorage.setItem('lastnotf_' + acct_id, obj.id)
if (!$('#unread_' + tlid + ' .material-icons').hasClass('teal-text')) { if (!$('#unread_' + tlid + ' .material-icons').hasClass('teal-text')) {
//markers show中はダメ //markers show中はダメ
if (obj.type != 'follow' && obj.type != 'follow_request') { if (obj.type != 'follow') {
templete = parse([obj], 'notf', acct_id, 'notf', popup) templete = parse([obj], 'notf', acct_id, 'notf', popup)
} else if (obj.type == 'follow_request') {
templete = userparse([obj.account], 'request', acct_id, 'notf', -1)
} else { } else {
templete = userparse([obj], obj.type, acct_id, 'notf', popup) templete = userparse([obj], obj.type, acct_id, 'notf', popup)
} }
@@ -408,11 +406,6 @@ function notfCanceler(acct) {
localStorage.removeItem('notf-follow_' + acct) localStorage.removeItem('notf-follow_' + acct)
$('.notf-follow_' + acct).addClass('hide') $('.notf-follow_' + acct).addClass('hide')
$('.notf-icon_' + acct).removeClass('red-text') $('.notf-icon_' + acct).removeClass('red-text')
var id = $('#announce_' + acct + ' .announcement').first().attr('data-id')
$('.notf-announ_' + acct + '_ct').text("")
if(id) {
localStorage.setItem('announ_' + acct, id)
}
} }
function allNotfRead() { function allNotfRead() {
var multi = localStorage.getItem('multi') var multi = localStorage.getItem('multi')

View File

@@ -194,7 +194,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
var local = [] var local = []
var times = [] var times = []
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function(key) {
var domain = localStorage.getItem('domain_' + acct_id) var domain = localStorage.getItem('domain_' + acct_id)
var toot = obj[key] var toot = obj[key]
if (type == 'dm') { if (type == 'dm') {
@@ -214,7 +214,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
//絵文字があれば //絵文字があれば
if (actemojick) { if (actemojick) {
Object.keys(toot.account.emojis).forEach(function (key5) { Object.keys(toot.account.emojis).forEach(function(key5) {
var emoji = toot.account.emojis[key5] var emoji = toot.account.emojis[key5]
var shortcode = emoji.shortcode var shortcode = emoji.shortcode
if (gif == 'yes') { if (gif == 'yes') {
@@ -241,7 +241,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
noticeavatar = toot.account.avatar_static noticeavatar = toot.account.avatar_static
} }
noticeavatar = `<a onclick="udg('${toot.account.id}','${acct_id}');" user="${toot.account.acct}" class="udg"> noticeavatar = `<a onclick="udg('${toot.account.id}','${acct_id}');" user="${toot.account.acct}" class="udg">
<img draggable="false" src="${noticeavatar}" width="20" class="notf-icon prof-img" user="${toot.account.acct}" alt=""> <img draggable="false" src="${noticeavatar}" width="20" class="notf-icon prof-img" user="${toot.account.acct}">
</a>` </a>`
if (toot.type == 'mention') { if (toot.type == 'mention') {
var what = lang.lang_parse_mentioned var what = lang.lang_parse_mentioned
@@ -268,15 +268,15 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} else { } else {
var notfFilHide = '' var notfFilHide = ''
} }
var noticetext = `<span onclick="notfFilter('${toot.account.id}','${tlid}');" class=" pointer big-text ${notfFilHide}"><i class="fas fa-filter" var noticetext = `<i class="fas fa-filter pointer big-text ${notfFilHide}"
title="${lang.lang_parse_notffilter}"> onclick="notfFilter('${toot.account.id}','${tlid}');" title="${lang.lang_parse_notffilter}">
</i><span class="voice">${lang.lang_parse_notffilter}</span></span> </i>
<span class="cbadge cbadge-hover" title="${date(toot.created_at, 'absolute')}(${ <span class="cbadge cbadge-hover" title="${date(toot.created_at, 'absolute')}(${
lang.lang_parse_notftime lang.lang_parse_notftime
})" aria-hidden="true"><i class="far fa-clock"></i> })">
<i class="far fa-clock"></i>
${date(toot.created_at, datetype)} ${date(toot.created_at, datetype)}
</span> </span>
<span class="voice">${date(toot.created_at, 'absolute')}(${lang.lang_parse_notftime})</span>
<i class="big-text fas ${icon}"></i> <i class="big-text fas ${icon}"></i>
<a onclick="udg('${toot.account.id}','${acct_id}')" class="pointer grey-text"> <a onclick="udg('${toot.account.id}','${acct_id}')" class="pointer grey-text">
${dis_name}(@${toot.account.acct}) ${dis_name}(@${toot.account.acct})
@@ -369,7 +369,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
//絵文字があれば //絵文字があれば
if (actemojick) { if (actemojick) {
Object.keys(toot.account.emojis).forEach(function (key5) { Object.keys(toot.account.emojis).forEach(function(key5) {
var emoji = toot.account.emojis[key5] var emoji = toot.account.emojis[key5]
var shortcode = emoji.shortcode var shortcode = emoji.shortcode
if (gif == 'yes') { if (gif == 'yes') {
@@ -393,8 +393,8 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} else { } else {
noticeavatar = toot.account.avatar_static noticeavatar = toot.account.avatar_static
} }
noticeavatar = `<a onclick="udg('${toot.account.id}','${acct_id}');" user="${toot.account.acct}" class="udg" aria-hidden="true"> noticeavatar = `<a onclick="udg('${toot.account.id}','${acct_id}');" user="${toot.account.acct}" class="notf-icon udg">
<img draggable="false" src="${noticeavatar}" width="20" class="notf-icon prof-img" <img draggable="false" src="${noticeavatar}" width="20" class="prof-img"
user="${toot.account.acct}" onerror="this.src=\'../../img/loading.svg\'"> user="${toot.account.acct}" onerror="this.src=\'../../img/loading.svg\'">
</a>` </a>`
var rebtxt = lang.lang_parse_btedsimple var rebtxt = lang.lang_parse_btedsimple
@@ -426,7 +426,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
//絵文字があれば //絵文字があれば
if (actemojick) { if (actemojick) {
Object.keys(toot.account.emojis).forEach(function (key5) { Object.keys(toot.account.emojis).forEach(function(key5) {
var emoji = toot.account.emojis[key5] var emoji = toot.account.emojis[key5]
var shortcode = emoji.shortcode var shortcode = emoji.shortcode
if (gif == 'yes') { if (gif == 'yes') {
@@ -454,7 +454,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var fullname = toot.account.acct + '@' + domain var fullname = toot.account.acct + '@' + domain
} }
if (useremp) { if (useremp) {
Object.keys(useremp).forEach(function (key10) { Object.keys(useremp).forEach(function(key10) {
var user = useremp[key10] var user = useremp[key10]
if (user == fullname) { if (user == fullname) {
boostback = 'emphasized' boostback = 'emphasized'
@@ -494,7 +494,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var via = escapeHTML(toot.application.name) var via = escapeHTML(toot.application.name)
if (empCli) { if (empCli) {
//強調チェック //強調チェック
Object.keys(empCli).forEach(function (key6) { Object.keys(empCli).forEach(function(key6) {
var empCliList = empCli[key6] var empCliList = empCli[key6]
if (empCliList == via) { if (empCliList == via) {
boostback = 'emphasized' boostback = 'emphasized'
@@ -503,7 +503,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
if (muteCli) { if (muteCli) {
//ミュートチェック //ミュートチェック
Object.keys(muteCli).forEach(function (key7) { Object.keys(muteCli).forEach(function(key7) {
var muteCliList = muteCli[key7] var muteCliList = muteCli[key7]
if (muteCliList == via) { if (muteCliList == via) {
boostback = 'hide' boostback = 'hide'
@@ -516,9 +516,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
if (toot.spoiler_text && cw) { if (toot.spoiler_text && cw) {
var spoil = escapeHTML(toot.spoiler_text) var spoil = escapeHTML(toot.spoiler_text)
var spoiler = 'cw cw_hide' var spoiler = 'cw cw_hide_' + toot.id
var api_spoil = 'gray' var api_spoil = 'gray'
var spoiler_show = `<a href="#" onclick="cw_show(this)" class="nex parsed cw_btn">${lang.lang_parse_cwshow}<span class="voice">${lang.lang_parse_cwshow_acc}</span></a><br>` var spoiler_show = `<a href="#" onclick="cw_show('${toot.id}')" class="nex parsed cw_btn">${lang.lang_parse_cwshow}</a><br>`
} else { } else {
if (content) { if (content) {
var ct1 = content.split('</p>').length + content.split('<br />').length - 2 var ct1 = content.split('</p>').length + content.split('<br />').length - 2
@@ -538,14 +538,14 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
($.mb_strlen($.strip_tags(content)) > ltr && $.mb_strlen($.strip_tags(content)) > 5) ($.mb_strlen($.strip_tags(content)) > ltr && $.mb_strlen($.strip_tags(content)) > 5)
) { ) {
var content = `<span class="gray">${lang.lang_parse_fulltext}</span><br>` + content var content = `<span class="gray">${lang.lang_parse_fulltext}</span><br>` + content
var spoil = `<span class="cw_long">${$.mb_substr( var spoil = `<span class="cw-long-${toot.id}">${$.mb_substr(
$.strip_tags(content), $.strip_tags(content),
0, 0,
100 100
)}</span> )}</span>
<span class="gray">${lang.lang_parse_autofold}</span>` <span class="gray">${lang.lang_parse_autofold}</span>`
var spoiler = 'cw cw_hide' var spoiler = 'cw cw_hide_' + toot.id
var spoiler_show = `<a href="#" onclick="cw_show(this)" class="nex parsed cw_btn"> var spoiler_show = `<a href="#" onclick="cw_show('${toot.id}')" class="nex parsed cw_btn">
${lang.lang_parse_more} ${lang.lang_parse_more}
</a><br>` </a><br>`
} else { } else {
@@ -576,7 +576,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
if (urls) { if (urls) {
var analyze = `<a onclick="additionalIndv('${tlid}','${acct_id}','${id}')" class="add-show pointer" aria-hidden="true"> var analyze = `<a onclick="additionalIndv('${tlid}','${acct_id}','${id}')" class="add-show pointer">
${lang.lang_parse_url} ${lang.lang_parse_url}
</a><br>` </a><br>`
} else { } else {
@@ -597,7 +597,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
if (mediack) { if (mediack) {
hasmedia = 'hasmedia' hasmedia = 'hasmedia'
var cwdt = 100 / toot.media_attachments.length var cwdt = 100 / toot.media_attachments.length
Object.keys(toot.media_attachments).forEach(function (key2) { Object.keys(toot.media_attachments).forEach(function(key2) {
var media = toot.media_attachments[key2] var media = toot.media_attachments[key2]
var purl = media.preview_url var purl = media.preview_url
media_ids = media_ids + media.id + ',' media_ids = media_ids + media.id + ','
@@ -621,7 +621,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
viewer + viewer +
`<a onclick="imgv('${id}','${key2}','${acct_id}')" id="${id}'-image-${key2}" `<a onclick="imgv('${id}','${key2}','${acct_id}')" id="${id}'-image-${key2}"
data-url="${url}" data-type="video" class="img-parsed"> data-url="${url}" data-type="video" class="img-parsed">
<video src="${purl}" class="${sense} toot-img pointer" style="max-width:100%;" loop="true" alt="attached media"> <video src="${purl}" class="${sense} toot-img pointer" style="max-width:100%;" loop="true">
</a></span>` </a></span>`
} else { } else {
if (media.type == 'unknown') { if (media.type == 'unknown') {
@@ -634,7 +634,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
viewer + viewer +
'<audio src="' + '<audio src="' +
url + url +
'" class="pointer" style="width:100%;" controls alt="attached media"></span>' '" class="pointer" style="width:100%;" controls></span>'
} else { } else {
if (media.description) { if (media.description) {
var desc = media.description var desc = media.description
@@ -652,7 +652,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
id="${id}-image-${key2}" data-url="${url}" data-original="${remote_url}" data-type="${media.type}" id="${id}-image-${key2}" data-url="${url}" data-original="${remote_url}" data-type="${media.type}"
class="img-parsed img-link" style="width:calc(${cwdt}% - 1px); height:${imh};"> class="img-parsed img-link" style="width:calc(${cwdt}% - 1px); height:${imh};">
<img draggable="false" src="${purl}" class="${sense} toot-img pointer" <img draggable="false" src="${purl}" class="${sense} toot-img pointer"
onerror="this.src=\'../../img/loading.svg\'" title="${escapeHTML(desc)}" alt="${escapeHTML(desc)}"> onerror="this.src=\'../../img/loading.svg\'" title="${desc}">
${nsfwmes} ${nsfwmes}
</a>` </a>`
} }
@@ -669,7 +669,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
if (menck) { if (menck) {
mentions = '' mentions = ''
var to_mention = [] var to_mention = []
Object.keys(toot.mentions).forEach(function (key3) { Object.keys(toot.mentions).forEach(function(key3) {
var mention = toot.mentions[key3] var mention = toot.mentions[key3]
//自分は除外 //自分は除外
//自インスタンスかどうかを確認し、IDの一致 //自インスタンスかどうかを確認し、IDの一致
@@ -683,7 +683,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
if (toot.account.acct != mention.acct) { if (toot.account.acct != mention.acct) {
mentions = mentions =
mentions + mentions +
`<a onclick="udg('${mention.id}',' ${acct_id}')" class="pointer" aria-hidden="true">@${mention.acct}</a> ` `<a onclick="udg('${mention.id}',' ${acct_id}')" class="pointer">@${mention.acct}</a> `
to_mention.push(mention.acct) to_mention.push(mention.acct)
} }
} }
@@ -704,19 +704,19 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var tags = '' var tags = ''
//タグであれば //タグであれば
if (tagck) { if (tagck) {
Object.keys(toot.tags).forEach(function (key4) { Object.keys(toot.tags).forEach(function(key4) {
var tag = toot.tags[key4] var tag = toot.tags[key4]
var featured = ` <a onclick="tagFeature('${tag.name}','${acct_id}')" class="pointer" title="add it to Featured tags">Feature</a> ` var featured = ` <a onclick="tagFeature('${tag.name}','${acct_id}')" class="pointer" title="add it to Featured tags">Feature</a> `
tags = tags =
tags + tags +
`<span class="hide" data-tag="${tag.name}" data-regTag="${tag.name.toLowerCase()}">#${ `<span class="hide" data-tag="${tag.name}" data-regTag="${tag.name.toLowerCase()}">#${
tag.name tag.name
}: }:
<a onclick="tl('tag','${tag.name}','${acct_id}','add')" class="pointer" <a onclick="tl('tag','${tag.name}','${acct_id}','add')" class="pointer"
title="${lang.lang_parse_tagTL.replace( title="${lang.lang_parse_tagTL.replace(
'{{tag}}', '{{tag}}',
'#' + tag.name '#' + tag.name
)}">TL</a> <a onclick="brInsert('#${tag.name}')" )}">TL</a> <a onclick="brInsert('#${tag.name}')"
class="pointer" title="${lang.lang_parse_tagtoot.replace('{{tag}}', '#' + tag.name)}">Toot</a>  class="pointer" title="${lang.lang_parse_tagtoot.replace('{{tag}}', '#' + tag.name)}">Toot</a> 
<a onclick="tagPin('${tag.name}')" class="pointer" title="${lang.lang_parse_tagpin.replace( <a onclick="tagPin('${tag.name}')" class="pointer" title="${lang.lang_parse_tagpin.replace(
'{{tag}}', '{{tag}}',
@@ -724,7 +724,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
)} )}
">Pin</a>${featured}</span> ` ">Pin</a>${featured}</span> `
}) })
tags = '<div style="float:right" aria-hidden="true">' + tags + '</div>' tags = '<div style="float:right">' + tags + '</div>'
} }
//リプ数 //リプ数
if (toot.replies_count || toot.replies_count === 0) { if (toot.replies_count || toot.replies_count === 0) {
@@ -739,29 +739,29 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var vis = '' var vis = ''
var visen = toot.visibility var visen = toot.visibility
if (visen == 'public') { if (visen == 'public') {
var vis = `<span onclick="staCopy('${id}')"><i class="text-darken-3 material-icons gray sml vis-data pointer" var vis = `<i class="text-darken-3 material-icons gray sml vis-data pointer"
title="${lang.lang_parse_public}(${lang.lang_parse_clickcopy})" data-vis="public" aria-hidden="true"> title="${lang.lang_parse_public}(${lang.lang_parse_clickcopy})" data-vis="public" onclick="staCopy('${id}')">
public public
</i><span class="voice">${lang.lang_parse_public} ${lang.lang_toot}(${lang.lang_parse_clickcopy})</span></span>` </i>`
var can_rt = '' var can_rt = ''
} else if (visen == 'unlisted') { } else if (visen == 'unlisted') {
var vis = `<span onclick="staCopy('${id}')"><i class="text-darken-3 material-icons blue-text sml vis-data pointer" var vis = `<i class="text-darken-3 material-icons blue-text sml vis-data pointer"
title="${lang.lang_parse_unlisted}(${lang.lang_parse_clickcopy})" data-vis="public" aria-hidden="true"> title="${lang.lang_parse_unlisted}(${lang.lang_parse_clickcopy})" data-vis="public" onclick="staCopy('${id}')">
lock_open lock_open
</i><span class="voice">${lang.lang_parse_unlisted} ${lang.lang_toot}(${lang.lang_parse_clickcopy})</span></span>` </i>`
var can_rt = '' var can_rt = ''
} else if (visen == 'private') { } else if (visen == 'private') {
var vis = `<span onclick="staCopy('${id}')"><i class="text-darken-3 material-icons orange-text sml vis-data pointer" var vis = `<i class="text-darken-3 material-icons orange-text sml vis-data pointer"
title="${lang.lang_parse_private}(${lang.lang_parse_clickcopy})" data-vis="public" aria-hidden="true"> title="${lang.lang_parse_private}(${lang.lang_parse_clickcopy})" data-vis="public" onclick="staCopy('${id}')">
lock lock
</i><span class="voice">${lang.lang_parse_private} ${lang.lang_toot}(${lang.lang_parse_clickcopy})</span></span>` </i>`
var can_rt = 'unvisible' var can_rt = 'unvisible'
} else if (visen == 'direct') { } else if (visen == 'direct') {
var vis = `<span onclick="staCopy('${id}')"><i class="text-darken-3 material-icons red-text sml vis-data pointer" var vis = `<i class="text-darken-3 material-icons red-text sml vis-data pointer"
title="${lang.lang_parse_direct}(${lang.lang_parse_clickcopy})" data-vis="public" aria-hidden="true"> title="${lang.lang_parse_direct}(${lang.lang_parse_clickcopy})" data-vis="public" onclick="staCopy('${id}')">
mail mail
</i><span class="voice">${lang.lang_parse_direct} ${lang.lang_toot}(${lang.lang_parse_clickcopy})</span></span>` </i>`
var can_rt = 'unvisible' var can_rt = 'unvisible'
} }
if (toot.account.acct == localStorage.getItem('user_' + acct_id)) { if (toot.account.acct == localStorage.getItem('user_' + acct_id)) {
@@ -812,7 +812,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
//ワードミュート //ワードミュート
if (wordmuteList) { if (wordmuteList) {
Object.keys(wordmuteList).forEach(function (key8) { Object.keys(wordmuteList).forEach(function(key8) {
var worde = wordmuteList[key8] var worde = wordmuteList[key8]
if (worde) { if (worde) {
if (worde.tag) { if (worde.tag) {
@@ -829,7 +829,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
//ワード強調 //ワード強調
if (wordempList) { if (wordempList) {
Object.keys(wordempList).forEach(function (key9) { Object.keys(wordempList).forEach(function(key9) {
var wordList = wordempList[key9] var wordList = wordempList[key9]
if (wordList) { if (wordList) {
var wordList = wordList.tag var wordList = wordList.tag
@@ -845,7 +845,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
//絵文字があれば //絵文字があれば
if (emojick) { if (emojick) {
Object.keys(toot.emojis).forEach(function (key5) { Object.keys(toot.emojis).forEach(function(key5) {
var emoji = toot.emojis[key5] var emoji = toot.emojis[key5]
var shortcode = emoji.shortcode var shortcode = emoji.shortcode
if (gif == 'yes') { if (gif == 'yes') {
@@ -871,7 +871,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} }
//絵文字があれば(nico) //絵文字があれば(nico)
if (nicoemojick) { if (nicoemojick) {
Object.keys(toot.profile_emojis).forEach(function (keynico) { Object.keys(toot.profile_emojis).forEach(function(keynico) {
var emoji = toot.profile_emojis[keynico] var emoji = toot.profile_emojis[keynico]
var shortcode = emoji.shortcode var shortcode = emoji.shortcode
var emoji_url = `<img draggable="false" src="${emoji.url}" class="emoji-img" data-emoji="${shortcode}" alt=" :${shortcode}: " var emoji_url = `<img draggable="false" src="${emoji.url}" class="emoji-img" data-emoji="${shortcode}" alt=" :${shortcode}: "
@@ -904,7 +904,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var trans = `<div class=""> var trans = `<div class="">
<a onclick="trans('${toot.language}','${lang.language}', $(this))" <a onclick="trans('${toot.language}','${lang.language}', $(this))"
class="waves-effect waves-dark btn-flat actct" style="padding:0"> class="waves-effect waves-dark btn-flat actct" style="padding:0">
<i class="material-icons" aria-hidden="true">g_translate</i>${lang.lang_parse_trans} <i class="material-icons">g_translate</i>${lang.lang_parse_trans}
</a> </a>
</div>` </div>`
} else { } else {
@@ -918,10 +918,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
//Ticker //Ticker
var tickerdom = '' var tickerdom = ''
if (ticker) { if (ticker) {
var tickerdata = localStorage.getItem('sticker') var tickerdata = localStorage.getItem('ticker')
if (tickerdata) { if (tickerdata) {
var tickerdataRaw = JSON.parse(tickerdata) var tickerdata = JSON.parse(tickerdata)
var tickerdata = tickerdataRaw.data
var thisdomain = toot.account.acct.split('@') var thisdomain = toot.account.acct.split('@')
if (thisdomain.length > 1) { if (thisdomain.length > 1) {
@@ -930,41 +929,14 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
for (var i = 0; i < tickerdata.length; i++) { for (var i = 0; i < tickerdata.length; i++) {
var value = tickerdata[i] var value = tickerdata[i]
if (value.domain == thisdomain) { if (value.domain == thisdomain) {
var bgColor = value.bgColor var tickerdom = `<div style="user-select:none;cursor:default;background:linear-gradient(90deg, ${
var fontColor = value.fontColor value.bg
if (!value.bgColor || !value.fontColor) { }, transparent 96%) !important; color:${
if (value.type == 'mastodon') { value.text
if(!value.bgColor) bgColor = tickerdataRaw.default.mastodon.bgColor };width:100%; height:0.9rem; font-size:0.8rem;" class="tickers">
if(!value.fontColor) fontColor = tickerdataRaw.default.mastodon.fontColor
} else if (value.type == 'pleroma') {
if(!value.bgColor) bgColor = tickerdataRaw.default.pleroma.bgColor
if(!value.fontColor) fontColor = tickerdataRaw.default.pleroma.fontColor
} else if (value.type == 'misskey') {
if(!value.bgColor) bgColor = tickerdataRaw.default.misskey.bgColor
if(!value.fontColor) fontColor = tickerdataRaw.default.misskey.fontColor
} else if (value.type == 'misskeylegacy') {
if(!value.bgColor) bgColor = tickerdataRaw.default.misskeylegacy.bgColor
if(!value.fontColor) fontColor = tickerdataRaw.default.misskeylegacy.fontColor
} else if (value.type == 'pixelfed') {
if(!value.bgColor) bgColor = tickerdataRaw.default.pixelfed.bgColor
if(!value.fontColor) fontColor = tickerdataRaw.default.pixelfed.fontColor
}
} else {
var bgColor = value.bgColor
var fontColor = value.fontColor
}
bgColorCSS = ''
for (let j = 0; j < bgColor.length; j++) {
const bg = bgColor[j]
bgColorCSS = bgColorCSS + bg + ','
}
bgColorCSS = `linear-gradient(90deg, ${bgColorCSS} transparent)`
var tickerdom = `<div aria-hidden="true" style="user-select:none;cursor:default;background:${bgColorCSS} !important; color:${
fontColor
};width:100%; height:0.9rem; font-size:0.8rem;" class="tickers">
<img draggable="false" src="${ <img draggable="false" src="${
value.favicon value.image
}" style="height:100%;" onerror="this.src=\'../../img/loading.svg\'"> }" style="height:100%;" onerror="this.src=\'../../img/loading.svg\'">
<span style="position:relative; top:-0.2rem;">${escapeHTML(value.name)}</span> <span style="position:relative; top:-0.2rem;">${escapeHTML(value.name)}</span>
</div>` </div>`
break break
@@ -978,14 +950,13 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
if (!quoteUser) { if (!quoteUser) {
quoteUser = toot.quote.account.acct quoteUser = toot.quote.account.acct
} }
if (!toot.quote.quote_muted) { poll =
poll = poll +
poll + `<div class="quote-renote">
`<div class="quote-renote">
<div class="renote-icon"> <div class="renote-icon">
<a onclick="udg('${toot.quote.account.id}','${acct_id}');" user="${ <a onclick="udg('${toot.quote.account.id}','${acct_id}');" user="${
toot.quote.account.acct toot.quote.account.acct
}" class="udg"> }" class="udg">
<img draggable="false" src="${toot.quote.account.avatar}"> <img draggable="false" src="${toot.quote.account.avatar}">
</a> </a>
</div> </div>
@@ -997,18 +968,12 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
</div> </div>
<div class="renote-details"> <div class="renote-details">
<a onclick="details('${ <a onclick="details('${
toot.quote.id toot.quote.id
}','${acct_id}','${tlid}','normal')" class="waves-effect waves-dark btn-flat details" style="padding:0"> }','${acct_id}','${tlid}','normal')" class="waves-effect waves-dark btn-flat details" style="padding:0">
<i class="text-darken-3 material-icons">more_vert</i> <i class="text-darken-3 material-icons">more_vert</i>
</a> </a>
</div> </div>
</div>` </div>`
} else {
poll =
poll +
`<span class="gray sml">${lang.lang_parse_hidden}</span>`
}
} }
//menuは何個 //menuは何個
var menuct = 2 var menuct = 2
@@ -1042,7 +1007,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
<div class="area-icon grid"> <div class="area-icon grid">
<a onclick="udg('${toot.account.id}','${acct_id}');" user="${toot.account.acct}" class="udg"> <a onclick="udg('${toot.account.id}','${acct_id}');" user="${toot.account.acct}" class="udg">
<img draggable="false" src="${avatar}" width="40" class="prof-img" <img draggable="false" src="${avatar}" width="40" class="prof-img"
user="${toot.account.acct}" onerror="this.src='../../img/loading.svg'" alt="" /> user="${toot.account.acct}" onerror="this.src='../../img/loading.svg'"/>
</a> </a>
${noticeavatar} ${noticeavatar}
</div> </div>
@@ -1056,7 +1021,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
<div class="flex-time"> <div class="flex-time">
<span class="cbadge cbadge-hover pointer waves-effect" onclick="tootUriCopy('${toot.url}');" <span class="cbadge cbadge-hover pointer waves-effect" onclick="tootUriCopy('${toot.url}');"
title="${date(toot.created_at, 'absolute')}(${lang.lang_parse_clickcopyurl})"> title="${date(toot.created_at, 'absolute')}(${lang.lang_parse_clickcopyurl})">
<i class="far fa-clock"></i><span class="voice">posted at </span>${date(toot.created_at, datetype)} <i class="far fa-clock"></i>${date(toot.created_at, datetype)}
</span> </span>
</div> </div>
</div> </div>
@@ -1091,17 +1056,15 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
class="waves-effect waves-dark btn-flat actct rep-btn" class="waves-effect waves-dark btn-flat actct rep-btn"
data-men="${to_mention}" data-visen="${visen}" style="padding:0" title="${lang.lang_parse_replyto}"> data-men="${to_mention}" data-visen="${visen}" style="padding:0" title="${lang.lang_parse_replyto}">
<i class="fas fa-share"></i> <i class="fas fa-share"></i>
<span class="voice">${lang.lang_parse_replyto} </span>
<span class="rep_ct">${replyct}</span> <span class="rep_ct">${replyct}</span>
</a> </a>
</div> </div>
<div class="action ${can_rt} ${disp['rt']} ${noauth}"> <div class="action ${can_rt} ${disp['rt']} ${noauth}">
<a onclick="rt('${ <a onclick="rt('${
toot.id toot.id
}','${acct_id}','${tlid}')" class="waves-effect waves-dark btn-flat actct bt-btn" }','${acct_id}','${tlid}')" class="waves-effect waves-dark btn-flat actct bt-btn"
style="padding:0" title="${lang.lang_parse_bt}"> style="padding:0" title="${lang.lang_parse_bt}">
<i class="fas fa-retweet ${if_rt} rt_${toot.id}"></i> <i class="fas fa-retweet ${if_rt} rt_${toot.id}"></i>
<span class="voice">${lang.lang_parse_bt} </span>
<span class="rt_ct">${toot.reblogs_count}</span> <span class="rt_ct">${toot.reblogs_count}</span>
</a> </a>
</div> </div>
@@ -1109,7 +1072,6 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
<a onclick="qt('${toot.id}','${acct_id}','${toot.account.acct}','${toot.url}')" <a onclick="qt('${toot.id}','${acct_id}','${toot.account.acct}','${toot.url}')"
class="waves-effect waves-dark btn-flat actct" style="padding:0" title="${lang.lang_parse_quote}"> class="waves-effect waves-dark btn-flat actct" style="padding:0" title="${lang.lang_parse_quote}">
<i class="text-darken-3 fas fa-quote-right"></i> <i class="text-darken-3 fas fa-quote-right"></i>
<span class="voice">${lang.lang_parse_quote} </span>
</a> </a>
</div> </div>
<div class="action ${disp['bkm']} ${noauth} ${bkmClass}"> <div class="action ${disp['bkm']} ${noauth} ${bkmClass}">
@@ -1117,7 +1079,6 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
class="waves-effect waves-dark btn-flat actct bkm-btn" style="padding:0" class="waves-effect waves-dark btn-flat actct bkm-btn" style="padding:0"
title="${lang.lang_parse_bookmark}"> title="${lang.lang_parse_bookmark}">
<i class="fas text-darken-3 fa-bookmark bkm_${toot.id} ${if_bkm}"></i> <i class="fas text-darken-3 fa-bookmark bkm_${toot.id} ${if_bkm}"></i>
<span class="voice">${lang.lang_parse_bookmark} </span>
</a> </a>
</div> </div>
<div class="action ${disp['fav']} ${noauth}"> <div class="action ${disp['fav']} ${noauth}">
@@ -1126,7 +1087,6 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
title="${lang.lang_parse_fav}"> title="${lang.lang_parse_fav}">
<i class="fas text-darken-3 fa-star${if_fav} fav_${uniqueid}"></i> <i class="fas text-darken-3 fa-star${if_fav} fav_${uniqueid}"></i>
<span class="fav_ct">${toot.favourites_count}</span> <span class="fav_ct">${toot.favourites_count}</span>
<span class="voice">${lang.lang_parse_fav} </span>
</a> </a>
</div> </div>
</div> </div>
@@ -1134,16 +1094,14 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
<div class="action ${noauth}"> <div class="action ${noauth}">
<a onclick="toggleAction($(this), ${menuct * 39 + 6})" <a onclick="toggleAction($(this), ${menuct * 39 + 6})"
class="ctxMenu waves-effect waves-dark btn-flat" style="padding:0"> class="ctxMenu waves-effect waves-dark btn-flat" style="padding:0">
<i class="text-darken-3 material-icons act-icon" aria-hidden="true">expand_more</i> <i class="text-darken-3 material-icons act-icon">expand_more</i>
<span class="voice">Other actions</span>
</a> </a>
</div> </div>
<div class="action ${noauth}"> <div class="action ${noauth}">
<a onclick="details('${toot.id}','${acct_id}','${tlid}','normal')" <a onclick="details('${toot.id}','${acct_id}','${tlid}','normal')"
class="waves-effect waves-dark btn-flat details ${dmHide}" style="padding:0" class="waves-effect waves-dark btn-flat details ${dmHide}" style="padding:0"
title="${lang.lang_parse_detail}"> title="${lang.lang_parse_detail}">
<i class="text-darken-3 material-icons" aria-hidden="true">menu_open</i></a> <i class="text-darken-3 material-icons">menu_open</i></a>
<span class="voice">${lang.lang_parse_detail}</span>
</div> </div>
</div> </div>
<div class="contextMenu hide z-depth-4"> <div class="contextMenu hide z-depth-4">
@@ -1173,7 +1131,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
<div class="${if_mine}"> <div class="${if_mine}">
<button onclick="redraft('${uniqueid}','${acct_id}')" class="waves-effect waves-dark btn-flat actct" <button onclick="redraft('${uniqueid}','${acct_id}')" class="waves-effect waves-dark btn-flat actct"
style="padding:0"> style="padding:0">
<i class="material-icons" aria-hidden="true">redo</i>${lang.lang_parse_redraft} <i class="material-icons">redo</i>${lang.lang_parse_redraft}
</button> </button>
</div> </div>
${trans} ${trans}
@@ -1209,7 +1167,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
} }
var templete = '' var templete = ''
var datetype = localStorage.getItem('datetype') var datetype = localStorage.getItem('datetype')
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function(key) {
var toot = obj[key] var toot = obj[key]
if (toot) { if (toot) {
if (!toot.username) { if (!toot.username) {
@@ -1227,10 +1185,10 @@ function userparse(obj, auth, acct_id, tlid, popup) {
var locked = '' var locked = ''
} }
if (auth == 'request') { if (auth == 'request') {
var authhtml = `<i class="material-icons gray pointer" onclick="request('${toot.id}','authorize','${acct_id}')" title="Accept" aria-hidden="true"> var authhtml = `<i class="material-icons gray pointer" onclick="request('${toot.id}','authorize','${acct_id}')" title="Accept">
person_add person_add
</i> </i> 
<i class="material-icons gray pointer" onclick="request('${toot.id}','reject','${acct_id}')" title="Reject" aria-hidden="true"> <i class="material-icons gray pointer" onclick="request('${toot.id}','reject','${acct_id}')" title="Reject">
person_add_disabled person_add_disabled
</i>` </i>`
} else { } else {
@@ -1286,7 +1244,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
} }
//絵文字があれば //絵文字があれば
if (actemojick) { if (actemojick) {
Object.keys(toot.emojis).forEach(function (key5) { Object.keys(toot.emojis).forEach(function(key5) {
var emoji = toot.emojis[key5] var emoji = toot.emojis[key5]
var shortcode = emoji.shortcode var shortcode = emoji.shortcode
if (gif == 'yes') { if (gif == 'yes') {
@@ -1321,7 +1279,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
} }
var latest = date(toot.last_status_at, 'relative') var latest = date(toot.last_status_at, 'relative')
if (toot.last_status_at) { if (toot.last_status_at) {
var latesthtml = `<div class="cbadge" style="width:100px;">Last <span class="voice">toot</span>: ${latest}</div>` var latesthtml = `<div class="cbadge" style="width:100px;">Last:${latest}</div>`
} else { } else {
var latesthtml = '' var latesthtml = ''
} }
@@ -1338,7 +1296,6 @@ function userparse(obj, auth, acct_id, tlid, popup) {
class="prof-img" class="prof-img"
user="${toot.acct}" user="${toot.acct}"
onerror="this.src='../../img/loading.svg'" onerror="this.src='../../img/loading.svg'"
alt=""
/> />
</a></div> </a></div>
<div class="area-display_name"> <div class="area-display_name">
@@ -1397,7 +1354,7 @@ function client(name) {
M.toast({ html: escapeHTML(name) + lang.lang_status_emphas, displayLength: 2000 }) M.toast({ html: escapeHTML(name) + lang.lang_status_emphas, displayLength: 2000 })
} else { } else {
var can var can
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function(key) {
var cliT = obj[key] var cliT = obj[key]
if (cliT != name && !can) { if (cliT != name && !can) {
can = false can = false
@@ -1434,7 +1391,6 @@ function client(name) {
} }
//Poll Parser //Poll Parser
function pollParse(poll, acct_id, emojis) { function pollParse(poll, acct_id, emojis) {
var rand = randomStr(8)
var datetype = localStorage.getItem('datetype') var datetype = localStorage.getItem('datetype')
var anime = localStorage.getItem('animation') var anime = localStorage.getItem('animation')
if (anime == 'yes' || !anime) { if (anime == 'yes' || !anime) {
@@ -1452,14 +1408,14 @@ function pollParse(poll, acct_id, emojis) {
} else { } else {
var minechoice = [] var minechoice = []
} }
var refresh = `<a onclick="voteMastodonrefresh('${acct_id}','${poll.id}','${rand}')" class="pointer"> var refresh = `<a onclick="voteMastodonrefresh('${acct_id}','${poll.id}')" class="pointer">
${lang.lang_manager_refresh} ${lang.lang_manager_refresh}
</a>` </a>`
if (poll.voted && minechoice.length) { if (poll.voted && poll.own_votes.length) {
var myvote = lang.lang_parse_voted var myvote = lang.lang_parse_voted
if (poll.expired) myvote = myvote + '/' + lang.lang_parse_endedvote if (poll.expired) myvote = myvote + '/' + lang.lang_parse_endedvote
var result_hide = '' var result_hide = ''
} else if (poll.voted && !minechoice.length) { } else if (poll.voted && !poll.own_votes.length) {
var myvote = lang.lang_parse_myvote var myvote = lang.lang_parse_myvote
if (poll.expired) myvote = myvote + '/' + lang.lang_parse_endedvote if (poll.expired) myvote = myvote + '/' + lang.lang_parse_endedvote
var result_hide = '' var result_hide = ''
@@ -1467,11 +1423,11 @@ function pollParse(poll, acct_id, emojis) {
var myvote = lang.lang_parse_endedvote var myvote = lang.lang_parse_endedvote
var result_hide = '' var result_hide = ''
} else { } else {
var myvote = `<a onclick="voteMastodon('${acct_id}','${poll.id}','${rand}')" class="votebtn">${lang.lang_parse_vote}</a><br>` var myvote = `<a onclick="voteMastodon('${acct_id}','${poll.id}')" class="votebtn">${lang.lang_parse_vote}</a><br>`
if (choices[0].votes_count === 0 || choices[0].votes_count > 0) { if (choices[0].votes_count === 0 || choices[0].votes_count > 0) {
myvote = myvote =
myvote + myvote +
`<a onclick="showResult('${acct_id}','${poll.id}','${rand}')" class="pointer"> `<a onclick="showResult('${acct_id}','${poll.id}')" class="pointer">
${lang.lang_parse_unvoted} ${lang.lang_parse_unvoted}
</a> ` </a> `
} }
@@ -1485,7 +1441,7 @@ function pollParse(poll, acct_id, emojis) {
var max = 0 var max = 0
} }
Object.keys(choices).forEach(function (keyc) { Object.keys(choices).forEach(function(keyc) {
var choice = choices[keyc] var choice = choices[keyc]
var voteit = '' var voteit = ''
for (var i = 0; i < minechoice.length; i++) { for (var i = 0; i < minechoice.length; i++) {
@@ -1498,7 +1454,7 @@ function pollParse(poll, acct_id, emojis) {
} }
if (!poll.voted && !poll.expired) { if (!poll.voted && !poll.expired) {
var votesel = var votesel =
`voteSelMastodon('${acct_id}','${poll.id}',${keyc},${poll.multiple}, this)` "voteSelMastodon('" + acct_id + "','" + poll.id + "'," + keyc + ',' + poll.multiple + ')'
var voteclass = 'pointer' var voteclass = 'pointer'
} else { } else {
var votesel = '' var votesel = ''
@@ -1513,14 +1469,14 @@ function pollParse(poll, acct_id, emojis) {
} }
var openData = '' var openData = ''
if (choice.votes_count !== null) { if (choice.votes_count !== null) {
openData = `<span style="float: right">${voteit}${choice.votes_count}<span class="sml">(${per}%)</span></span>` openData = `<span style="float: right">${choice.votes_count}<span class="sml">(${per}%)</span></span>`
} else { } else {
openData = `<span style="float: right">${voteit}?<span class="sml">(-%)</span></span>` openData = `<span style="float: right">?<span class="sml">(-%)</span></span>`
} }
var choiceText = escapeHTML(choice.title) var choiceText = escapeHTML(choice.title)
if (emojis) { if (emojis) {
//絵文字があれば //絵文字があれば
Object.keys(emojis).forEach(function (key5) { Object.keys(emojis).forEach(function(key5) {
var emoji = emojis[key5] var emoji = emojis[key5]
var shortcode = emoji.shortcode var shortcode = emoji.shortcode
if (gif == 'yes') { if (gif == 'yes') {
@@ -1541,7 +1497,7 @@ function pollParse(poll, acct_id, emojis) {
pollHtml + pollHtml +
`<div class="${voteclass} vote vote_${acct_id}_${poll.id}_${keyc}" onclick="${votesel}"> `<div class="${voteclass} vote vote_${acct_id}_${poll.id}_${keyc}" onclick="${votesel}">
<span class="vote_${acct_id}_${poll.id}_result leadPoll ${result_hide} ${addPoll} ${lpAnime}" style="width: ${per}%"></span> <span class="vote_${acct_id}_${poll.id}_result leadPoll ${result_hide} ${addPoll} ${lpAnime}" style="width: ${per}%"></span>
<span class="onPoll">${choiceText}</span> <span class="onPoll">${choiceText}${voteit}</span>
<span class="vote_${acct_id}_${poll.id}_result ${result_hide} onPoll"> <span class="vote_${acct_id}_${poll.id}_result ${result_hide} onPoll">
${openData} ${openData}
</span> </span>
@@ -1550,7 +1506,7 @@ function pollParse(poll, acct_id, emojis) {
if (poll.expired) { if (poll.expired) {
refresh = '' refresh = ''
} }
pollHtml = `<div class="vote_${acct_id}_${poll.id}" id="vote${rand}"> pollHtml = `<div class="vote_${acct_id}_${poll.id}">
${pollHtml}${myvote} ${pollHtml}${myvote}
${refresh} ${refresh}
<span class="cbadge cbadge-hover" title="${date(poll.expires_at, 'absolute')}"> <span class="cbadge cbadge-hover" title="${date(poll.expires_at, 'absolute')}">

View File

@@ -49,25 +49,30 @@ function pollCalc() {
return days * 86400 + hrs * 3600 + mins * 60 return days * 86400 + hrs * 3600 + mins * 60
} }
//Vote //Vote
function voteSelMastodon(acct_id, id, to, mul, elem) { function voteSelMastodon(acct_id, id, to, mul) {
if ($(elem).hasClass('sel')) { if ($('.vote_' + acct_id + '_' + id + '_' + to).hasClass('sel')) {
$(elem).css('background-color', 'transparent') $('.vote_' + acct_id + '_' + id + '_' + to).css('background-color', 'transparent')
$(elem).removeClass('sel') $('.vote_' + acct_id + '_' + id + '_' + to).removeClass('sel')
} else { } else {
if (!mul) { if (!mul) {
$('.vote_' + acct_id + '_' + id + ' div').css('background-color', 'transparent') $('.vote_' + acct_id + '_' + id + ' div').each(function(i, elem) {
$('.vote_' + acct_id + '_' + id + ' div').removeClass('sel') if (i == to) {
$(elem).css('background-color', 'var(--emphasized)') $(this).css('background-color', 'var(--emphasized)')
$(elem).addClass('sel') $(this).addClass('sel')
} else {
$(this).css('background-color', 'transparent')
$(this).removeClass('sel')
}
})
} else { } else {
$(elem).css('background-color', 'var(--emphasized)') $('.vote_' + acct_id + '_' + id + '_' + to).css('background-color', 'var(--emphasized)')
$(elem).addClass('sel') $('.vote_' + acct_id + '_' + id + '_' + to).addClass('sel')
} }
} }
} }
function voteMastodon(acct_id, id, target) { function voteMastodon(acct_id, id) {
var choice = [] var choice = []
$(`#vote${target} div`).each(function(i, elem) { $('.vote_' + acct_id + '_' + id + ' div').each(function(i, elem) {
if ($(this).hasClass('sel')) { if ($(this).hasClass('sel')) {
choice.push(i + '') choice.push(i + '')
} }
@@ -85,13 +90,13 @@ function voteMastodon(acct_id, id, target) {
httpreq.responseType = 'json' httpreq.responseType = 'json'
httpreq.send(JSON.stringify({ choices: choice })) httpreq.send(JSON.stringify({ choices: choice }))
httpreq.onreadystatechange = function() { httpreq.onreadystatechange = function() {
voteMastodonrefresh(acct_id, id, target) voteMastodonrefresh(acct_id, id)
} }
} }
function showResult(acct_id, id) { function showResult(acct_id, id) {
$('.vote_' + acct_id + '_' + id + '_result').toggleClass('hide') $('.vote_' + acct_id + '_' + id + '_result').toggleClass('hide')
} }
function voteMastodonrefresh(acct_id, id, target) { function voteMastodonrefresh(acct_id, id) {
var datetype = localStorage.getItem('datetype') var datetype = localStorage.getItem('datetype')
if (!datetype) { if (!datetype) {
datetype = 'absolute' datetype = 'absolute'
@@ -116,7 +121,7 @@ function voteMastodonrefresh(acct_id, id, target) {
return false return false
} }
var poll = pollParse(json, acct_id, json.emojis) var poll = pollParse(json, acct_id, json.emojis)
$(`#vote${target}`).html(poll) $('.vote_' + acct_id + '_' + json.id).html(poll)
} }
} }
} }

View File

@@ -3,7 +3,7 @@
function searchMenu() { function searchMenu() {
$('#src-contents').html('') $('#src-contents').html('')
trend() trend()
$('#left-menu a').removeClass('active') $('#left-menu div').removeClass('active')
$('#searchMenu').addClass('active') $('#searchMenu').addClass('active')
$('.menu-content').addClass('hide') $('.menu-content').addClass('hide')
$('#src-box').removeClass('hide') $('#src-box').removeClass('hide')
@@ -36,7 +36,7 @@ function src(mode, offset) {
var user = $('#his-data').attr('user-id') var user = $('#his-data').attr('user-id')
} }
if (!mode) { if (!mode) {
var start = 'https://' + domain + '/api/v2/search?resolve=true&q=' + encodeURIComponent(q) + add var start = 'https://' + domain + '/api/v2/search?q=' + q + add
} else { } else {
var start = 'https://' + domain + '/api/v1/search?q=' + q var start = 'https://' + domain + '/api/v1/search?q=' + q
} }
@@ -116,11 +116,8 @@ function tsAdd(q) {
parseColumn('add') parseColumn('add')
} }
function tootsearch(tlid, q) { function tootsearch(tlid, q) {
if(!q || q=='undefined') {
return false
}
var start = 'https://tootsearch.chotto.moe/api/v1/search?from=0&sort=created_at%3Adesc&q=' + q var start = 'https://tootsearch.chotto.moe/api/v1/search?from=0&sort=created_at%3Adesc&q=' + q
console.log('Toot search at ' + start) console.log('Toot srrach at ' + start)
$('#notice_' + tlid).text('tootsearch(' + q + ')') $('#notice_' + tlid).text('tootsearch(' + q + ')')
$('#notice_icon_' + tlid).text('search') $('#notice_icon_' + tlid).text('search')
fetch(start, { fetch(start, {
@@ -221,7 +218,7 @@ function graphDraw(tag, acct_id) {
var his = tag.history var his = tag.history
return graphDrawCore(his, tag) return graphDrawCore(his, tag)
} }
function graphDrawCore(his, tag) { function graphDrawCore(his, tag){
var max = Math.max.apply(null, [ var max = Math.max.apply(null, [
his[0].uses, his[0].uses,
his[1].uses, his[1].uses,
@@ -255,9 +252,7 @@ function graphDrawCore(his, tag) {
toot toot
</div> </div>
<div class="tagCompTag"> <div class="tagCompTag">
<a onclick="tl('tag','${escapeHTML( <a onclick="tl('tag','${escapeHTML(tag.name)}','${acct_id}','add')" class="pointer" title="${escapeHTML(tag.name)}">
tag.name
)}','${acct_id}','add')" class="pointer" title="${escapeHTML(tag.name)}">
#${escapeHTML(tag.name)} #${escapeHTML(tag.name)}
</a> </a>
</div> </div>
@@ -313,48 +308,3 @@ function trend() {
}) })
}) })
} }
function srcBox(mode) {
var selectedText = window.getSelection().toString()
if (mode == 'open') {
$('#pageSrc').removeClass('hide')
} else if (mode == 'close') {
if(!selectedText) {
$('#pageSrc').addClass('hide')
$('#pageSrc').removeClass('keep')
}
} else {
$('#pageSrc').toggleClass('hide')
}
if(!$('#pageSrc').hasClass('keep')) {
$('#pageSrcInput').val(selectedText)
}
}
$('#pageSrcInput').click(function() {
$('#pageSrc').addClass('keep')
})
$('#pageSrcInput').on('input', function(evt) {
if(!$('#pageSrcInput').val()) {
$('#pageSrc').removeClass('keep')
}
})
document.addEventListener('selectionchange', function() {
var selectedText = window.getSelection().toString()
if (selectedText && !$('input').is(':focus') && !$('textarea').is(':focus')) {
srcBox('open')
}
})
function doSrc(type) {
$('#pageSrc').addClass('hide')
$('#pageSrc').removeClass('keep')
var q = $('#pageSrcInput').val()
if(type == 'web') {
var start = localStorage.getItem('srcUrl')
if(!start) {
start = 'https://google.com/search?q={q}'
}
start = start.replace(/{q}/, q)
postMessage(["openUrl", start], "*")
} else if(type == 'ts') {
tsAdd(q)
}
}

View File

@@ -198,28 +198,3 @@ function tagFeature(name, acct_id) {
M.toast({ html: 'Complete: ' + escapeHTML(name), displayLength: 3000 }) M.toast({ html: 'Complete: ' + escapeHTML(name), displayLength: 3000 })
}) })
} }
//タグのフィルタ
function addTag(id) {
var columns = JSON.parse(localStorage.getItem('column'))
var column = columns[id]
if(!column.data.name) {
var name = column.data
} else {
var name = column.data.name
}
var col = localStorage.getItem('column')
var o = JSON.parse(col)
var obj = o[id]
obj.data = {
'name': name,
'all': $(`#all_tm-${id}`).val(),
'any': $(`#any_tm-${id}`).val(),
'none': $(`#none_tm-${id}`).val(),
}
o[id] = obj
var json = JSON.stringify(o)
console.log(json)
localStorage.setItem('column',json)
columnReload(id, 'tag')
}

View File

@@ -10,18 +10,10 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
if (tlid == 'add') { if (tlid == 'add') {
console.log('add new column') console.log('add new column')
var newtab = $('.box').length var newtab = $('.box').length
if (type == 'tag') {
data = {
name: data,
any: [],
all: [],
none: [],
}
}
var add = { var add = {
domain: acct_id, domain: acct_id,
type: type, type: type,
data: data, data: data
} }
var multi = localStorage.getItem('column') var multi = localStorage.getItem('column')
var obj = JSON.parse(multi) var obj = JSON.parse(multi)
@@ -43,11 +35,7 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
if (type == 'mix' && localStorage.getItem('mode_' + domain) != 'misskey') { if (type == 'mix' && localStorage.getItem('mode_' + domain) != 'misskey') {
//Integratedなら飛ばす //Integratedなら飛ばす
$('#notice_' + tlid).text( $('#notice_' + tlid).text(
'Integrated TL(' + 'Integrated TL(' + localStorage.getItem('user_' + acct_id) + '@' + domain + ')'
localStorage.getItem('user_' + acct_id) +
'@' +
domain +
')'
) )
$('#notice_icon_' + tlid).text('merge_type') $('#notice_icon_' + tlid).text('merge_type')
mixtl(acct_id, tlid, 'integrated', delc, voice) mixtl(acct_id, tlid, 'integrated', delc, voice)
@@ -55,11 +43,7 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
} else if (type == 'plus') { } else if (type == 'plus') {
//Local+なら飛ばす //Local+なら飛ばす
$('#notice_' + tlid).text( $('#notice_' + tlid).text(
'Local+ TL(' + 'Local+ TL(' + localStorage.getItem('user_' + acct_id) + '@' + domain + ')'
localStorage.getItem('user_' + acct_id) +
'@' +
domain +
')'
) )
$('#notice_icon_' + tlid).text('people_outline') $('#notice_icon_' + tlid).text('people_outline')
mixtl(acct_id, tlid, 'plus', delc, voice) mixtl(acct_id, tlid, 'plus', delc, voice)
@@ -68,12 +52,7 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
//通知なら飛ばす //通知なら飛ばす
notf(acct_id, tlid, 'direct') notf(acct_id, tlid, 'direct')
$('#notice_' + tlid).text( $('#notice_' + tlid).text(
cap(type, data, acct_id) + cap(type, data, acct_id) + '(' + localStorage.getItem('user_' + acct_id) + '@' + domain + ')'
'(' +
localStorage.getItem('user_' + acct_id) +
'@' +
domain +
')'
) )
$('#notice_icon_' + tlid).text('notifications') $('#notice_icon_' + tlid).text('notifications')
return return
@@ -81,31 +60,10 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
//ブックマークなら飛ばす //ブックマークなら飛ばす
getBookmark(acct_id, tlid) getBookmark(acct_id, tlid)
$('#notice_' + tlid).text( $('#notice_' + tlid).text(
cap(type, data, acct_id) + cap(type, data, acct_id) + '(' + localStorage.getItem('user_' + acct_id) + '@' + domain + ')'
'(' +
localStorage.getItem('user_' + acct_id) +
'@' +
domain +
')'
) )
$('#notice_icon_' + tlid).text('bookmark') $('#notice_icon_' + tlid).text('bookmark')
return return
} else if (type == 'utl') {
//UTLなら飛ばす
getUtl(acct_id, tlid, data, false)
$('#notice_' + tlid).text(
cap(type, data, acct_id) +
'(' +
localStorage.getItem('user_' + acct_id) +
'@' +
domain +
')'
)
$('#notice_icon_' + tlid).text('person')
return
} else if (type == 'home') {
//ホームならお知らせ「も」取りに行く
announ(acct_id, tlid)
} }
localStorage.setItem('now', type) localStorage.setItem('now', type)
todo(cap(type) + ' TL Loading...') todo(cap(type) + ' TL Loading...')
@@ -113,19 +71,14 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
if (type != 'noauth') { if (type != 'noauth') {
var hdr = { var hdr = {
'content-type': 'application/json', 'content-type': 'application/json',
Authorization: 'Bearer ' + at, Authorization: 'Bearer ' + at
} }
$('#notice_' + tlid).text( $('#notice_' + tlid).text(
cap(type, data, acct_id) + cap(type, data, acct_id) + '(' + localStorage.getItem('user_' + acct_id) + '@' + domain + ')'
'(' +
localStorage.getItem('user_' + acct_id) +
'@' +
domain +
')'
) )
} else { } else {
var hdr = { var hdr = {
'content-type': 'application/json', 'content-type': 'application/json'
} }
domain = acct_id domain = acct_id
$('#notice_' + tlid).text('Glance TL(' + domain + ')') $('#notice_' + tlid).text('Glance TL(' + domain + ')')
@@ -154,11 +107,11 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
var i = { var i = {
method: method, method: method,
headers: hdr, headers: hdr,
body: JSON.stringify(req), body: JSON.stringify(req)
} }
} else { } else {
var misskey = false var misskey = false
var url = com(type, data, tlid) var url = com(type, data)
if (type == 'tag') { if (type == 'tag') {
var tag = localStorage.getItem('tag-range') var tag = localStorage.getItem('tag-range')
if (tag == 'local') { if (tag == 'local') {
@@ -173,26 +126,26 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
var method = 'GET' var method = 'GET'
var i = { var i = {
method: method, method: method,
headers: hdr, headers: hdr
} }
} }
console.log(['Try to get timeline of ' + tlid, start]) console.log(['Try to get timeline of ' + tlid, start])
fetch(start, i) fetch(start, i)
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error)
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function (json) { .then(function(json) {
console.log(['Result of getting timeline of ' + tlid, json]) console.log(['Result of getting timeline of ' + tlid, json])
$('#landing_' + tlid).hide() $('#landing_' + tlid).hide()
var mute = getFilterTypeByAcct(acct_id, type) var mute = getFilterTypeByAcct(acct_id, type)
@@ -234,13 +187,8 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
if (localStorage.getItem('mode_' + domain) == 'misskey') { if (localStorage.getItem('mode_' + domain) == 'misskey') {
var misskey = true var misskey = true
var key = localStorage.getItem('misskey_wss_' + acct_id) var key = localStorage.getItem('misskey_wss_' + acct_id)
var send = var send = '{"type":"connect","body":{"channel":"' + typePs(type) + '","id":"' + tlid + '"}}'
'{"type":"connect","body":{"channel":"' + var mskyset = setInterval(function() {
typePs(type) +
'","id":"' +
tlid +
'"}}'
var mskyset = setInterval(function () {
if (misskeywsstate[key]) { if (misskeywsstate[key]) {
misskeyws[key].send(send) misskeyws[key].send(send)
clearInterval(mskyset) clearInterval(mskyset)
@@ -256,25 +204,14 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
if (type == 'home') { if (type == 'home') {
var start = wss + '/api/v1/streaming/?stream=user&access_token=' + at var start = wss + '/api/v1/streaming/?stream=user&access_token=' + at
} else if (type == 'pub') { } else if (type == 'pub') {
var add = '' var start = wss + '/api/v1/streaming/?stream=public&access_token=' + at
if(remoteOnlyCk(tlid)){
add = '&remote=true'
}
var start = wss + '/api/v1/streaming/?stream=public&access_token=' + at + add
} else if (type == 'pub-media') { } else if (type == 'pub-media') {
var add = '' var start = wss + '/api/v1/streaming/?stream=public:media&access_token=' + at
if(remoteOnlyCk(tlid)){
add = '&remote=true'
}var start =
wss + '/api/v1/streaming/?stream=public:media&access_token=' + at + add
} else if (type == 'local') { } else if (type == 'local') {
var start = var start = wss + '/api/v1/streaming/?stream=public:local&access_token=' + at
wss + '/api/v1/streaming/?stream=public:local&access_token=' + at
} else if (type == 'local-media') { } else if (type == 'local-media') {
var start = var start =
wss + wss + '/api/v1/streaming/?stream=public:local:media&only_media=true&access_token=' + at
'/api/v1/streaming/?stream=public:local:media&only_media=true&access_token=' +
at
} else if (type == 'tag') { } else if (type == 'tag') {
if (type == 'tag') { if (type == 'tag') {
var tag = localStorage.getItem('tag-range') var tag = localStorage.getItem('tag-range')
@@ -282,38 +219,28 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
data = data + '&local=true' data = data + '&local=true'
} }
} }
var start = var start = wss + '/api/v1/streaming/?stream=hashtag&tag=' + data + '&access_token=' + at
wss +
'/api/v1/streaming/?stream=hashtag&tag=' +
data +
'&access_token=' +
at
} else if (type == 'noauth') { } else if (type == 'noauth') {
var start = 'wss://' + acct_id + '/api/v1/streaming/?stream=public:local' var start = 'wss://' + acct_id + '/api/v1/streaming/?stream=public:local'
} else if (type == 'list') { } else if (type == 'list') {
var start = var start = wss + '/api/v1/streaming/?stream=list&list=' + data + '&access_token=' + at
wss +
'/api/v1/streaming/?stream=list&list=' +
data +
'&access_token=' +
at
} else if (type == 'dm') { } else if (type == 'dm') {
var start = wss + '/api/v1/streaming/?stream=direct&access_token=' + at var start = wss + '/api/v1/streaming/?stream=direct&access_token=' + at
} }
var wsid = websocket.length var wsid = websocket.length
localStorage.setItem('wss_' + tlid, wsid) localStorage.setItem('wss_' + tlid, wsid)
websocket[wsid] = new WebSocket(start) websocket[wsid] = new WebSocket(start)
websocket[wsid].onopen = function (mess) { websocket[wsid].onopen = function(mess) {
console.table({ console.table({
tlid: tlid, tlid: tlid,
type: 'Connect Streaming API' + type, type: 'Connect Streaming API' + type,
domain: domain, domain: domain,
message: [mess], message: [mess]
}) })
errorct = 0 errorct = 0
$('#notice_icon_' + tlid).removeClass('red-text') $('#notice_icon_' + tlid).removeClass('red-text')
} }
websocket[wsid].onmessage = function (mess) { websocket[wsid].onmessage = function(mess) {
console.log([tlid + ':Receive Streaming API:', JSON.parse(mess.data)]) console.log([tlid + ':Receive Streaming API:', JSON.parse(mess.data)])
if (misskey) { if (misskey) {
if (JSON.parse(mess.data).type == 'note') { if (JSON.parse(mess.data).type == 'note') {
@@ -324,7 +251,7 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
websocketNotf[acct_id].send( websocketNotf[acct_id].send(
JSON.stringify({ JSON.stringify({
type: 'capture', type: 'capture',
id: obj.id, id: obj.id
}) })
) )
var templete = misskeyParse([obj], type, acct_id, tlid, '', mute) var templete = misskeyParse([obj], type, acct_id, tlid, '', mute)
@@ -343,40 +270,26 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
if (typeA == 'delete') { if (typeA == 'delete') {
var obj = JSON.parse(mess.data).payload var obj = JSON.parse(mess.data).payload
if (delc == 'true') { if (delc == 'true') {
$( $('#timeline_' + tlid + ' [toot-id=' + JSON.parse(mess.data).payload + ']').addClass(
'#timeline_' + 'emphasized'
tlid + )
' [unique-id=' + $('#timeline_' + tlid + ' [toot-id=' + JSON.parse(mess.data).payload + ']').addClass(
JSON.parse(mess.data).payload + 'by_delcatch'
']' )
).addClass('emphasized')
$(
'#timeline_' +
tlid +
' [unique-id=' +
JSON.parse(mess.data).payload +
']'
).addClass('by_delcatch')
} else { } else {
$('[unique-id=' + JSON.parse(mess.data).payload + ']').hide() $('[toot-id=' + JSON.parse(mess.data).payload + ']').hide()
$('[unique-id=' + JSON.parse(mess.data).payload + ']').remove() $('[toot-id=' + JSON.parse(mess.data).payload + ']').remove()
} }
} else if (typeA == 'update' || typeA == 'conversation') { } else if (typeA == 'update' || typeA == 'conversation') {
if ( if (!$('#unread_' + tlid + ' .material-icons').hasClass('teal-text')) {
!$('#unread_' + tlid + ' .material-icons').hasClass('teal-text')
) {
//markers show中はダメ //markers show中はダメ
var obj = JSON.parse(JSON.parse(mess.data).payload) var obj = JSON.parse(JSON.parse(mess.data).payload)
if ( if ($('#timeline_' + tlid + ' [toot-id=' + obj.id + ']').length < 1) {
$('#timeline_' + tlid + ' [toot-id=' + obj.id + ']').length < 1
) {
if (voice) { if (voice) {
say(obj.content) say(obj.content)
} }
var templete = parse([obj], type, acct_id, tlid, '', mute, type) var templete = parse([obj], type, acct_id, tlid, '', mute, type)
if ( if ($('timeline_box_' + tlid + '_box .tl-box').scrollTop() === 0) {
$('timeline_box_' + tlid + '_box .tl-box').scrollTop() === 0
) {
$('#timeline_' + tlid).prepend(templete) $('#timeline_' + tlid).prepend(templete)
} else { } else {
var pool = localStorage.getItem('pool_' + tlid) var pool = localStorage.getItem('pool_' + tlid)
@@ -398,12 +311,10 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
} }
} else if (typeA == 'filters_changed') { } else if (typeA == 'filters_changed') {
filterUpdate(acct_id) filterUpdate(acct_id)
} else if (~typeA.indexOf('announcement')) {
announ(acct_id, tlid)
} }
} }
} }
websocket[wsid].onerror = function (error) { websocket[wsid].onerror = function(error) {
console.error('Error closing') console.error('Error closing')
console.error(error) console.error(error)
if (mode == 'error') { if (mode == 'error') {
@@ -418,7 +329,7 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
} }
return false return false
} }
websocket[wsid].onclose = function () { websocket[wsid].onclose = function() {
console.warn('Closing ' + tlid) console.warn('Closing ' + tlid)
if (mode == 'error') { if (mode == 'error') {
$('#notice_icon_' + tlid).addClass('red-text') $('#notice_icon_' + tlid).addClass('red-text')
@@ -460,17 +371,13 @@ function moreload(type, tlid) {
if (sid && !moreloading) { if (sid && !moreloading) {
if ( if (
type == 'mix' && type == 'mix' &&
localStorage.getItem( localStorage.getItem('mode_' + localStorage.getItem('domain_' + acct_id)) != 'misskey'
'mode_' + localStorage.getItem('domain_' + acct_id)
) != 'misskey'
) { ) {
mixmore(tlid, 'integrated') mixmore(tlid, 'integrated')
return return
} else if ( } else if (
type == 'plus' && type == 'plus' &&
localStorage.getItem( localStorage.getItem('mode_' + localStorage.getItem('domain_' + acct_id)) != 'misskey'
'mode_' + localStorage.getItem('domain_' + acct_id)
) != 'misskey'
) { ) {
mixmore(tlid, 'plus') mixmore(tlid, 'plus')
return return
@@ -484,10 +391,6 @@ function moreload(type, tlid) {
} else if (type == 'bookmark') { } else if (type == 'bookmark') {
getBookmark(acct_id, tlid, true) getBookmark(acct_id, tlid, true)
return return
} else if (type == 'utl') {
var data = obj[tlid].data
getUtl(acct_id, tlid, data, true)
return
} }
moreloading = true moreloading = true
localStorage.setItem('now', type) localStorage.setItem('now', type)
@@ -496,19 +399,19 @@ function moreload(type, tlid) {
var at = localStorage.getItem('acct_' + acct_id + '_at') var at = localStorage.getItem('acct_' + acct_id + '_at')
var hdr = { var hdr = {
'content-type': 'application/json', 'content-type': 'application/json',
Authorization: 'Bearer ' + at, Authorization: 'Bearer ' + at
} }
var domain = localStorage.getItem('domain_' + acct_id) var domain = localStorage.getItem('domain_' + acct_id)
} else { } else {
var hdr = { var hdr = {
'content-type': 'application/json', 'content-type': 'application/json'
} }
domain = acct_id domain = acct_id
} }
if (localStorage.getItem('mode_' + domain) == 'misskey') { if (localStorage.getItem('mode_' + domain) == 'misskey') {
var misskey = true var misskey = true
hdr = { hdr = {
'content-type': 'application/json', 'content-type': 'application/json'
} }
var url = misskeycom(type, data) var url = misskeycom(type, data)
var start = 'https://' + domain + '/api/notes/' + url var start = 'https://' + domain + '/api/notes/' + url
@@ -531,42 +434,35 @@ function moreload(type, tlid) {
var i = { var i = {
method: method, method: method,
headers: hdr, headers: hdr,
body: JSON.stringify(req), body: JSON.stringify(req)
} }
} else { } else {
var misskey = false var misskey = false
var start = var start = 'https://' + domain + '/api/v1/timelines/' + com(type, data) + 'max_id=' + sid
'https://' +
domain +
'/api/v1/timelines/' +
com(type, data, tlid) +
'max_id=' +
sid
if (type == 'dm') { if (type == 'dm') {
var start = var start = 'https://' + domain + '/api/v1/conversations?' + 'max_id=' + sid
'https://' + domain + '/api/v1/conversations?' + 'max_id=' + sid
} }
var method = 'GET' var method = 'GET'
var i = { var i = {
method: method, method: method,
headers: hdr, headers: hdr
} }
} }
fetch(start, i) fetch(start, i)
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error)
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function (json) { .then(function(json) {
var mute = getFilterTypeByAcct(acct_id, type) var mute = getFilterTypeByAcct(acct_id, type)
if (misskey) { if (misskey) {
var templete = misskeyParse(json, '', acct_id, tlid, '', mute) var templete = misskeyParse(json, '', acct_id, tlid, '', mute)
@@ -607,16 +503,12 @@ function tlDiff(type, data, acct_id, tlid, delc, voice, mode) {
if (sid && !moreloading) { if (sid && !moreloading) {
if ( if (
type == 'mix' && type == 'mix' &&
localStorage.getItem( localStorage.getItem('mode_' + localStorage.getItem('domain_' + acct_id)) != 'misskey'
'mode_' + localStorage.getItem('domain_' + acct_id)
) != 'misskey'
) { ) {
return return
} else if ( } else if (
type == 'plus' && type == 'plus' &&
localStorage.getItem( localStorage.getItem('mode_' + localStorage.getItem('domain_' + acct_id)) != 'misskey'
'mode_' + localStorage.getItem('domain_' + acct_id)
) != 'misskey'
) { ) {
return return
} else if (type == 'notf') { } else if (type == 'notf') {
@@ -629,19 +521,19 @@ function tlDiff(type, data, acct_id, tlid, delc, voice, mode) {
var at = localStorage.getItem('acct_' + acct_id + '_at') var at = localStorage.getItem('acct_' + acct_id + '_at')
var hdr = { var hdr = {
'content-type': 'application/json', 'content-type': 'application/json',
Authorization: 'Bearer ' + at, Authorization: 'Bearer ' + at
} }
var domain = localStorage.getItem('domain_' + acct_id) var domain = localStorage.getItem('domain_' + acct_id)
} else { } else {
var hdr = { var hdr = {
'content-type': 'application/json', 'content-type': 'application/json'
} }
domain = acct_id domain = acct_id
} }
if (localStorage.getItem('mode_' + domain) == 'misskey') { if (localStorage.getItem('mode_' + domain) == 'misskey') {
var misskey = true var misskey = true
hdr = { hdr = {
'content-type': 'application/json', 'content-type': 'application/json'
} }
var url = misskeycom(type, data) var url = misskeycom(type, data)
var start = 'https://' + domain + '/api/notes/' + url var start = 'https://' + domain + '/api/notes/' + url
@@ -664,43 +556,36 @@ function tlDiff(type, data, acct_id, tlid, delc, voice, mode) {
var i = { var i = {
method: method, method: method,
headers: hdr, headers: hdr,
body: JSON.stringify(req), body: JSON.stringify(req)
} }
} else { } else {
var misskey = false var misskey = false
var start = var start = 'https://' + domain + '/api/v1/timelines/' + com(type, data) + 'since_id=' + sid
'https://' +
domain +
'/api/v1/timelines/' +
com(type, data, tlid) +
'since_id=' +
sid
if (type == 'dm') { if (type == 'dm') {
var start = var start = 'https://' + domain + '/api/v1/conversations?' + 'since_id=' + sid
'https://' + domain + '/api/v1/conversations?' + 'since_id=' + sid
} }
var method = 'GET' var method = 'GET'
var i = { var i = {
method: method, method: method,
headers: hdr, headers: hdr
} }
} }
fetch(start, i) fetch(start, i)
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error)
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function (json) { .then(function(json) {
console.log(['Result diff of TL' + tlid, json]) console.log(['Result diff of TL' + tlid, json])
if (misskey) { if (misskey) {
var templete = misskeyParse(json, '', acct_id, tlid, '', mute) var templete = misskeyParse(json, '', acct_id, tlid, '', mute)
@@ -722,7 +607,7 @@ function reloadTL(type, data, acct_id, key, delc, voice) {
//WebSocket切断 //WebSocket切断
function tlCloser() { function tlCloser() {
Object.keys(websocket).forEach(function (tlid) { Object.keys(websocket).forEach(function(tlid) {
if (websocketOld[tlid]) { if (websocketOld[tlid]) {
websocketOld[tlid].close() websocketOld[tlid].close()
console.log('%c Close Streaming API: Old' + tlid, 'color:blue') console.log('%c Close Streaming API: Old' + tlid, 'color:blue')
@@ -734,30 +619,27 @@ function tlCloser() {
} }
}) })
websocket = [] websocket = []
Object.keys(wsHome).forEach(function (tlid) { Object.keys(wsHome).forEach(function(tlid) {
if (wsHome[tlid]) { if (wsHome[tlid]) {
wsHome[tlid].close() wsHome[tlid].close()
console.log('%c Close Streaming API:Integrated Home' + tlid, 'color:blue') console.log('%c Close Streaming API:Integrated Home' + tlid, 'color:blue')
} }
}) })
wsHome = [] wsHome = []
Object.keys(wsLocal).forEach(function (tlid) { Object.keys(wsLocal).forEach(function(tlid) {
if (wsLocal[tlid]) { if (wsLocal[tlid]) {
wsLocal[tlid].close() wsLocal[tlid].close()
console.log( console.log('%c Close Streaming API:Integrated Local' + tlid, 'color:blue')
'%c Close Streaming API:Integrated Local' + tlid,
'color:blue'
)
} }
}) })
wsLocal = [] wsLocal = []
Object.keys(websocketNotf).forEach(function (tlid) { Object.keys(websocketNotf).forEach(function(tlid) {
if (websocketNotf[tlid]) { if (websocketNotf[tlid]) {
websocketNotf[tlid].close() websocketNotf[tlid].close()
console.log('%c Close Streaming API:Notf' + tlid, 'color:blue') console.log('%c Close Streaming API:Notf' + tlid, 'color:blue')
} }
}) })
Object.keys(misskeyws).forEach(function (tlid) { Object.keys(misskeyws).forEach(function(tlid) {
if (misskeyws[tlid]) { if (misskeyws[tlid]) {
misskeyws[tlid].close() misskeyws[tlid].close()
console.log('%c Close Streaming API:Misskey' + tlid, 'color:blue') console.log('%c Close Streaming API:Misskey' + tlid, 'color:blue')
@@ -787,11 +669,7 @@ function cap(type, data, acct_id) {
} }
} else if (type == 'local-media') { } else if (type == 'local-media') {
if (localStorage.getItem('local_' + acct_id) && !locale) { if (localStorage.getItem('local_' + acct_id) && !locale) {
var response = var response = localStorage.getItem('local_' + acct_id) + '(' + lang.lang_tl_media + ')'
localStorage.getItem('local_' + acct_id) +
'(' +
lang.lang_tl_media +
')'
} else { } else {
var response = 'Local TL(Media)' var response = 'Local TL(Media)'
} }
@@ -803,22 +681,12 @@ function cap(type, data, acct_id) {
} }
} else if (type == 'pub-media') { } else if (type == 'pub-media') {
if (localStorage.getItem('public_' + acct_id) && !locale) { if (localStorage.getItem('public_' + acct_id) && !locale) {
var response = var response = localStorage.getItem('public_' + acct_id) + '(' + lang.lang_tl_media + ')'
localStorage.getItem('public_' + acct_id) +
'(' +
lang.lang_tl_media +
')'
} else { } else {
var response = 'Federated TL(Media)' var response = 'Federated TL(Media)'
} }
} else if (type == 'tag') { } else if (type == 'tag') {
if (data) { var response = '#' + escapeHTML(data)
if (data.name) {
var response = '#' + escapeHTML(data.name)
} else {
var response = '#' + escapeHTML(data)
}
}
} else if (type == 'list') { } else if (type == 'list') {
var ltitle = localStorage.getItem('list_' + data + '_' + acct_id) var ltitle = localStorage.getItem('list_' + data + '_' + acct_id)
var response = 'List(' + ltitle + ')' var response = 'List(' + ltitle + ')'
@@ -833,11 +701,7 @@ function cap(type, data, acct_id) {
} else if (type == 'dm') { } else if (type == 'dm') {
var response = 'DM' var response = 'DM'
} else if (type == 'mix') { } else if (type == 'mix') {
if ( if (localStorage.getItem('mode_' + localStorage.getItem('domain_' + acct_id)) == 'misskey') {
localStorage.getItem(
'mode_' + localStorage.getItem('domain_' + acct_id)
) == 'misskey'
) {
var response = 'Social TL' var response = 'Social TL'
} else { } else {
var response = 'Integrated' var response = 'Integrated'
@@ -850,14 +714,12 @@ function cap(type, data, acct_id) {
var response = 'tootsearch(' + escapeHTML(data) + ')' var response = 'tootsearch(' + escapeHTML(data) + ')'
} else if (type == 'bookmark') { } else if (type == 'bookmark') {
var response = 'Bookmarks' var response = 'Bookmarks'
} else if (type == 'utl') {
var response = 'User TL(' + escapeHTML(data.acct) + ')'
} }
return response return response
} }
//TLのURL //TLのURL
function com(type, data, tlid) { function com(type, data) {
if (type == 'home') { if (type == 'home') {
return 'home?' return 'home?'
} else if (type == 'local' || type == 'noauth') { } else if (type == 'local' || type == 'noauth') {
@@ -865,33 +727,11 @@ function com(type, data, tlid) {
} else if (type == 'local-media') { } else if (type == 'local-media') {
return 'public?local=true&only_media=true&' return 'public?local=true&only_media=true&'
} else if (type == 'pub') { } else if (type == 'pub') {
var add = '' return 'public?'
if(remoteOnlyCk(tlid)){
add = 'remote=true&'
}
return 'public?' + add
} else if (type == 'pub-media') { } else if (type == 'pub-media') {
var add = '' return 'public?only_media=true&'
if(remoteOnlyCk(tlid)){
add = 'remote=true&'
}
return 'public?only_media=true&' + add
} else if (type == 'tag') { } else if (type == 'tag') {
if (data.name) { return 'tag/' + data + '?'
var name = data.name
var all = data.all
var any = data.any
var none = data.none
} else {
var name = data
var all = ''
var any = ''
var none = ''
}
return `tag/${name}?${buildQuery('all', all)}${buildQuery(
'any',
any
)}${buildQuery('none', none)}`.slice(0, -1)
} else if (type == 'list') { } else if (type == 'list') {
return 'list/' + data + '?' return 'list/' + data + '?'
} else if (type == 'dm') { } else if (type == 'dm') {
@@ -1052,50 +892,37 @@ function getMarker(tlid, type, acct_id) {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
Authorization: 'Bearer ' + at, Authorization: 'Bearer ' + at
}, }
}) })
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
$('#unread_' + tlid).attr( $('#unread_' + tlid).attr('title', lang.lang_layout_unread + ':' + lang.lang_nothing)
'title',
lang.lang_layout_unread + ':' + lang.lang_nothing
)
$('#unread_' + tlid).attr('data-id', '') $('#unread_' + tlid).attr('data-id', '')
return false return false
}) })
.then(function (json) { .then(function(json) {
if (json) { if (json) {
if (json[add]) { if (json[add]) {
json = json[add] json = json[add]
$('#unread_' + tlid).attr( $('#unread_' + tlid).attr(
'title', 'title',
lang.lang_layout_unread + lang.lang_layout_unread + ':' + json.updated_at + ' v' + json.version
':' +
json.updated_at +
' v' +
json.version
) )
$('#unread_' + tlid).attr('data-id', json.last_read_id) $('#unread_' + tlid).attr('data-id', json.last_read_id)
} else { } else {
$('#unread_' + tlid).attr( $('#unread_' + tlid).attr('title', lang.lang_layout_unread + ':' + lang.lang_nothing)
'title',
lang.lang_layout_unread + ':' + lang.lang_nothing
)
$('#unread_' + tlid).attr('data-id', '') $('#unread_' + tlid).attr('data-id', '')
} }
} else { } else {
$('#unread_' + tlid).attr( $('#unread_' + tlid).attr('title', lang.lang_layout_unread + ':' + lang.lang_nothing)
'title',
lang.lang_layout_unread + ':' + lang.lang_nothing
)
$('#unread_' + tlid).attr('data-id', '') $('#unread_' + tlid).attr('data-id', '')
} }
}) })
@@ -1119,23 +946,23 @@ function showUnread(tlid, type, acct_id) {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
Authorization: 'Bearer ' + at, Authorization: 'Bearer ' + at
}, }
}) })
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error)
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function (json) { .then(function(json) {
if (!json || !json.length) { if (!json || !json.length) {
columnReload(tlid, type) columnReload(tlid, type)
} }
@@ -1175,23 +1002,23 @@ function ueload(tlid) {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
Authorization: 'Bearer ' + at, Authorization: 'Bearer ' + at
}, }
}) })
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error)
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function (json) { .then(function(json) {
if (!json) { if (!json) {
columnReload(tlid, type) columnReload(tlid, type)
} }
@@ -1230,15 +1057,15 @@ function asRead(callback) {
var id = $('#timeline_' + i + ' .cvo:eq(0)').attr('unique-id') var id = $('#timeline_' + i + ' .cvo:eq(0)').attr('unique-id')
var poster = { var poster = {
home: { home: {
last_read_id: id, last_read_id: id
}, }
} }
} else { } else {
var id = $('#timeline_' + i + ' .cvo:eq(0)').attr('data-notf') var id = $('#timeline_' + i + ' .cvo:eq(0)').attr('data-notf')
var poster = { var poster = {
notifications: { notifications: {
last_read_id: id, last_read_id: id
}, }
} }
} }
@@ -1251,7 +1078,7 @@ function asRead(callback) {
httpreq.setRequestHeader('Authorization', 'Bearer ' + at) httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = 'json' httpreq.responseType = 'json'
httpreq.send(JSON.stringify(poster)) httpreq.send(JSON.stringify(poster))
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response var json = httpreq.response
if (this.status !== 200) { if (this.status !== 200) {
@@ -1285,8 +1112,8 @@ function asReadEnd() {
onBeforeOpen: () => { onBeforeOpen: () => {
Swal.showLoading() Swal.showLoading()
}, },
onClose: () => {}, onClose: () => {}
}).then((result) => {}) }).then(result => {})
} else { } else {
postMessage(['asReadComp', ''], '*') postMessage(['asReadComp', ''], '*')
} }
@@ -1312,7 +1139,7 @@ function getBookmark(acct_id, tlid, more) {
httpreq.setRequestHeader('Authorization', 'Bearer ' + at) httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = 'json' httpreq.responseType = 'json'
httpreq.send() httpreq.send()
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response var json = httpreq.response
if (this.status !== 200) { if (this.status !== 200) {
@@ -1327,11 +1154,7 @@ function getBookmark(acct_id, tlid, more) {
} }
} }
var templete = parse(json, 'bookmark', acct_id, tlid, -1, null) var templete = parse(json, 'bookmark', acct_id, tlid, -1, null)
templete = templete = templete + '<div class="hide notif-marker" data-maxid="' + max_id + '"></div>'
templete +
'<div class="hide notif-marker" data-maxid="' +
max_id +
'"></div>'
if (more) { if (more) {
$('#timeline_' + tlid).append(templete) $('#timeline_' + tlid).append(templete)
} else { } else {
@@ -1344,93 +1167,3 @@ function getBookmark(acct_id, tlid, more) {
} }
} }
} }
function getUtl(acct_id, tlid, data, more) {
moreloading = true
if (more) {
var sid = $('#timeline_' + tlid + ' .cvo')
.last()
.attr('unique-id')
var ad = '?max_id=' + sid
} else {
var ad = ''
}
var at = localStorage.getItem('acct_' + acct_id + '_at')
var domain = localStorage.getItem('domain_' + acct_id)
var start = "https://" + domain + "/api/v1/accounts/" + data.id + "/statuses" + ad
var httpreq = new XMLHttpRequest()
httpreq.open('GET', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = 'json'
httpreq.send()
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response
if (this.status !== 200) {
setLog(start, this.status, this.response)
}
var templete = parse(json, 'bookmark', acct_id, tlid, -1, null)
templete =
templete
if (more) {
$('#timeline_' + tlid).append(templete)
} else {
$('#timeline_' + tlid).html(templete)
}
$('#landing_' + tlid).hide()
jQuery('time.timeago').timeago()
moreloading = false
todc()
}
}
}
//Announcement
function announ(acct_id, tlid) {
var at = localStorage.getItem('acct_' + acct_id + '_at')
var domain = localStorage.getItem('domain_' + acct_id)
var start = 'https://' + domain + '/api/v1/announcements'
var httpreq = new XMLHttpRequest()
httpreq.open('GET', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = 'json'
httpreq.send()
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response
if (this.status !== 200) {
setLog(start, this.status, this.response)
}
if (json.length > 0) {
$('.notf-announ_' + acct_id).removeClass('hide')
var ct = 0
for (var i = 0; i < json.length; i++) {
if (localStorage.getItem('announ_' + acct_id) == json[i].id) {
break
}
ct++
}
if (ct > 0) {
$('.notf-announ_' + acct_id + '_ct').text(ct)
}
} else {
$('.notf-announ_' + acct_id).addClass('hide')
}
var templete = announParse(json, acct_id, tlid)
$('#announce_' + tlid).html(templete)
jQuery('time.timeago').timeago()
todc()
}
}
}
//buildQuery
function buildQuery(name, data) {
if(!data || data == '') return ''
var arr = data.split(',')
var str = ''
for (var i = 0; i < arr.length; i++) {
str = str + `${name}[]=${arr[i]}&`
}
return str
}

View File

@@ -102,13 +102,6 @@ function imageXhr(id, key, murl) {
}, },
false false
) )
xhr.addEventListener(
'error',
function(event) {
$('#imgmodal').attr('src', murl)
},
false
)
xhr.onreadystatechange = function() { xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) { if (this.readyState == 4 && this.status == 200) {
r = new FileReader() r = new FileReader()
@@ -119,22 +112,19 @@ function imageXhr(id, key, murl) {
var width var width
element.onload = function() { element.onload = function() {
var width = element.naturalWidth var width = element.naturalWidth
if(width < 650) {
width = 650;
}
var height = element.naturalHeight var height = element.naturalHeight
var windowH = $(window).height() var windowH = $(window).height()
var windowW = $(window).width() var windowW = $(window).width()
$('#imagemodal').css('bottom', '0') $('#imagemodal').css('bottom', '0')
$('#imagemodal img').css('width', 'auto') $('#imagemodal img').css('width', 'auto')
if (height < windowH) { if (height < windowH) {
$('#imagemodal').css('height', height + 100 + 'px') $('#imagemodal').css('height', height + 60 + 'px')
$('#imagemodal img').css('height', height + 'px') $('#imagemodal img').css('height', '100%')
if (width > windowW * 0.8) { if (width > windowW * 0.8) {
$('#imagemodal').css('width', '80vw') $('#imagemodal').css('width', '80vw')
$('#imagemodal img').css('width', 'auto') $('#imagemodal img').css('width', '100%')
var heightS = ((windowW * 0.8) / width) * height var heightS = ((windowW * 0.8) / width) * height
$('#imagemodal').css('height', heightS + 100 + 'px') $('#imagemodal').css('height', heightS + 60 + 'px')
} else { } else {
$('#imagemodal').css('width', width + 'px') $('#imagemodal').css('width', width + 'px')
} }

View File

@@ -8,13 +8,13 @@ var websocketNotf = []
//カラム追加ボックストグル //カラム追加ボックストグル
function addColumnMenu() { function addColumnMenu() {
$('#left-menu a').removeClass('active') $('#left-menu div').removeClass('active')
$('#addColumnMenu').addClass('active') $('#addColumnMenu').addClass('active')
$('.menu-content').addClass('hide') $('.menu-content').addClass('hide')
$('#add-box').removeClass('hide') $('#add-box').removeClass('hide')
addselCk() addselCk()
} }
$('.type').click(function () { $('.type').click(function() {
$('.type').removeClass('active') $('.type').removeClass('active')
$(this).addClass('active') $(this).addClass('active')
$('#type-sel').val($(this).attr('data-type')) $('#type-sel').val($(this).attr('data-type'))
@@ -44,7 +44,7 @@ function parseColumn(target, dontclose) {
var obj = JSON.parse(multi) var obj = JSON.parse(multi)
var templete var templete
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function(key) {
var acct = obj[key] var acct = obj[key]
localStorage.setItem('name_' + key, acct.name) localStorage.setItem('name_' + key, acct.name)
@@ -76,8 +76,8 @@ function parseColumn(target, dontclose) {
var obj = [ var obj = [
{ {
domain: 0, domain: 0,
type: 'local', type: 'local'
}, }
] ]
var json = JSON.stringify(obj) var json = JSON.stringify(obj)
localStorage.setItem('column', json) localStorage.setItem('column', json)
@@ -122,7 +122,10 @@ function parseColumn(target, dontclose) {
var if_notf = '' var if_notf = ''
} }
if (localStorage.getItem('notification_' + acct.domain)) { if (localStorage.getItem('notification_' + acct.domain)) {
var unique_notf = lang.lang_layout_thisacct.replace('{{notf}}', localStorage.getItem('notification_' + acct.domain)) var unique_notf = lang.lang_layout_thisacct.replace(
'{{notf}}',
localStorage.getItem('notification_' + acct.domain)
)
} else { } else {
if (lang.language == 'ja') { if (lang.language == 'ja') {
var notflocale = '通知' var notflocale = '通知'
@@ -188,7 +191,17 @@ function parseColumn(target, dontclose) {
} else { } else {
var animecss = '' var animecss = ''
} }
unstreamingTL(acct.type, key, basekey, insert, icnsert, acct.left_fold, css, animecss, acct.data) unstreamingTL(
acct.type,
key,
basekey,
insert,
icnsert,
acct.left_fold,
css,
animecss,
acct.data
)
} else if (acct.type == 'bookmark') { } else if (acct.type == 'bookmark') {
if (!acct.left_fold) { if (!acct.left_fold) {
basekey = key basekey = key
@@ -200,19 +213,17 @@ function parseColumn(target, dontclose) {
} else { } else {
var animecss = '' var animecss = ''
} }
unstreamingTL(acct.type, key, basekey, insert, icnsert, acct.left_fold, css, animecss, acct.domain) unstreamingTL(
} else if (acct.type == 'utl') { acct.type,
if (!acct.left_fold) { key,
basekey = key basekey,
} insert,
icnsert,
var anime = localStorage.getItem('animation') acct.left_fold,
if (anime == 'yes' || !anime) { css,
var animecss = 'box-anime' animecss,
} else { acct.domain
var animecss = '' )
}
unstreamingTL(acct.type, key, basekey, insert, icnsert, acct.left_fold, css, animecss, { acct: acct.domain, data: acct.data })
} else { } else {
var anime = localStorage.getItem('animation') var anime = localStorage.getItem('animation')
if (anime == 'yes' || !anime) { if (anime == 'yes' || !anime) {
@@ -223,7 +234,7 @@ function parseColumn(target, dontclose) {
var unread = `<a id="unread_${key}" onclick="showUnread('${key}','${acct.type}','${acct.domain}')" var unread = `<a id="unread_${key}" onclick="showUnread('${key}','${acct.type}','${acct.domain}')"
class="setting nex" title="${lang.lang_layout_unread}"> class="setting nex" title="${lang.lang_layout_unread}">
<i class="material-icons waves-effect nex">more</i> <i class="material-icons waves-effect nex">more</i>
</a>${lang.lang_layout_unread}<br>` </a>`
var notfDomain = acct.domain var notfDomain = acct.domain
var notfKey = key var notfKey = key
var if_tag = '' var if_tag = ''
@@ -281,33 +292,16 @@ function parseColumn(target, dontclose) {
${lang.lang_layout_excludingbt} ${lang.lang_layout_excludingbt}
<br>` <br>`
} else if (acct.type == 'tag') { } else if (acct.type == 'tag') {
if (acct.data.name) {
var name = acct.data.name
var all = acct.data.all
var any = acct.data.any
var none = acct.data.none
} else {
var name = acct.data
var all = ''
var any = ''
var none = ''
}
if_tag = `<div class="column-hide notf-indv-box" id="tag-box_${key}" style="padding:5px;"> if_tag = `<div class="column-hide notf-indv-box" id="tag-box_${key}" style="padding:5px;">
Base: ${name}<br> Base: ${acct.data}<br>
<div id="tagManager-${key}"> <div id="tagManager-${key}"></div>
all: <input type="text" id="all_tm-${key}"" value="${all}"> <button onclick="addTag('${key}')" class="btn waves-effect" style="width: 100%">Add</button>
any: <input type="text" id="any_tm-${key}" value="${any}">
none: <input type="text" id="none_tm-${key}"" value="${none}">
</div>
<button onclick="addTag('${key}')" class="btn waves-effect" style="width: 100%">Refresh</button>
</div>` </div>`
if_tag_btn = `<a onclick="setToggleTag('${key}')" class="setting nex" if_tag_btn = `<a onclick="setToggleTag('${key}')" class="setting nex"
title="${lang.lang_layout_tagManager}" style="width:30px"> title="${lang.lang_layout_tagManager}" style="width:30px">
<i class="material-icons waves-effect nex">note_add</i> <i class="material-icons waves-effect nex">note_add</i>
</a>` </a>`
unread = '' unread = ''
var exclude = ''
var if_notf = 'hide'
} else { } else {
var exclude = '' var exclude = ''
unread = '' unread = ''
@@ -341,7 +335,9 @@ function parseColumn(target, dontclose) {
if (key === 0) { if (key === 0) {
left_hold = '' left_hold = ''
} }
if (localStorage.getItem('mode_' + localStorage.getItem('domain_' + acct.domain)) == 'misskey') { if (
localStorage.getItem('mode_' + localStorage.getItem('domain_' + acct.domain)) == 'misskey'
) {
var isMisRed = '' var isMisRed = ''
exclude = '' exclude = ''
var if_misskey_hide = 'hide' var if_misskey_hide = 'hide'
@@ -354,18 +350,6 @@ function parseColumn(target, dontclose) {
} else { } else {
var addHeight = '' var addHeight = ''
} }
if (acct.type != 'pub' && acct.type != 'pub-media') {
console.log(acct.type, key)
var mediaFil = `<a onclick="mediaToggle('${key}')" class="setting nex">
<i class="material-icons waves-effect nex" title="${lang.lang_layout_mediafil}">perm_media</i>
<span id="sta-media-${key}">On</span>
</a>${lang.lang_layout_mediafil}`
} else {
var mediaFil = `<a onclick="remoteOnly('${key}','${acct.type}')" class="setting nex">
<i class="material-icons waves-effect nex" title="${lang.lang_layout_remoteOnly}">perm_media</i>
<span id="sta-remote-${key}">Off</span>
</a>${lang.lang_layout_remoteOnly}`
}
var html = ` var html = `
<div class="boxIn" id="timeline_box_${key}_box" tlid="${key}" data-acct="${acct.domain}" style="${addHeight}"> <div class="boxIn" id="timeline_box_${key}_box" tlid="${key}" data-acct="${acct.domain}" style="${addHeight}">
<div class="notice-box z-depth-2" id="menu_${key}" style="${insert}"> <div class="notice-box z-depth-2" id="menu_${key}" style="${insert}">
@@ -373,7 +357,7 @@ function parseColumn(target, dontclose) {
<i class="material-icons waves-effect ${isMisRed}" id="notice_icon_${key}" ${notf_attr} <i class="material-icons waves-effect ${isMisRed}" id="notice_icon_${key}" ${notf_attr}
style="font-size:40px; padding-top:25%;" style="font-size:40px; padding-top:25%;"
onclick="checkStr('${acct.type}','${data}','${acct.domain}', '${key}', '${delc}','${voice}',null)" onclick="checkStr('${acct.type}','${data}','${acct.domain}', '${key}', '${delc}','${voice}',null)"
title="${lang.lang_layout_gotop}" aria-hidden="true"> title="${lang.lang_layout_gotop}">
</i> </i>
</div> </div>
<div class="area-notice_name"> <div class="area-notice_name">
@@ -382,45 +366,39 @@ function parseColumn(target, dontclose) {
<div class="area-a1"> <div class="area-a1">
<a onclick="notfToggle('${acct.domain}','${key}')" class="setting nex ${if_notf}" <a onclick="notfToggle('${acct.domain}','${key}')" class="setting nex ${if_notf}"
title="${unique_notf}" ${icnsert}> title="${unique_notf}" ${icnsert}>
<i class="material-icons waves-effect nex notf-icon_${acct.domain}" aria-hidden="true">notifications</i> <i class="material-icons waves-effect nex notf-icon_${acct.domain}">notifications</i>
<span class="voice">${unique_notf}</span>
</a> </a>
<span class="cbadge hide notf-announ_${acct.domain}" style="margin-right:0" ${unread}
onclick="notfToggle('${acct.domain}','${key}')" title="${lang.lang_layout_announ}">
<i class="fas fa-bullhorn"></i>
<span class="notf-announ_${acct.domain}_ct"></span>
<span class="voice">${lang.lang_layout_announ}</span>
</span>
${if_tag_btn} ${if_tag_btn}
</div> </div>
<div class="area-sta"> <div class="area-sta">
<span class="new badge teal notf-reply_${acct.domain} hide" data-badge-caption="Reply" aria-hidden="true">0</span> <span class="new badge teal notf-reply_${acct.domain} hide" data-badge-caption="Reply">0</span>
<span class="new badge yellow black-text notf-fav_${acct.domain} hide" data-badge-caption="Fav" aria-hidden="true">0</span> <span class="new badge yellow black-text notf-fav_${acct.domain} hide" data-badge-caption="Fav">0</span>
<span class="new badge blue notf-bt_${acct.domain} hide" data-badge-caption="BT" aria-hidden="true">0</span> <span class="new badge blue notf-bt_${acct.domain} hide" data-badge-caption="BT">0</span>
<span class="new badge orange notf-follow_${acct.domain} hide" data-badge-caption="Follow" aria-hidden="true">0</span> <span class="new badge orange notf-follow_${acct.domain} hide" data-badge-caption="Follow">0</span>
</div> </div>
<div class="area-a2"> <div class="area-a2">
<a onclick="removeColumn('${key}')" class="setting nex"> <a onclick="removeColumn('${key}')" class="setting nex">
<i class="material-icons waves-effect nex" title="${lang.lang_layout_delthis}" ${icnsert} aria-hidden="true">cancel</i> <i class="material-icons waves-effect nex" title="${lang.lang_layout_delthis}" ${icnsert}>cancel</i>
<span class="voice">${lang.lang_layout_delthis}</span>
</a> </a>
</div> </div>
<div class="area-a3"> <div class="area-a3">
<a onclick="setToggle('${key}')" class="setting nex" title="${lang.lang_layout_setthis}" ${icnsert}> <a onclick="setToggle('${key}')" class="setting nex" title="${lang.lang_layout_setthis}" ${icnsert}>
<i class="material-icons waves-effect nex" aria-hidden="true">settings</i> <i class="material-icons waves-effect nex">settings</i>
<span class="voice">${lang.lang_layout_setthis}</span>
</a> </a>
</div> </div>
</div> </div>
<div class="column-hide notf-indv-box z-depth-4" id="notf-box_${notfKey}"> <div class="column-hide notf-indv-box z-depth-4" id="notf-box_${notfKey}">
<div id="announce_${notfKey}" style="border: 1px solid"></div>
<div id="notifications_${notfKey}" data-notf="${notfDomain}" data-type="notf" class="notf-timeline"> <div id="notifications_${notfKey}" data-notf="${notfDomain}" data-type="notf" class="notf-timeline">
</div> </div>
</div> </div>
<div class="column-hide notf-indv-box" id="util-box_${key}" style="padding:5px;"> <div class="column-hide notf-indv-box" id="util-box_${key}" style="padding:5px;">
${unread}
${exclude}${left_hold} ${exclude}${left_hold}
${mediaFil}<br> <a onclick="mediaToggle('${key}')" class="setting nex">
<i class="material-icons waves-effect nex" title="${lang.lang_layout_mediafil}">perm_media</i>
<span id="sta-media-${key}">On</span>
</a>
${lang.lang_layout_mediafil}<br>
<a onclick="cardToggle('${key}')" class="setting nex"> <a onclick="cardToggle('${key}')" class="setting nex">
<i class="material-icons waves-effect nex" title="${lang.lang_layout_linkanades}">link</i> <i class="material-icons waves-effect nex" title="${lang.lang_layout_linkanades}">link</i>
<span id="sta-card-${key}">On</span> <span id="sta-card-${key}">On</span>
@@ -512,13 +490,13 @@ function parseColumn(target, dontclose) {
minHeight: 50, minHeight: 50,
minWidth: 50, minWidth: 50,
grid: 50, grid: 50,
resize: function (event, ui) { resize: function(event, ui) {
$(this).css('min-width', ui.size.width + 'px') $(this).css('min-width', ui.size.width + 'px')
$(this).css('max-width', ui.size.width + 'px') $(this).css('max-width', ui.size.width + 'px')
$(this).css('min-height', ui.size.height + 'px') $(this).css('min-height', ui.size.height + 'px')
$(this).css('max-height', ui.size.height + 'px') $(this).css('max-height', ui.size.height + 'px')
}, },
stop: function (event, ui) { stop: function(event, ui) {
var col = localStorage.getItem('column') var col = localStorage.getItem('column')
var o = JSON.parse(col) var o = JSON.parse(col)
var width = ui.size.width var width = ui.size.width
@@ -533,14 +511,16 @@ function parseColumn(target, dontclose) {
} else { } else {
//横幅。その縦幅を持つカラムのidは //横幅。その縦幅を持つカラムのidは
console.log('yoko') console.log('yoko')
var key = $(this).find('.boxIn').attr('tlid') var key = $(this)
.find('.boxIn')
.attr('tlid')
var obj = o[key] var obj = o[key]
obj.width = width obj.width = width
o[key] = obj o[key] = obj
} }
var json = JSON.stringify(o) var json = JSON.stringify(o)
localStorage.setItem('column', json) localStorage.setItem('column', json)
}, }
}) })
} }
function checkStr(type, data, acct_id, key, delc, voice) { function checkStr(type, data, acct_id, key, delc, voice) {
@@ -590,7 +570,7 @@ function addColumn() {
} }
var add = { var add = {
domain: acct, domain: acct,
type: type, type: type
} }
var multi = localStorage.getItem('column') var multi = localStorage.getItem('column')
var obj = JSON.parse(multi) var obj = JSON.parse(multi)
@@ -624,7 +604,9 @@ function addselCk() {
$('#webview-add').addClass('hide') $('#webview-add').addClass('hide')
} }
if (domain == 'knzk.me' || domain == 'mstdn.y-zu.org') { if (domain == 'knzk.me' || domain == 'mstdn.y-zu.org') {
$('#type-sel').append('<option value="dm" data-trans="dm" id="direct-add">' + lang.layout_dm + '</option>') $('#type-sel').append(
'<option value="dm" data-trans="dm" id="direct-add">' + lang.layout_dm + '</option>'
)
} else { } else {
$('#direct-add').remove() $('#direct-add').remove()
} }
@@ -641,20 +623,16 @@ function removeColumn(tlid) {
confirmButtonColor: '#3085d6', confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33', cancelButtonColor: '#d33',
confirmButtonText: lang.lang_yesno, confirmButtonText: lang.lang_yesno,
cancelButtonText: lang.lang_no, cancelButtonText: lang.lang_no
}).then((result) => { }).then(result => {
if (result.value) { if (result.value) {
var multi = localStorage.getItem('column') var multi = localStorage.getItem('column')
var obj = JSON.parse(multi) var obj = JSON.parse(multi)
var data = obj[tlid]
obj.splice(tlid, 1) obj.splice(tlid, 1)
var json = JSON.stringify(obj) var json = JSON.stringify(obj)
localStorage.setItem('column', json) localStorage.setItem('column', json)
sortLoad() sortLoad()
$('#timeline_box_' + tlid + '_box').remove() $('#timeline_box_' + tlid + '_parentBox').remove()
if(!data.left_fold) {
$('#timeline_box_' + tlid + '_parentBox').remove()
}
} }
$('#sort-box').removeClass('hide') $('#sort-box').removeClass('hide')
$('#sort-box').addClass('show') $('#sort-box').addClass('show')
@@ -668,28 +646,28 @@ function setToggle(tlid) {
$('#util-box_' + tlid).css('display', 'block') $('#util-box_' + tlid).css('display', 'block')
$('#util-box_' + tlid).animate( $('#util-box_' + tlid).animate(
{ {
height: '200px', height: '200px'
}, },
{ {
duration: 300, duration: 300,
complete: function () { complete: function() {
$('#util-box_' + tlid).css('overflow-y', 'scroll') $('#util-box_' + tlid).css('overflow-y', 'scroll')
$('#util-box_' + tlid).removeClass('column-hide') $('#util-box_' + tlid).removeClass('column-hide')
}, }
} }
) )
} else { } else {
$('#util-box_' + tlid).css('overflow-y', 'hidden') $('#util-box_' + tlid).css('overflow-y', 'hidden')
$('#util-box_' + tlid).animate( $('#util-box_' + tlid).animate(
{ {
height: '0', height: '0'
}, },
{ {
duration: 300, duration: 300,
complete: function () { complete: function() {
$('#util-box_' + tlid).addClass('column-hide') $('#util-box_' + tlid).addClass('column-hide')
$('#util-box_' + tlid).css('display', 'none') $('#util-box_' + tlid).css('display', 'none')
}, }
} }
) )
} }
@@ -701,28 +679,28 @@ function setToggleTag(tlid) {
$('#tag-box_' + tlid).css('display', 'block') $('#tag-box_' + tlid).css('display', 'block')
$('#tag-box_' + tlid).animate( $('#tag-box_' + tlid).animate(
{ {
height: '200px', height: '200px'
}, },
{ {
duration: 300, duration: 300,
complete: function () { complete: function() {
$('#tag-box_' + tlid).css('overflow-y', 'scroll') $('#tag-box_' + tlid).css('overflow-y', 'scroll')
$('#tag-box_' + tlid).removeClass('column-hide') $('#tag-box_' + tlid).removeClass('column-hide')
}, }
} }
) )
} else { } else {
$('#tag-box_' + tlid).css('overflow-y', 'hidden') $('#tag-box_' + tlid).css('overflow-y', 'hidden')
$('#tag-box_' + tlid).animate( $('#tag-box_' + tlid).animate(
{ {
height: '0', height: '0'
}, },
{ {
duration: 300, duration: 300,
complete: function () { complete: function() {
$('#tag-box_' + tlid).addClass('column-hide') $('#tag-box_' + tlid).addClass('column-hide')
$('#tag-box_' + tlid).css('display', 'none') $('#tag-box_' + tlid).css('display', 'none')
}, }
} }
) )
} }
@@ -829,16 +807,11 @@ function unstreamingTL(type, key, basekey, insert, icnsert, left_fold, css, anim
${lang.lang_layout_leftUnfold} ${lang.lang_layout_leftUnfold}
</span><br>` </span><br>`
} }
if(type == 'utl') {
var dataHtml = false
} else {
var dataHtml = data
}
var html = `<div class="boxIn" id="timeline_box_${key}_box" tlid="${key}"> var html = `<div class="boxIn" id="timeline_box_${key}_box" tlid="${key}">
<div class="notice-box z-depth-2" id="menu_${key}" style="${insert} "> <div class="notice-box z-depth-2" id="menu_${key}" style="${insert} ">
<div class="area-notice"> <div class="area-notice">
<i class="material-icons waves-effect" id="notice_icon_${key}" style="font-size:40px; padding-top:25%;" <i class="material-icons waves-effect" id="notice_icon_${key}" style="font-size:40px; padding-top:25%;"
onclick="${type}('${key}','${dataHtml}');" title="${lang.lang_layout_gotop}"></i> onclick="${type}('${key}','${data}');" title="${lang.lang_layout_gotop}"></i>
</div> </div>
<div class="area-notice_name"> <div class="area-notice_name">
<span id="notice_${key}" class="tl-title"></span> <span id="notice_${key}" class="tl-title"></span>
@@ -879,8 +852,6 @@ function unstreamingTL(type, key, basekey, insert, icnsert, left_fold, css, anim
} else if (type == 'bookmark') { } else if (type == 'bookmark') {
console.log(key, data) console.log(key, data)
bookmark(key, data) bookmark(key, data)
} else if (type == 'utl') {
utl(key, data.acct, data.data)
} }
cardCheck(key) cardCheck(key)
ebtCheck(key) ebtCheck(key)
@@ -898,22 +869,6 @@ function bookmark(key, data) {
} }
tl('bookmark', '', data, key, 'false', voice, '') tl('bookmark', '', data, key, 'false', voice, '')
} }
function utl(key, acct_id, data) {
if(!data) {
var multi = localStorage.getItem('column')
var obj = JSON.parse(multi)
data = obj[key].data
acct_id = obj[key].domain
}
console.log(key, data)
if (localStorage.getItem('voice_' + key)) {
var voice = true
} else {
var voice = false
}
tl('utl', data, acct_id, key, 'false', voice, '')
}
function leftFoldSet(key) { function leftFoldSet(key) {
var multi = localStorage.getItem('column') var multi = localStorage.getItem('column')
var obj = JSON.parse(multi) var obj = JSON.parse(multi)

View File

@@ -33,7 +33,6 @@ function menu() {
$("#add-box").removeClass("hide"); $("#add-box").removeClass("hide");
$("#left-menu div").removeClass("active"); $("#left-menu div").removeClass("active");
$("#addColumnMenu").addClass("active"); $("#addColumnMenu").addClass("active");
$("#addColumnMenu").click();
} else { } else {
$('#menu').fadeOut() $('#menu').fadeOut()
$("#menu").removeClass("appear") $("#menu").removeClass("appear")
@@ -70,7 +69,7 @@ $(function () {
}); });
}); });
function help() { function help() {
$("#left-menu a").removeClass("active"); $("#left-menu div").removeClass("active");
$("#helpMenu").addClass("active"); $("#helpMenu").addClass("active");
$(".menu-content").addClass("hide"); $(".menu-content").addClass("hide");
$("#help-box").removeClass("hide"); $("#help-box").removeClass("hide");

View File

@@ -58,10 +58,10 @@ function show() {
mdCheck() mdCheck()
} }
$(function () { $(function() {
$('#post-box').draggable({ $('#post-box').draggable({
handle: '#post-bar', handle: '#post-bar',
stop: function () { stop: function() {
var left = $('#post-box').offset().left var left = $('#post-box').offset().left
if (left > $('body').width() - $('#post-box').width()) { if (left > $('body').width() - $('#post-box').width()) {
left = $('body').width() - $('#post-box').width() left = $('body').width() - $('#post-box').width()
@@ -76,15 +76,15 @@ $(function () {
} }
localStorage.setItem('postbox-left', left) localStorage.setItem('postbox-left', left)
localStorage.setItem('postbox-top', top) localStorage.setItem('postbox-top', top)
}, }
}) })
$('#post-box').resizable({ $('#post-box').resizable({
minHeight: 150, minHeight: 150,
minWidth: 100, minWidth: 100,
stop: function (event, ui) { stop: function(event, ui) {
$('#textarea').blur() $('#textarea').blur()
localStorage.setItem('postbox-width', ui.size.width) localStorage.setItem('postbox-width', ui.size.width)
}, }
}) })
}) })
@@ -101,44 +101,40 @@ if (location.search) {
$('.mini-btn').text('expand_less') $('.mini-btn').text('expand_less')
} }
} }
window.onload = initPostbox $('#posttgl').click(function(e) {
function initPostbox() { if (!$('#post-box').hasClass('appear')) {
$('#posttgl').click(function (e) { show()
if (!$('#post-box').hasClass('appear')) { } else {
show() hide()
} else { }
$('.cvo').removeClass('selectedToot')
selectedColumn = 0
selectedToot = 0
})
$('#timeline-container,#group').click(function(e) {
if (localStorage.getItem('box') != 'absolute') {
if ($('#post-box').hasClass('appear') && !localStorage.getItem('nohide')) {
hide() hide()
} }
$('.cvo').removeClass('selectedToot') }
selectedColumn = 0 $('.cvo').removeClass('selectedToot')
selectedToot = 0 selectedColumn = 0
}) selectedToot = 0
localStorage.removeItem('nohide')
$('#timeline-container,#group').click(function (e) { })
if (localStorage.getItem('box') != 'absolute') { $('#contextWrap').click(function(e) {
if ($('#post-box').hasClass('appear') && !localStorage.getItem('nohide')) { $('#contextWrap').addClass('hide')
hide() $('.contextMenu').addClass('hide')
} $('.act-icon').text('expand_more')
} })
$('.cvo').removeClass('selectedToot') $('#textarea,#cw-text').focusout(function(e) {
selectedColumn = 0 localStorage.setItem('nohide', true)
selectedToot = 0 var countup = function() {
localStorage.removeItem('nohide') localStorage.removeItem('nohide')
srcBox('close') }
}) //setTimeout(remove, 100);
$('#contextWrap').click(function (e) { $('.cvo').removeClass('selectedToot')
$('#contextWrap').addClass('hide') selectedColumn = 0
$('.contextMenu').addClass('hide') selectedToot = 0
$('.act-icon').text('expand_more') })
})
$('#textarea,#cw-text').focusout(function (e) {
localStorage.setItem('nohide', true)
var countup = function () {
localStorage.removeItem('nohide')
}
//setTimeout(remove, 100);
$('.cvo').removeClass('selectedToot')
selectedColumn = 0
selectedToot = 0
})
}

View File

@@ -3,7 +3,7 @@ var envView = new Vue({
el: '#envView', el: '#envView',
data: { config: envConstruction }, data: { config: envConstruction },
methods: { methods: {
complete: function (i, val) { complete: function(i, val) {
var ls = envView.config[i].storage var ls = envView.config[i].storage
M.toast({ html: 'Complete', displayLength: 3000 }) M.toast({ html: 'Complete', displayLength: 3000 })
if (!val) { if (!val) {
@@ -17,18 +17,15 @@ var envView = new Vue({
if (ls == 'ua_setting') { if (ls == 'ua_setting') {
useragent(val) useragent(val)
} }
if (ls == 'frame') {
frameSet(val)
}
return true return true
}, }
}, }
}) })
var tlView = new Vue({ var tlView = new Vue({
el: '#tlView', el: '#tlView',
data: { config: tlConstruction }, data: { config: tlConstruction },
methods: { methods: {
complete: function (i, val) { complete: function(i, val) {
var ls = tlView.config[i] var ls = tlView.config[i]
if (val) { if (val) {
localStorage.setItem(ls.storage, val) localStorage.setItem(ls.storage, val)
@@ -46,18 +43,18 @@ var tlView = new Vue({
} }
} }
return true return true
}, }
}, }
}) })
var postView = new Vue({ var postView = new Vue({
el: '#postView', el: '#postView',
data: { data: {
config: postConstruction, config: postConstruction,
kirishima: localStorage.getItem('kirishima'), kirishima: localStorage.getItem('kirishima'),
quoters: localStorage.getItem('quoters'), quoters: localStorage.getItem('quoters')
}, },
methods: { methods: {
complete: function (i, val) { complete: function(i, val) {
var ls = postView.config[i] var ls = postView.config[i]
if (val) { if (val) {
localStorage.setItem(ls.storage, val) localStorage.setItem(ls.storage, val)
@@ -75,8 +72,8 @@ var postView = new Vue({
} }
} }
return true return true
}, }
}, }
}) })
//設定ボタン押した。 //設定ボタン押した。
function settings() { function settings() {
@@ -99,14 +96,14 @@ function settings() {
var fontd = $('#font').val() var fontd = $('#font').val()
if (fontd) { if (fontd) {
if (fontd != localStorage.getItem('font')) { if (fontd != localStorage.getItem('font')) {
M.toast({ html: lang.lang_setting_font.replace('{{set}}', fontd), displayLength: 3000 }) M.toast({ html: lang.lang_setting_font.replace('{{set}}', ct), displayLength: 3000 })
} }
localStorage.setItem('font', fontd) localStorage.setItem('font', fontd)
themes() themes()
} else { } else {
if (localStorage.getItem('font')) { if (localStorage.getItem('font')) {
localStorage.removeItem('font') localStorage.removeItem('font')
M.toast({ html: lang.lang_setting_font.replace('{{set}}', '"default"'), displayLength: 3000 }) M.toast({ html: lang.lang_setting_font.replace('{{set}}', ct), displayLength: 3000 })
themes() themes()
} }
} }
@@ -177,7 +174,6 @@ function load() {
$('#soundVolVal').text(cvol * 100) $('#soundVolVal').text(cvol * 100)
} }
//$("#log").val(localStorage.getItem("errors")) //$("#log").val(localStorage.getItem("errors"))
$('#lastFmUser').val(localStorage.getItem('lastFmUser'))
} }
function customVol() { function customVol() {
var cvol = $('#soundvol').val() var cvol = $('#soundvol').val()
@@ -216,7 +212,7 @@ function climute() {
return return
} }
var templete var templete
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function(key) {
var cli = obj[key] var cli = obj[key]
var list = key * 1 + 1 var list = key * 1 + 1
templete = templete =
@@ -251,7 +247,7 @@ function wordmute() {
obj = [] obj = []
} }
$('#wordmute').chips({ $('#wordmute').chips({
data: obj, data: obj
}) })
} }
function wordmuteSave() { function wordmuteSave() {
@@ -267,7 +263,7 @@ function wordemp() {
obj = [] obj = []
} }
$('#wordemp').chips({ $('#wordemp').chips({
data: obj, data: obj
}) })
} }
function wordempSave() { function wordempSave() {
@@ -279,7 +275,7 @@ function notftest() {
var os = localStorage.getItem('platform') var os = localStorage.getItem('platform')
var options = { var options = {
body: lang.lang_setting_notftest + '(' + lang.lang_setting_notftestprof + ')', body: lang.lang_setting_notftest + '(' + lang.lang_setting_notftestprof + ')',
icon: localStorage.getItem('prof_0'), icon: localStorage.getItem('prof_0')
} }
var n = new Notification('TheDesk' + lang.lang_setting_notftest, options) var n = new Notification('TheDesk' + lang.lang_setting_notftest, options)
} }
@@ -304,7 +300,7 @@ function changelang(lang) {
} }
function exportSettings() { function exportSettings() {
var exp = exportSettingsCore() var exp = exportSettingsCore()
$('#imp-exp').val(JSON5.stringify(exp)) $("#imp-exp").val(JSON5.stringify(exp))
Swal.fire({ Swal.fire({
title: lang.lang_setting_exportwarn, title: lang.lang_setting_exportwarn,
type: 'warning', type: 'warning',
@@ -312,8 +308,8 @@ function exportSettings() {
confirmButtonColor: '#3085d6', confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33', cancelButtonColor: '#d33',
confirmButtonText: lang.lang_yesno, confirmButtonText: lang.lang_yesno,
cancelButtonText: lang.lang_no, cancelButtonText: lang.lang_no
}).then((result) => { }).then(result => {
if (result.value) { if (result.value) {
postMessage(['exportSettings', ''], '*') postMessage(['exportSettings', ''], '*')
} }
@@ -352,7 +348,11 @@ function exportSettingsCore() {
config.font = localStorage.getItem('font') config.font = localStorage.getItem('font')
exp.config = config exp.config = config
//keysc //keysc
exp.ksc = [localStorage.getItem('oks-1'), localStorage.getItem('oks-2'), localStorage.getItem('oks-3')] exp.ksc = [
localStorage.getItem('oks-1'),
localStorage.getItem('oks-2'),
localStorage.getItem('oks-3')
]
//climu //climu
var cli = localStorage.getItem('client_mute') var cli = localStorage.getItem('client_mute')
var climu = JSON.parse(cli) var climu = JSON.parse(cli)
@@ -381,8 +381,8 @@ function exportSettingsCore() {
return exp return exp
} }
function importSettings() { function importSettings() {
if ($('#imp-exp').val()) { if($("#imp-exp").val()) {
importSettingsCore(JSON5.parse($('#imp-exp').val())) importSettingsCore(JSON5.parse($("#imp-exp").val()))
return false return false
} }
Swal.fire({ Swal.fire({
@@ -392,8 +392,8 @@ function importSettings() {
confirmButtonColor: '#3085d6', confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33', cancelButtonColor: '#d33',
confirmButtonText: lang.lang_yesno, confirmButtonText: lang.lang_yesno,
cancelButtonText: lang.lang_no, cancelButtonText: lang.lang_no
}).then((result) => { }).then(result => {
if (result.value) { if (result.value) {
postMessage(['importSettings', ''], '*') postMessage(['importSettings', ''], '*')
} }
@@ -487,7 +487,7 @@ function importSettingsCore(obj) {
} else { } else {
Swal.fire({ Swal.fire({
type: 'error', type: 'error',
title: 'Error', title: 'Error'
}) })
} }
} }
@@ -502,13 +502,21 @@ function fontList(arg) {
$('#fonts').removeClass('hide') $('#fonts').removeClass('hide')
for (var i = 0; i < arg.length; i++) { for (var i = 0; i < arg.length; i++) {
var font = arg[i] var font = arg[i]
$('#fonts').append('<div class="font pointer" style="font-family:' + font + '" onclick="insertFont(\'' + font + '\')">' + font + '</div>') $('#fonts').append(
'<div class="font pointer" style="font-family:' +
font.family +
'" onclick="insertFont(\'' +
font.family +
'\')">' +
font.family +
'</div>'
)
} }
} }
function insertFont(name) { function insertFont(name) {
$('#font').val(name) $('#font').val(name)
} }
$('.color-picker').each(function (i, elem) { $('.color-picker').each(function(i, elem) {
pickerDefine(i, 'fff') pickerDefine(i, 'fff')
}) })
function pickerDefine(i, color) { function pickerDefine(i, color) {
@@ -525,16 +533,17 @@ function pickerDefine(i, color) {
hue: true, // Hue slider hue: true, // Hue slider
interaction: { interaction: {
rgba: false, // rgba option (red green blue and alpha) rgba: false, // rgba option (red green blue and alpha)
input: true, // input / output element input: true // input / output element
}, }
}, },
strings: { strings: {
save: 'Save', // Default for save button save: 'Save', // Default for save button
clear: 'Clear', // Default for clear button clear: 'Clear' // Default for clear button
}, }
}) })
pickr.on('change', (...args) => { pickr.on('change', (...args) => {
var rgb = 'rgb(' + args[0].toRGBA()[0] + ',' + args[0].toRGBA()[1] + ',' + args[0].toRGBA()[2] + ')' var rgb =
'rgb(' + args[0].toRGBA()[0] + ',' + args[0].toRGBA()[1] + ',' + args[0].toRGBA()[2] + ')'
$('#color-picker' + i + '_value').val(rgb) $('#color-picker' + i + '_value').val(rgb)
}) })
} }
@@ -588,7 +597,7 @@ function customComp() {
TheDeskModal: modalC, TheDeskModal: modalC,
TheDeskBottom: bottomC, TheDeskBottom: bottomC,
TheDeskPostbox: postboxC, TheDeskPostbox: postboxC,
TheDeskSubcolor: subcolorC, TheDeskSubcolor: subcolorC
} }
} else { } else {
var advanceTheme = {} var advanceTheme = {}
@@ -608,10 +617,10 @@ function customComp() {
vars: { vars: {
primary: primaryC, primary: primaryC,
secondary: secondaryC, secondary: secondaryC,
text: textC, text: textC
}, },
props: advanceTheme, props: advanceTheme,
id: id, id: id
} }
$('#custom_json').val(JSON.stringify(json)) $('#custom_json').val(JSON.stringify(json))
themes('custom') themes('custom')
@@ -621,7 +630,9 @@ function customComp() {
$('#dark').prop('checked', true) $('#dark').prop('checked', true)
$('#custom_json').val('') $('#custom_json').val('')
for (var i = 0; i <= 8; i++) { for (var i = 0; i <= 8; i++) {
$('#color-picker' + i + '-wrap').html('<div class="color-picker" id="color-picker' + i + '"></div>') $('#color-picker' + i + '-wrap').html(
'<div class="color-picker" id="color-picker' + i + '"></div>'
)
$('#color-picker' + i + '_value').val('') $('#color-picker' + i + '_value').val('')
pickerDefine(i, 'fff') pickerDefine(i, 'fff')
} }
@@ -634,7 +645,9 @@ function deleteIt() {
$('#dark').prop('checked', true) $('#dark').prop('checked', true)
$('#custom_json').val('') $('#custom_json').val('')
for (var i = 0; i <= 8; i++) { for (var i = 0; i <= 8; i++) {
$('#color-picker' + i + '-wrap').html('<div class="color-picker" id="color-picker' + i + '"></div>') $('#color-picker' + i + '-wrap').html(
'<div class="color-picker" id="color-picker' + i + '"></div>'
)
$('#color-picker' + i + '_value').val('') $('#color-picker' + i + '_value').val('')
pickerDefine(i, 'fff') pickerDefine(i, 'fff')
} }
@@ -645,7 +658,7 @@ function ctLoad() {
} }
function ctLoadCore(args) { function ctLoadCore(args) {
var templete = '' var templete = ''
Object.keys(args).forEach(function (key) { Object.keys(args).forEach(function(key) {
var theme = args[key] var theme = args[key]
var themeid = theme.id var themeid = theme.id
templete = templete + '<option value="' + themeid + '">' + theme.name + '</option>' templete = templete + '<option value="' + themeid + '">' + theme.name + '</option>'
@@ -654,7 +667,8 @@ function ctLoadCore(args) {
localStorage.setItem('customtheme-id', args[0].id) localStorage.setItem('customtheme-id', args[0].id)
} }
$('#custom-sel-sel').html(templete) $('#custom-sel-sel').html(templete)
templete = '<option value="add_new">' + $('#edit-selector').attr('data-add') + '</option>' + templete templete =
'<option value="add_new">' + $('#edit-selector').attr('data-add') + '</option>' + templete
$('#custom-edit-sel').html(templete) $('#custom-edit-sel').html(templete)
$('select').formSelect() $('select').formSelect()
} }
@@ -670,7 +684,9 @@ function custom() {
$('#dark').prop('checked', true) $('#dark').prop('checked', true)
$('#custom_json').val('') $('#custom_json').val('')
for (var i = 0; i <= 8; i++) { for (var i = 0; i <= 8; i++) {
$('#color-picker' + i + '-wrap').html('<div class="color-picker" id="color-picker' + i + '"></div>') $('#color-picker' + i + '-wrap').html(
'<div class="color-picker" id="color-picker' + i + '"></div>'
)
$('#color-picker' + i + '_value').val('') $('#color-picker' + i + '_value').val('')
pickerDefine(i, 'fff') pickerDefine(i, 'fff')
} }
@@ -718,7 +734,9 @@ function advancedConncet(args, tar, sub, i) {
} else { } else {
var color = args.vars[sub] var color = args.vars[sub]
} }
$('#color-picker' + i + '-wrap').html('<div class="color-picker" id="color-picker' + i + '"></div>') $('#color-picker' + i + '-wrap').html(
'<div class="color-picker" id="color-picker' + i + '"></div>'
)
$('#color-picker' + i + '_value').val(color) $('#color-picker' + i + '_value').val(color)
pickerDefine(i, rgbToHex(color)) pickerDefine(i, rgbToHex(color))
} }
@@ -729,7 +747,7 @@ function customImp() {
} else { } else {
Swal.fire({ Swal.fire({
type: 'error', type: 'error',
title: 'Error', title: 'Error'
}) })
} }
} }
@@ -746,9 +764,6 @@ function hardwareAcceleration(had) {
function useragent(val) { function useragent(val) {
postMessage(['ua', val], '*') postMessage(['ua', val], '*')
} }
function frameSet(val) {
postMessage(['frameSet', val], '*')
}
function customSound(key) { function customSound(key) {
postMessage(['customSound', key], '*') postMessage(['customSound', key], '*')
} }
@@ -756,7 +771,7 @@ function customSoundSave(key, file) {
localStorage.setItem('custom' + key, file) localStorage.setItem('custom' + key, file)
$('#c1-file').text(file) $('#c1-file').text(file)
} }
window.onload = function () { window.onload = function() {
//最初に読む //最初に読む
load() load()
climute() climute()
@@ -766,14 +781,17 @@ window.onload = function () {
voiceSettingLoad() voiceSettingLoad()
oksload() oksload()
ctLoad() ctLoad()
$('body').addClass(localStorage.getItem('platform'))
} }
//設定画面で未読マーカーは要らない //設定画面で未読マーカーは要らない
function asReadEnd() { function asReadEnd() {
postMessage(['asReadComp', ''], '*') postMessage(['asReadComp', ''], '*')
} }
function checkupd() { function checkupd() {
if (localStorage.getItem('winstore') == 'brewcask' || localStorage.getItem('winstore') == 'snapcraft' || localStorage.getItem('winstore') == 'winstore') { if (
localStorage.getItem('winstore') == 'brewcask' ||
localStorage.getItem('winstore') == 'snapcraft' ||
localStorage.getItem('winstore') == 'winstore'
) {
var winstore = true var winstore = true
} else { } else {
var winstore = false var winstore = false
@@ -781,22 +799,22 @@ function checkupd() {
var ver = localStorage.getItem('ver') var ver = localStorage.getItem('ver')
var start = 'https://thedesk.top/ver.json' var start = 'https://thedesk.top/ver.json'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET'
}) })
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text)
}) })
} }
return response.json() return response.json()
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error)
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function (mess) { .then(function(mess) {
console.table(mess) console.table(mess)
if (mess) { if (mess) {
var platform = localStorage.getItem('platform') var platform = localStorage.getItem('platform')
@@ -809,13 +827,13 @@ function checkupd() {
Swal.fire({ Swal.fire({
type: 'info', type: 'info',
title: lang.lang_setting_noupd, title: lang.lang_setting_noupd,
html: ver, html: ver
}) })
} else if (ver.indexOf('beta') != -1 || winstore) { } else if (ver.indexOf('beta') != -1 || winstore) {
Swal.fire({ Swal.fire({
type: 'info', type: 'info',
title: lang.lang_setting_thisisbeta, title: lang.lang_setting_thisisbeta,
html: ver, html: ver
}) })
} else { } else {
localStorage.removeItem('new-ver-skip') localStorage.removeItem('new-ver-skip')
@@ -824,11 +842,3 @@ function checkupd() {
} }
}) })
} }
function lastFmSet() {
if ($('#lastFmUser').val()) {
localStorage.setItem('lastFmUser', $('#lastFmUser').val())
} else {
localStorage.removeItem('lastFmUser')
}
M.toast({ html: 'Complete: last.fm', displayLength: 3000 })
}

View File

@@ -33,7 +33,7 @@ function sortLoad () {
var acctdata = user + "@" + domain; var acctdata = user + "@" + domain;
} }
var html = '<li class="drag-content" data-id="' + key + '" data-flag="' + flag + '"' + insert + '><div class="sorticon"><i class="material-icons">' + icon(acct.type) + '</i></div><div class="sorttitle">' + cap(acct.type, acct.data, acct.domain) + '</div><div class="sortaction"><a onclick="goColumn(' + key + var html = '<li class="drag-content" data-id="' + key + '" data-flag="' + flag + '"' + insert + '><div class="sorticon"><i class="material-icons">' + icon(acct.type) + '</i></div><div class="sorttitle">' + cap(acct.type, escapeHTML(acct.data), acct.domain) + '</div><div class="sortaction"><a onclick="goColumn(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="' + lang.lang_sort_gothis + '">forward</i></a> <a onclick="removeColumn(' + key + ')" class="setting nex"><i class="material-icons waves-effect nex" title="' + lang.lang_sort_gothis + '">forward</i></a> <a onclick="removeColumn(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="このカラムを削除">cancel</i></a></div><div class="sortacct">' + acctdata + '</div></li>'; ')" class="setting nex"><i class="material-icons waves-effect nex" title="このカラムを削除">cancel</i></a></div><div class="sortacct">' + acctdata + '</div></li>';
$("#sort").append(html); $("#sort").append(html);
@@ -111,7 +111,7 @@ function sort() {
} }
//ソートボタントグル //ソートボタントグル
function sortMenu() { function sortMenu() {
$("#left-menu a").removeClass("active"); $("#left-menu div").removeClass("active");
$("#sortMenu").addClass("active"); $("#sortMenu").addClass("active");
$(".menu-content").addClass("hide"); $(".menu-content").addClass("hide");
$("#sort-box").removeClass("hide"); $("#sort-box").removeClass("hide");

View File

@@ -1,311 +1,189 @@
function spotifyConnect() { function spotifyConnect() {
var auth = 'https://spotify.thedesk.top/connect' var auth = "https://accounts.spotify.com/authorize?client_id=0f18e54abe0b4aedb4591e353d3aff69&redirect_uri=https://thedesk.top/spotify-connect&response_type=code&scope=user-read-currently-playing";
$('#spotify-code-show').removeClass('hide') var platform = localStorage.getItem("platform");
postMessage(['openUrl', auth], '*') if (platform == "win32") {
postMessage(["openUrl", auth], "*");
postMessage(["sendSinmpleIpc", "quit"], "*");
} else {
auth = auth + "&state=code";
$("#spotify-code-show").removeClass("hide");
postMessage(["openUrl", auth], "*");
}
} }
function spotifyAuth() { function spotifyAuth() {
var code = $('#spotify-code').val() var code = $("#spotify-code").val();
localStorage.setItem('spotify-token', code) localStorage.setItem("spotify", "code");
$('#spotify-code-show').addClass('hide') localStorage.setItem("spotify-refresh", code);
$('#spotify-enable').addClass('disabled') $("#spotify-code-show").addClass("hide");
$('#spotify-disable').removeClass('disabled') $("#spotify-enable").addClass("disabled");
$("#spotify-disable").removeClass("disabled");
} }
function spotifyDisconnect() { function spotifyDisconnect() {
var start = 'https://spotify.thedesk.top/disconnect?code=' + localStorage.getItem('spotify-token') localStorage.removeItem("spotify");
fetch(start, { localStorage.removeItem("spotify-refresh");
method: 'GET', checkSpotify();
headers: {
'content-type': 'application/json',
},
})
.then(function (response) {
if (!response.ok) {
response.text().then(function (text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function (error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function (json) {
if(!json.success) alert('error')
localStorage.removeItem('spotify-token')
checkSpotify()
})
} }
function checkSpotify() { function checkSpotify() {
if (localStorage.getItem('spotify-token')) { if (localStorage.getItem("spotify")) {
$('#spotify-enable').addClass('disabled') $("#spotify-enable").addClass("disabled");
$('#spotify-disable').removeClass('disabled') $("#spotify-disable").removeClass("disabled");
} else { } else {
$('#spotify-enable').removeClass('disabled') $("#spotify-enable").removeClass("disabled");
$('#spotify-disable').addClass('disabled') $("#spotify-disable").addClass("disabled");
} }
var content = localStorage.getItem('np-temp') var content = localStorage.getItem("np-temp");
if (!content || content == '' || content == 'null') { if (!content || content == "" || content == "null") {
var content = '#NowPlaying {song} / {album} / {artist}\n{url} #SpotifyWithTheDesk' var content = "#NowPlaying {song} / {album} / {artist}\n{url} #SpotifyWithTheDesk";
} }
$('#np-temp').val(content) $("#np-temp").val(content);
var flag = localStorage.getItem('artwork') var flag = localStorage.getItem("artwork");
if (flag) { if (flag) {
$('#awk_yes').prop('checked', true) $("#awk_yes").prop("checked", true);
} else { } else {
$('#awk_no').prop('checked', true) $("#awk_no").prop("checked", true);
}
var flag2 = localStorage.getItem('complete-artwork')
if (flag2) {
$('#amw_yes').prop('checked', true)
} else {
$('#amw_no').prop('checked', true)
} }
} }
function spotifyFlagSave() { function spotifyFlagSave() {
var awk = $('[name=awk]:checked').val() var awk = $("[name=awk]:checked").val();
if (awk == 'yes') { if (awk == "yes") {
localStorage.setItem('artwork', 'yes') localStorage.setItem("artwork", "yes");
M.toast({ html: lang.lang_spotify_img, displayLength: 3000 }) M.toast({ html: lang.lang_spotify_img, displayLength: 3000 });
} else { } else {
localStorage.removeItem('artwork') localStorage.removeItem("artwork");
M.toast({ html: lang.lang_spotify_imgno, displayLength: 3000 }) M.toast({ html: lang.lang_spotify_imgno, displayLength: 3000 });
}
}
function aMusicFlagSave() {
var awk = $('[name=amw]:checked').val()
if (awk == 'yes') {
localStorage.setItem('complete-artwork', 'yes')
M.toast({ html: lang.lang_spotify_img, displayLength: 3000 })
} else {
localStorage.removeItem('complete-artwork')
M.toast({ html: lang.lang_spotify_imgno, displayLength: 3000 })
} }
} }
function nowplaying(mode) { function nowplaying(mode) {
if (mode == 'spotify') { if (mode == "spotify") {
var start = 'https://spotify.thedesk.top/current-playing?code=' + localStorage.getItem('spotify-token') var start = "https://thedesk.top/now-playing?at=" + localStorage.getItem("spotify") + "&rt=" + localStorage.getItem("spotify-refresh");
var at = localStorage.getItem('spotify-token') var at = localStorage.getItem("spotify");
if (at) { if (at) {
fetch(start, { fetch(start, {
method: 'GET', method: "GET",
headers: { headers: {
'content-type': 'application/json', "content-type": "application/json"
}, }
}) })
.then(function (response) { .then(function(response) {
if (!response.ok) { if (!response.ok) {
response.text().then(function (text) { response.text().then(function(text) {
setLog(response.url, response.status, text) setLog(response.url, response.status, text);
}) });
} }
return response.json() return response.json();
}) })
.catch(function (error) { .catch(function(error) {
todo(error) todo(error);
setLog(start, 'JSON', error) setLog(start, "JSON", error);
console.error(error) console.error(error);
}) })
.then(function (jsonRaw) { .then(function(json) {
var code = jsonRaw.token console.table(json);
localStorage.setItem('spotify-token', code)
var json = jsonRaw.data
console.table(json)
if (json.length < 1) { if (json.length < 1) {
return false return false;
} }
var item = json.item var item = json.item;
var img = item.album.images[0].url var img = item.album.images[0].url;
var flag = localStorage.getItem('artwork') var flag = localStorage.getItem("artwork");
if (flag) { if (flag) {
postMessage(['bmpImage', [img, 0]], '*') postMessage(["bmpImage", [img, 0]], "*");
} }
var content = localStorage.getItem('np-temp') var content = localStorage.getItem("np-temp");
if (!content || content == '' || content == 'null') { if (!content || content == "" || content == "null") {
var content = '#NowPlaying {song} / {album} / {artist}\n{url}' var content = "#NowPlaying {song} / {album} / {artist}\n{url}";
} }
var regExp = new RegExp('{song}', 'g') var regExp = new RegExp("{song}", "g");
content = content.replace(regExp, item.name) content = content.replace(regExp, item.name);
var regExp = new RegExp('{album}', 'g') var regExp = new RegExp("{album}", "g");
content = content.replace(regExp, item.album.name) content = content.replace(regExp, item.album.name);
var regExp = new RegExp('{artist}', 'g') var regExp = new RegExp("{artist}", "g");
content = content.replace(regExp, item.artists[0].name) content = content.replace(regExp, item.artists[0].name);
var regExp = new RegExp('{url}', 'g') var regExp = new RegExp("{url}", "g");
content = content.replace(regExp, item.external_urls.spotify) content = content.replace(regExp, item.external_urls.spotify);
var regExp = new RegExp('{composer}', 'g') var regExp = new RegExp("{composer}", "g");
content = content.replace(regExp, '') content = content.replace(regExp, "");
var regExp = new RegExp('{hz}', 'g') var regExp = new RegExp("{hz}", "g");
content = content.replace(regExp, '') content = content.replace(regExp, "");
var regExp = new RegExp('{bitRate}', 'g') var regExp = new RegExp("{bitRate}", "g");
content = content.replace(regExp, '') content = content.replace(regExp, "");
var regExp = new RegExp('{lyricist}', 'g') var regExp = new RegExp("{lyricist}", "g");
content = content.replace(regExp, '') content = content.replace(regExp, "");
var regExp = new RegExp('{bpm}', 'g') var regExp = new RegExp("{bpm}", "g");
content = content.replace(regExp, '') content = content.replace(regExp, "");
var regExp = new RegExp('{genre}', 'g') var regExp = new RegExp("{genre}", "g");
content = content.replace(regExp, '') content = content.replace(regExp, "");
$('#textarea').val(content) $("#textarea").val(content);
}) });
} else { } else {
Swal.fire({ Swal.fire({
type: 'info', type: "info",
title: lang.lang_spotify_acct, title: lang.lang_spotify_acct
}) });
}
} else if (mode == 'itunes') {
postMessage(['itunes', ''], '*')
} else if (mode == 'lastFm') {
var user = localStorage.getItem('lastFmUser')
var start = 'https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=' + user + '&limit=1&api_key=8f113803bfea951b6dde9e56d32458b2&format=json'
if (user) {
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
},
})
.then(function (response) {
if (!response.ok) {
response.text().then(function (text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function (error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function (json) {
console.table(json)
if (!json || !json.recenttracks) {
console.error('no data')
return false
}
var item = json.recenttracks.track[0]
if (!item['@attr']) return false
var img = item.image[3]['#text']
var isImg = item.streamable * 1
var flag = localStorage.getItem('artwork')
if (flag && isImg && img) {
postMessage(['bmpImage', [img, 0]], '*')
}
var content = localStorage.getItem('np-temp')
if (!content || content == '' || content == 'null') {
var content = '#NowPlaying {song} / {album} / {artist}\n{url}'
}
var regExp = new RegExp('{song}', 'g')
content = content.replace(regExp, item.name)
var regExp = new RegExp('{album}', 'g')
content = content.replace(regExp, item.album['#text'])
var regExp = new RegExp('{artist}', 'g')
content = content.replace(regExp, item.artist['#text'])
var regExp = new RegExp('{url}', 'g')
content = content.replace(regExp, '')
var regExp = new RegExp('{composer}', 'g')
content = content.replace(regExp, '')
var regExp = new RegExp('{hz}', 'g')
content = content.replace(regExp, '')
var regExp = new RegExp('{bitRate}', 'g')
content = content.replace(regExp, '')
var regExp = new RegExp('{lyricist}', 'g')
content = content.replace(regExp, '')
var regExp = new RegExp('{bpm}', 'g')
content = content.replace(regExp, '')
var regExp = new RegExp('{genre}', 'g')
content = content.replace(regExp, '')
$('#textarea').val(content)
})
} else {
Swal.fire({
type: 'info',
title: lang.lang_spotify_acct,
})
} }
} else if (mode == "itunes") {
postMessage(["itunes", ""], "*");
} }
} }
async function npCore(arg) { function npCore(arg) {
console.table(arg) if (arg.cmd) {
var content = localStorage.getItem('np-temp') console.error(arg);
if (!content || content == '' || content == 'null') { return;
var content = '#NowPlaying {song} / {album} / {artist}\n{url}'
} }
var flag = localStorage.getItem('artwork') console.table(arg);
var platform = localStorage.getItem('platform') var content = localStorage.getItem("np-temp");
var aaw = { aaw: '', album: '' } if (!content || content == "" || content == "null") {
if (platform == 'win32') { var content = "#NowPlaying {song} / {album} / {artist}\n{url}";
}
var flag = localStorage.getItem("artwork");
var platform = localStorage.getItem("platform");
if (platform == "win32") {
if (flag && arg.path) { if (flag && arg.path) {
media(arg.path, 'image/png', 'new') media(arg.path, "image/png", "new");
} }
} else if (platform == 'darwin') { } else if (platform == "darwin") {
if (flag && arg.artwork) { if (flag && arg.artwork) {
media(arg.artwork, 'image/png', 'new') media(arg.artwork, "image/png", "new");
} else if (flag && localStorage.getItem('complete-artwork')) {
var q = arg.artist + ' ' + arg.album.name + ' ' + arg.name
aaw = await getUnknownAA(q)
postMessage(['bmpImage', [aaw.aaw, 0]], '*')
} }
} }
var regExp = new RegExp('{song}', 'g') var regExp = new RegExp("{song}", "g");
content = content.replace(regExp, arg.name) content = content.replace(regExp, arg.name);
var regExp = new RegExp('{album}', 'g') var regExp = new RegExp("{album}", "g");
if (arg.album) { if (arg.album) {
if (arg.album.name) { if (arg.album.name) {
content = content.replace(regExp, arg.album.name) content = content.replace(regExp, arg.album.name);
} else {
if (aaw.album) content = content.replace(regExp, aaw.album)
content = content.replace(regExp, '-')
} }
} else {
if (aaw.album) content = content.replace(regExp, aaw.album)
content = content.replace(regExp, '-')
} }
var regExp = new RegExp('{artist}', 'g') var regExp = new RegExp("{artist}", "g");
content = content.replace(regExp, arg.artist) content = content.replace(regExp, arg.artist);
var regExp = new RegExp('{url}', 'g') var regExp = new RegExp("{url}", "g");
content = content.replace(regExp, '') content = content.replace(regExp, "");
var regExp = new RegExp('{composer}', 'g') var regExp = new RegExp("{composer}", "g");
content = content.replace(regExp, arg.composer) content = content.replace(regExp, arg.composer);
var regExp = new RegExp('{hz}', 'g') var regExp = new RegExp("{hz}", "g");
content = content.replace(regExp, arg.sampleRate / 1000 + 'kHz') content = content.replace(regExp, arg.sampleRate / 1000 + "kHz");
var regExp = new RegExp('{lyricist}', 'g') var regExp = new RegExp("{lyricist}", "g");
content = content.replace(regExp, '') content = content.replace(regExp, "");
var regExp = new RegExp('{bpm}', 'g') var regExp = new RegExp("{bpm}", "g");
content = content.replace(regExp, '') content = content.replace(regExp, "");
var regExp = new RegExp('{bitRate}', 'g') var regExp = new RegExp("{bitRate}", "g");
content = content.replace(regExp, arg.bitRate + 'kbps') content = content.replace(regExp, arg.bitRate + "kbps");
var regExp = new RegExp('{genre}', 'g') var regExp = new RegExp("{genre}", "g");
content = content.replace(regExp, arg.genre) content = content.replace(regExp, arg.genre);
$('#textarea').val(content) $("#textarea").val(content);
} }
function spotifySave() { function spotifySave() {
var temp = $('#np-temp').val() var temp = $("#np-temp").val();
localStorage.setItem('np-temp', temp) localStorage.setItem("np-temp", temp);
M.toast({ html: lang.lang_spotify_np, displayLength: 3000 }) M.toast({ html: lang.lang_spotify_np, displayLength: 3000 });
} }
if (location.search) { if (location.search) {
var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/) var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/);
var mode = m[1] var mode = m[1];
var codex = m[2] var codex = m[2];
if (mode == 'spotify') { if (mode == "spotify") {
var coder = codex.split(':') var coder = codex.split(":");
localStorage.setItem('spotify', coder[0]) localStorage.setItem("spotify", coder[0]);
localStorage.setItem('spotify-refresh', coder[1]) localStorage.setItem("spotify-refresh", coder[1]);
} else { } else {
} }
} }
async function getUnknownAA(q) {
const start = 'https://itunes.apple.com/search?term=' + q + '&country=JP&entity=song'
let promise = await fetch(start, {
method: 'GET',
})
const json = await promise.json()
if (!json.resultCount) {
return []
}
const data = json.results[0].artworkUrl100
return { aaw: data.replace(/100x100/, '512x512'), album: json.results[0].collectionName }
}

View File

@@ -14,8 +14,6 @@ function themes(theme) {
el.classList.remove('browntheme') el.classList.remove('browntheme')
el.classList.remove('blacktheme') el.classList.remove('blacktheme')
el.classList.remove('bluetheme') el.classList.remove('bluetheme')
el.classList.remove('polartheme')
el.classList.remove('snowtheme')
el.classList.remove('customtheme') el.classList.remove('customtheme')
el.classList.add(theme + 'theme') el.classList.add(theme + 'theme')
var font = localStorage.getItem('font') var font = localStorage.getItem('font')

View File

@@ -30,7 +30,7 @@ function tips(mode) {
localStorage.getItem('ver') + localStorage.getItem('ver') +
' git: ' + ' git: ' +
gitHash + gitHash +
'\')"> ' + '\')">TheDesk ' +
localStorage.getItem('ver') + localStorage.getItem('ver') +
' {' + ' {' +
gitHash.slice(0, 7) + gitHash.slice(0, 7) +
@@ -131,8 +131,12 @@ function trendTagonTip() {
spotint = null spotint = null
function spotifytips() { function spotifytips() {
if (spotint) clearInterval(spotint) if (spotint) clearInterval(spotint)
var start = 'https://spotify.thedesk.top/current-playing?code=' + localStorage.getItem('spotify-token') var start =
var at = localStorage.getItem('spotify-token') 'https://thedesk.top/now-playing?at=' +
localStorage.getItem('spotify') +
'&rt=' +
localStorage.getItem('spotify-refresh')
var at = localStorage.getItem('spotify')
if (at) { if (at) {
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
@@ -153,15 +157,8 @@ function spotifytips() {
setLog(start, 'JSON', error) setLog(start, 'JSON', error)
console.error(error) console.error(error)
}) })
.then(function(jsonRaw) { .then(function(json) {
var code = jsonRaw.token
localStorage.setItem('spotify-token', code)
var json = jsonRaw.data
var ms = json.progress_ms var ms = json.progress_ms
if(!ms) {
tips('ver')
return false
}
var last = 1000 - (ms % 1000) var last = 1000 - (ms % 1000)
var item = json.item var item = json.item
var img = item.album.images[0].url var img = item.album.images[0].url
@@ -221,8 +218,6 @@ function spotifytips() {
type: 'info', type: 'info',
title: lang.lang_spotify_acct title: lang.lang_spotify_acct
}) })
tips('ver')
return false
} }
} }
function spotStart() { function spotStart() {
@@ -293,4 +288,6 @@ function tipsToggle() {
$('#tips').toggleClass('hide') $('#tips').toggleClass('hide')
$('#tips-menu').toggleClass('hide') $('#tips-menu').toggleClass('hide')
} }
if (localStorage.getItem('tips')) {
tips(localStorage.getItem('tips'))
}

View File

@@ -1,6 +1,6 @@
//ユーザーデータ表示 //ユーザーデータ表示
//タイムライン //タイムライン
function utlShow(user, more, acct_id) { function utl(user, more, acct_id) {
if (!acct_id) { if (!acct_id) {
var acct_id = $("#his-data").attr("use-acct"); var acct_id = $("#his-data").attr("use-acct");
} }
@@ -79,26 +79,6 @@ function utlShow(user, more, acct_id) {
jQuery("time.timeago").timeago(); jQuery("time.timeago").timeago();
}); });
} }
function utlAdd() {
var acct_id = $("#his-data").attr("use-acct");
var user = $("#his-data").attr("user-id");
var add = {
domain: acct_id,
type: 'utl',
data: {
id: user,
acct: $("#his-acct").attr('fullname')
}
}
var multi = localStorage.getItem('column')
var obj = JSON.parse(multi)
localStorage.setItem('card_' + obj.length, 'true')
obj.push(add)
var json = JSON.stringify(obj)
localStorage.setItem('column', json)
parseColumn('add')
hisclose()
}
//ピン留めTL //ピン留めTL
function pinutl(before, user, acct_id) { function pinutl(before, user, acct_id) {
if (!acct_id) { if (!acct_id) {
@@ -739,3 +719,46 @@ function udAdd(acct_id, id, start) {
} }
}); });
} }
//ユーザーマッチングリスト
function showMat() {
$("#his-matching-list-contents").html(lang.lang_hisdata_taketime);
var full = $("#his-acct").attr("fullname");
var acct_id = $("#his-data").attr("use-acct");
full = full.split("@");
var start = "https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-filtered-api.cgi?" + full[1] + "+" + full[0];
fetch(start, {
method: "GET",
headers: {
"content-type": "application/json"
}
//body: JSON.stringify({})
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text);
});
}
return response.json();
})
.catch(function(error) {
todo(error);
setLog(start, "JSON", error);
console.error(error);
})
.then(function(json) {
var templete = "";
Object.keys(json).forEach(function(key) {
var user = json[key];
if (user.avatar) {
var avatar = user.avatar;
} else {
var avatar = "../../img/loading.svg";
}
templete = templete + '<div class="" style="padding-top:5px;">' + '<div style="padding:0; margin:0; width:400px; max-width:100%; display:flex; align-items:flex-end;">' + '<div style="flex-basis:40px;"><a onclick="udgEx(\'' + user.user + "'," + acct_id + ');" user="' + user.user + '" class="udg">' + '<img src="' + avatar + '" width="40" class="prof-img" user="' + user.user + '"></a></div>' + '<div style="flex-grow:3; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;user-select:auto; cursor:text;"><big>' + escapeHTML(user.screen_name) + "</big></div>" + '<div class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;user-select:auto; cursor:text;"> @' + user.user + "@" + user.host + "</div>" + "</div>" + '<div class="divider"></div>' + "</div>" + "</div>";
});
$("#his-matching-list").css("height", $("#his-float-data").height() - $("#his-basic-prof").height() - $("#his-des").height() - $("#his-plus-action").height() + "px");
$("#his-matching-list-contents").html(templete);
});
}

View File

@@ -115,7 +115,7 @@ function udg(user, acct_id) {
$("#his-data").attr("remote", "false"); $("#his-data").attr("remote", "false");
var fullname = json.acct + "@" + domain; var fullname = json.acct + "@" + domain;
} }
utlShow(json.id, "", acct_id); utl(json.id, "", acct_id);
flw(json.id, "", acct_id); flw(json.id, "", acct_id);
fer(json.id, "", acct_id); fer(json.id, "", acct_id);
var dis_name = escapeHTML(json.display_name); var dis_name = escapeHTML(json.display_name);
@@ -239,11 +239,6 @@ function udg(user, acct_id) {
$(".only-his-data").show(); $(".only-his-data").show();
} }
todc(); todc();
if(json.locked) {
$('#his-data').addClass('locked')
} else {
$('#his-data').removeClass('locked')
}
//外部データ取得(死かもしれないので) //外部データ取得(死かもしれないので)
udAdd(acct_id, user, json.url); udAdd(acct_id, user, json.url);
}); });
@@ -303,7 +298,7 @@ function misskeyUdg(user, acct_id) {
$("#his-data").attr("remote", "false"); $("#his-data").attr("remote", "false");
var fullname = json.acct + "@" + domain; var fullname = json.acct + "@" + domain;
} }
utlShow(json.id, "", acct_id); utl(json.id, "", acct_id);
flw(json.id, "", acct_id); flw(json.id, "", acct_id);
fer(json.id, "", acct_id); fer(json.id, "", acct_id);
if (json.name) { if (json.name) {
@@ -417,14 +412,9 @@ function relations(user, acct_id) {
}) })
.then(function(json) { .then(function(json) {
var json = json[0]; var json = json[0];
if(json.requested) {
//フォロリク中
$('#his-data').addClass('following')
$("#his-follow-btn-text").text(lang.lang_status_requesting)
}
if (json.following) { if (json.following) {
//自分がフォローしている //自分がフォローしている
$("#his-data").addClass("following") $("#his-data").addClass("following");
$("#his-follow-btn-text").text(lang.lang_status_unfollow); $("#his-follow-btn-text").text(lang.lang_status_unfollow);
hisList(user, acct_id); hisList(user, acct_id);
} else { } else {
@@ -548,8 +538,6 @@ function reset() {
$("#his-float-blocked").hide(); $("#his-float-blocked").hide();
$("#his-main-acct").show(); $("#his-main-acct").show();
$("#his-proof-prof").html(""); $("#his-proof-prof").html("");
$('#his-data').removeClass('locked')
$('#his-data').removeClass('requesting')
} }
$("#my-data-nav .anc-link").on("click", function() { $("#my-data-nav .anc-link").on("click", function() {
var target = $(this).attr("go"); var target = $(this).attr("go");

View File

@@ -3,10 +3,6 @@ var dir = 'file://' + __dirname
var base = dir + '/view/' var base = dir + '/view/'
// Electronのモジュール // Electronのモジュール
const electron = require('electron') const electron = require('electron')
// アプリケーションをコントロールするモジュール
const app = electron.app
// Electronの初期化完了後に実行
app.on('ready', createWindow)
const fs = require('fs') const fs = require('fs')
const language = require('./main/language.js') const language = require('./main/language.js')
const css = require('./main/css.js') const css = require('./main/css.js')
@@ -16,6 +12,10 @@ const np = require('./main/np.js')
const systemFunc = require('./main/system.js') const systemFunc = require('./main/system.js')
const Menu = electron.Menu const Menu = electron.Menu
const join = require('path').join const join = require('path').join
const windowStateKeeper = require('electron-window-state')
// アプリケーションをコントロールするモジュール
const app = electron.app
// ウィンドウを作成するモジュール // ウィンドウを作成するモジュール
const BrowserWindow = electron.BrowserWindow const BrowserWindow = electron.BrowserWindow
// メインウィンドウはGCされないようにグローバル宣言 // メインウィンドウはGCされないようにグローバル宣言
@@ -37,11 +37,39 @@ if (!gotTheLock) {
}) })
} }
// 全てのウィンドウが閉じたら終了 if (process.argv.indexOf('--dev') === -1) {
app.on('window-all-closed', function () { var packaged = true
electron.session.defaultSession.clearCache(() => {}) } else {
app.quit() var packaged = false
}) console.log(
'||\\\\\\ \n' +
'|||| \\\\\\\\ \n' +
'|||| \\\\\\\\ \n' +
'|||| Am I a \\\\\\\\ \n' +
'|||| cat? ^ ^ \\\\\\\\\\ _____ _ ____ _ \n' +
'|||| (.-.) \\\\\\\\\\ |_ _| |__ ___| _ \\ ___ ___| | __\n' +
"|||| ___> ) ||||| | | | '_ \\ / _ \\ | | |/ _ \\/ __| |/ /\n" +
'|||| < _ _) ////// | | | | | | __/ |_| | __/__ \\ < \n' +
'|||| |_||_| ///// |_| |_| |_|\\___|____/ \\___||___/_|\\_\\ \n' +
'|||| ///// \n' +
'|||| /////\n' +
'|||| /////\n' +
'||||//////'
)
console.log('Welcome!')
}
var info_path = join(app.getPath('userData'), 'window-size.json')
var lang_path = join(app.getPath('userData'), 'language')
var ha_path = join(app.getPath('userData'), 'hardwareAcceleration')
var ua_path = join(app.getPath('userData'), 'useragent')
try {
fs.readFileSync(ha_path, 'utf8')
app.disableHardwareAcceleration()
if (!packaged) console.log('disabled: Hardware Acceleration')
} catch {
if (!packaged) console.log('enabled: Hardware Acceleration')
}
function isFile(file) { function isFile(file) {
try { try {
fs.statSync(file) fs.statSync(file)
@@ -50,8 +78,16 @@ function isFile(file) {
if (err.code === 'ENOENT') return false if (err.code === 'ENOENT') return false
} }
} }
// 全てのウィンドウが閉じたら終了
app.on('window-all-closed', function() {
electron.session.defaultSession.clearCache(() => {})
app.quit()
})
function createWindow() { function createWindow() {
var lang_path = join(app.getPath('userData'), 'language') let window_size = windowStateKeeper({
defaultWidth: 1000,
defaultHeight: 750
})
if (isFile(lang_path)) { if (isFile(lang_path)) {
var lang = fs.readFileSync(lang_path, 'utf8') var lang = fs.readFileSync(lang_path, 'utf8')
} else { } else {
@@ -68,135 +104,65 @@ function createWindow() {
} else { } else {
lang = 'en' lang = 'en'
} }
fs.mkdir(app.getPath('userData'), function (err) { fs.mkdir(app.getPath('userData'), function(err) {
fs.writeFileSync(lang_path, lang) fs.writeFileSync(lang_path, lang)
}) })
} }
if (!packaged) console.log('your lang:' + app.getLocale()) if (!packaged) console.log('your lang:' + app.getLocale())
if (!packaged) console.log('launch:' + lang) if (!packaged) console.log('launch:' + lang)
//Opening
const package = fs.readFileSync(__dirname + '/package.json')
if(lang == 'ja') {
const maxims = JSON.parse(fs.readFileSync(__dirname + '/maxim.ja.json'))
var show = maxims[Math.floor(Math.random() * maxims.length)]
} else if(lang == 'ja-KS') {
//ja-KSも作れたらいいね
const maxims = JSON.parse(fs.readFileSync(__dirname + '/maxim.ja.json'))
var show = maxims[Math.floor(Math.random() * maxims.length)]
} else{
var show = 'TheDesk 2018'
}
const data = JSON.parse(package)
const version = data.version
const codename = data.codename
var openingWindow = new BrowserWindow({
width: 300,
height: 400,
transparent: false,
frame: false,
resizable: false,
})
openingWindow.loadURL(`${__dirname}/opening.html?ver=${version}&codename=${codename}&maxim=${encodeURI(show)}`)
if (process.argv.indexOf('--dev') === -1) {
var packaged = true
} else {
var packaged = false
console.log(
'||\\\\\\ \n' +
'|||| \\\\\\\\ \n' +
'|||| \\\\\\\\ \n' +
'|||| Am I a \\\\\\\\ \n' +
'|||| cat? ^ ^ \\\\\\\\\\ _____ _ ____ _ \n' +
'|||| (.-.) \\\\\\\\\\ |_ _| |__ ___| _ \\ ___ ___| | __\n' +
"|||| ___> ) ||||| | | | '_ \\ / _ \\ | | |/ _ \\/ __| |/ /\n" +
'|||| < _ _) ////// | | | | | | __/ |_| | __/__ \\ < \n' +
'|||| |_||_| ///// |_| |_| |_|\\___|____/ \\___||___/_|\\_\\ \n' +
'|||| ///// \n' +
'|||| /////\n' +
'|||| /////\n' +
'||||//////'
)
console.log('If it does not show the window, you might forget `npm run construct`.')
}
var info_path = join(app.getPath('userData'), 'window-size.json')
var max_info_path = join(app.getPath('userData'), 'max-window-size.json')
var ha_path = join(app.getPath('userData'), 'hardwareAcceleration')
var ua_path = join(app.getPath('userData'), 'useragent')
var frame_path = join(app.getPath('userData'), 'frame')
try {
fs.readFileSync(ha_path, 'utf8')
app.disableHardwareAcceleration()
if (!packaged) console.log('disabled: Hardware Acceleration')
} catch {
if (!packaged) console.log('enabled: Hardware Acceleration')
}
var window_size
try {
window_size = JSON.parse(fs.readFileSync(info_path, 'utf8'))
} catch (e) {
window_size = {
width: 1000,
height: 750,
} // デフォルトバリュー
}
var max_window_size
try {
max_window_size = JSON.parse(fs.readFileSync(max_info_path, 'utf8'))
} catch (e) {
max_window_size = {
width: 'string',
height: 'string',
x: 'string',
y: 'string',
} // デフォルトバリュー
}
try {
var frameRaw = fs.readFileSync(frame_path, 'utf8')
if (frameRaw == 'false') {
var frame = false
var frameTitle = 'hidden'
} else {
var frame = true
var frameTitle = 'default'
}
} catch {
var frame = true
}
// メイン画面の表示。ウィンドウの幅、高さを指定できる // メイン画面の表示。ウィンドウの幅、高さを指定できる
var platform = process.platform var platform = process.platform
var bit = process.arch var bit = process.arch
var arg = {
webPreferences: {
webviewTag: true,
nodeIntegration: false,
contextIsolation: true,
preload: join(__dirname, 'js', 'platform', 'preload.js'),
},
width: window_size.width,
height: window_size.height,
x: window_size.x,
y: window_size.y,
show: false,
frame: frame,
}
if (platform == 'linux') { if (platform == 'linux') {
arg.resizable = true var arg = {
arg.icon = __dirname + '/desk.png' webPreferences: {
webviewTag: true,
nodeIntegration: false,
contextIsolation: true,
preload: join(__dirname, 'js', 'platform', 'preload.js')
},
width: window_size.width,
height: window_size.height,
x: window_size.x,
y: window_size.y,
icon: __dirname + '/desk.png',
show: false
}
} else if (platform == 'win32') { } else if (platform == 'win32') {
arg.simpleFullscreen = true var arg = {
webPreferences: {
webviewTag: true,
nodeIntegration: false,
contextIsolation: true,
preload: join(__dirname, 'js', 'platform', 'preload.js')
},
width: window_size.width,
height: window_size.height,
x: window_size.x,
y: window_size.y,
simpleFullscreen: true,
show: false
}
} else if (platform == 'darwin') { } else if (platform == 'darwin') {
arg.simpleFullscreen = true var arg = {
arg.titleBarStyle = frameTitle webPreferences: {
webviewTag: true,
nodeIntegration: false,
contextIsolation: true,
preload: join(__dirname, 'js', 'platform', 'preload.js')
},
width: window_size.width,
height: window_size.height,
x: window_size.x,
y: window_size.y,
simpleFullscreen: true,
show: false
}
} }
mainWindow = new BrowserWindow(arg) mainWindow = new BrowserWindow(arg)
mainWindow.once('page-title-updated', () => { mainWindow.once('page-title-updated', () => {
openingWindow.close()
mainWindow.show() mainWindow.show()
console.log('Accessibility: ' + app.accessibilitySupportEnabled) if (window_size.isMaximized) {
if (window_size.max) {
mainWindow.maximize() mainWindow.maximize()
} }
}) })
@@ -226,77 +192,49 @@ function createWindow() {
// Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) thedesk/18.11.3 Chrome/76.0.3809.146 Electron/6.0.12 Safari/537.36 // Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) thedesk/18.11.3 Chrome/76.0.3809.146 Electron/6.0.12 Safari/537.36
const crypto = require('crypto') const crypto = require('crypto')
const N = 100 const N = 100
var ua = 'Mastodon client: ' + crypto.randomBytes(N).toString('base64').substring(0, N) var ua =
'Mastodon client: ' +
crypto
.randomBytes(N)
.toString('base64')
.substring(0, N)
} }
mainWindow.loadURL(base + lang + '/index.html' + plus, { userAgent: ua }) mainWindow.loadURL(base + lang + '/index.html' + plus, { userAgent: ua })
if (!window_size.x && !window_size.y) { window_size.manage(mainWindow)
mainWindow.center()
}
// ウィンドウが閉じられたらアプリも終了 // ウィンドウが閉じられたらアプリも終了
mainWindow.on('closed', function () { mainWindow.on('closed', function() {
electron.ipcMain.removeAllListeners() electron.ipcMain.removeAllListeners()
mainWindow = null mainWindow = null
}) })
closeArg = false closeArg = false
mainWindow.on('close', function (e, arg) { mainWindow.on('close', function(e, arg) {
writePos(mainWindow)
if (!closeArg) { if (!closeArg) {
e.preventDefault() e.preventDefault()
} }
const promise = new Promise(function (resolve) { const promise = new Promise(function(resolve) {
mainWindow.webContents.send('asReadEnd', '') mainWindow.webContents.send('asReadEnd', '')
setTimeout(function () { setTimeout(function() {
resolve() resolve()
}, 3000) }, 3000)
}) })
promise.then(function (response) { promise.then(function(response) {
closeArg = true closeArg = true
mainWindow.close() mainWindow.close()
}) })
}) })
electron.ipcMain.on('sendMarkersComplete', function (e, arg) { electron.ipcMain.on('sendMarkersComplete', function(e, arg) {
closeArg = true closeArg = true
mainWindow.close() mainWindow.close()
}) })
function writePos(mainWindow) { mainWindow.on('minimize', function() {
if (
max_window_size.width == mainWindow.getBounds().width &&
max_window_size.height == mainWindow.getBounds().height &&
max_window_size.x == mainWindow.getBounds().x &&
max_window_size.y == mainWindow.getBounds().y
) {
var size = {
width: mainWindow.getBounds().width,
height: mainWindow.getBounds().height,
x: mainWindow.getBounds().x,
y: mainWindow.getBounds().y,
max: true,
}
} else {
var size = {
width: mainWindow.getBounds().width,
height: mainWindow.getBounds().height,
x: mainWindow.getBounds().x,
y: mainWindow.getBounds().y,
}
}
fs.writeFileSync(info_path, JSON.stringify(size))
}
mainWindow.on('maximize', function () {
writePos(mainWindow)
fs.writeFileSync(max_info_path, JSON.stringify(mainWindow.getBounds()))
})
mainWindow.on('minimize', function () {
writePos(mainWindow)
mainWindow.webContents.send('asRead', '') mainWindow.webContents.send('asRead', '')
}) })
var platform = process.platform var platform = process.platform
var bit = process.arch var bit = process.arch
Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang, mainWindow, packaged, dir, dirname, frame))) Menu.setApplicationMenu(
if (!frame) { Menu.buildFromTemplate(language.template(lang, mainWindow, packaged, dir, dirname))
mainWindow.setMenu(null) )
}
//CSS //CSS
css.css(mainWindow) css.css(mainWindow)
//アップデータとダウンロード //アップデータとダウンロード
@@ -307,7 +245,7 @@ function createWindow() {
np.TheDeskNowPlaying(mainWindow) np.TheDeskNowPlaying(mainWindow)
//その他system //その他system
systemFunc.system(mainWindow, dir, lang, dirname) systemFunc.system(mainWindow, dir, lang, dirname)
setInterval(function () { setInterval(function() {
mouseTrack(mainWindow) mouseTrack(mainWindow)
}, 1000) }, 1000)
} }
@@ -333,5 +271,10 @@ function mouseTrack(mainWindow) {
x = xNow x = xNow
y = yNow y = yNow
} }
// Electronの初期化完了後に実行
app.on('ready', createWindow)
var onError = function(err, response) {
console.error(err, response)
}
app.setAsDefaultProtocolClient('thedesk') app.setAsDefaultProtocolClient('thedesk')

View File

@@ -1,137 +1,126 @@
function dl(mainWindow, lang_path, base, dirname) { function dl(mainWindow, lang_path, base, dirname) {
const electron = require('electron') const electron = require("electron");
const shell = electron.shell const shell = electron.shell;
const fs = require('fs') const fs = require("fs");
const { download } = require('electron-dl') const { download } = require('electron-dl');
const BrowserWindow = electron.BrowserWindow const BrowserWindow = electron.BrowserWindow;
const dialog = electron.dialog const dialog = electron.dialog;
var updatewin = null var updatewin = null;
var ipc = electron.ipcMain var ipc = electron.ipcMain;
const app = electron.app const app = electron.app;
const join = require('path').join const join = require('path').join;
ipc.on('update', function(e, x, y) { ipc.on('update', function (e, x, y) {
var platform = process.platform
var bit = process.arch var platform = process.platform;
if (platform != 'others') { var bit = process.arch;
if (platform != "others") {
updatewin = new BrowserWindow({ updatewin = new BrowserWindow({
webPreferences: { webPreferences: {
webviewTag: false, webviewTag: false,
nodeIntegration: false, nodeIntegration: false,
contextIsolation: true, contextIsolation: true,
preload: join(dirname, 'js', 'platform', 'preload.js') preload: join(dirname,"js", "platform", "preload.js")
}, },
width: 600, width: 600,
height: 400, height: 400,
transparent: false, // ウィンドウの背景を透過 "transparent": false, // ウィンドウの背景を透過
frame: false, // 枠の無いウィンドウ "frame": false, // 枠の無いウィンドウ
resizable: false, "resizable": false
show: false
}) })
var lang = fs.readFileSync(lang_path, 'utf8') var lang = fs.readFileSync(lang_path, 'utf8');
updatewin.loadURL(base + lang + '/update.html') updatewin.loadURL(base + lang + '/update.html');
updatewin.webContents.once('dom-ready', () => { return "true"
updatewin.show()
})
return 'true'
} else { } else {
return false return false;
} }
}) })
//アプデDL //アプデDL
ipc.on('download-btn', async (e, args) => { ipc.on('download-btn', (e, args) => {
function dl(url, file, dir, e) { function dl(url, file, dir, e) {
e.sender.webContents.send('mess', 'Start...')
e.sender.webContents.send('mess', "ダウンロードを開始します。");
const opts = { const opts = {
directory: dir, directory: dir,
filename: file,
openFolderWhenDone: true, openFolderWhenDone: true,
onProgress: function(event) { onProgress: function (event) {
e.sender.webContents.send('prog', [event, args[2]]) e.sender.webContents.send('prog', event);
}, },
saveAs: false saveAs: false
} };
download(updatewin, url, opts) download(updatewin,
url, opts)
.then(dl => { .then(dl => {
e.sender.webContents.send('mess', 'ダウンロードが完了しました。') e.sender.webContents.send('mess', "ダウンロードが完了しました。");
app.quit() app.quit();
}) })
.catch(console.error) .catch(console.error);
} }
var platform = process.platform var platform = process.platform;
var bit = process.arch var bit = process.arch;
var options = { dialog.showSaveDialog(null, {
title: 'Save', title: 'Save',
defaultPath: app.getPath('home') + '/' + args[1] defaultPath: app.getPath('home') + "/" + args[1]
} }, (savedFiles) => {
const file = await dialog.showSaveDialog(null, options) console.log(savedFiles);
const savedFiles = file.filePath if (!savedFiles) {
console.log(savedFiles) return false;
if (!savedFiles) { }
return false if (platform == "win32") {
} var m = savedFiles.match(/(.+)\\(.+)$/);
if (platform == 'win32') { } else {
var m = savedFiles.match(/(.+)\\(.+)$/) var m = savedFiles.match(/(.+)\/(.+)$/);
} else { }
var m = savedFiles.match(/(.+)\/(.+)$/) //console.log(m);
} if (isExistFile(savedFiles)) {
//console.log(m); fs.unlinkSync(savedFiles);
if (isExistFile(savedFiles)) { }
fs.unlinkSync(savedFiles) dl(args[0], args[1], m[1], e);
} });
console.log(m) });
dl(args[0], m[2], m[1], e)
})
function isExistFile(file) { function isExistFile(file) {
try { try {
fs.statSync(file) fs.statSync(file);
return true return true
} catch (err) { } catch (err) {
if (err.code === 'ENOENT') return false if (err.code === 'ENOENT') return false
} }
} }
ipc.on('general-dl', (event, args) => { ipc.on('general-dl', (event, args) => {
var name = ''
var platform = process.platform var name = "";
var bit = process.arch var platform = process.platform;
const filename = args[0].match(/https:\/\/.+\/(.+\..+)$/) var bit = process.arch;
if (args[1] == '') { if (args[1] == "") {
if (platform == 'win32') { if (platform == "win32") {
var dir = app.getPath('home') + '\\Pictures\\TheDesk' var dir = app.getPath('home') + "\\Pictures\\TheDesk";
} else if (platform == 'linux' || platform == 'darwin') { } else if (platform == "linux" || platform == "darwin") {
var dir = app.getPath('home') + '/Pictures/TheDesk' var dir = app.getPath('home') + "/Pictures/TheDesk";
} }
} else { } else {
var dir = args[1] var dir = args[1];
} }
const opts = { const opts = {
directory: dir, directory: dir,
filename: name, filename: name,
openFolderWhenDone: false, openFolderWhenDone: false,
onProgress: function(e) { onProgress: function (e) {
event.sender.webContents.send('general-dl-prog', e) event.sender.webContents.send('general-dl-prog', e);
}, },
saveAs: false saveAs: false
} };
download(BrowserWindow.getFocusedWindow(), args[0], opts) download(BrowserWindow.getFocusedWindow(),
args[0], opts)
.then(dl => { .then(dl => {
if(filename[1]) { event.sender.webContents.send('general-dl-message', dir);
if (platform == 'win32') {
var name = dir + '\\' + filename[1]
} else if (platform == 'linux' || platform == 'darwin') {
var name = dir + '/' + filename[1]
}
} else {
var name = dir
}
event.sender.webContents.send('general-dl-message', name)
}) })
.catch(console.error) .catch(console.error);
}) });
ipc.on('openFinder', (e, folder) => { ipc.on('open-finder', (e, folder) => {
console.log(folder)
shell.showItemInFolder(folder) shell.showItemInFolder(folder)
}) });
} }
exports.dl = dl exports.dl = dl;

View File

@@ -6,33 +6,38 @@ function img(mainWindow, dir) {
var ipc = electron.ipcMain var ipc = electron.ipcMain
const BrowserWindow = electron.BrowserWindow const BrowserWindow = electron.BrowserWindow
ipc.on('file-select', (e, args) => { ipc.on('file-select', (e, args) => {
let fileNames = dialog.showOpenDialogSync(mainWindow, { dialog.showOpenDialog(
properties: ['openFile', 'multiSelections'], null,
title: '添付ファイルを選択', {
defaultPath: '.', properties: ['openFile', 'multiSelections'],
filters: [ title: '添付ファイルを選択',
{ defaultPath: '.',
name: 'メディアファイル', filters: [
extensions: ['jpg', 'png', 'gif', 'bmp', 'jpeg', 'mp4', 'webm'], {
}, name: 'メディアファイル',
{ name: '画像', extensions: ['jpg', 'png', 'gif', 'bmp', 'jpeg'] }, extensions: ['jpg', 'png', 'gif', 'bmp', 'jpeg', 'mp4', 'webm']
{ name: '動画', extensions: ['mp4', 'webm'] }, },
{ name: '全てのファイル', extensions: ['*'] }, { name: '画像', extensions: ['jpg', 'png', 'gif', 'bmp', 'jpeg'] },
], { name: '動画', extensions: ['mp4', 'webm'] },
}) { name: '全てのファイル', extensions: ['*'] }
if (!fileNames) { ]
return false },
} fileNames => {
for (var i = 0; i < fileNames.length; i++) { if (!fileNames) {
var path = fileNames[i] return false
var bin = fs.readFileSync(path, 'base64') }
e.sender.webContents.send('resizeJudgement', [bin, 'new']) for (var i = 0; i < fileNames.length; i++) {
} var path = fileNames[i]
var bin = fs.readFileSync(path, 'base64')
e.sender.webContents.send('resizeJudgement', [bin, 'new'])
}
}
)
}) })
ipc.on('bmp-image', (e, args) => { ipc.on('bmp-image', (e, args) => {
Jimp.read(args[0], function (err, lenna) { Jimp.read(args[0], function(err, lenna) {
if (err) throw err if (err) throw err
lenna.getBase64(Jimp.MIME_PNG, function (err, src) { lenna.getBase64(Jimp.MIME_PNG, function(err, src) {
e.sender.webContents.send('bmp-img-comp', [src, args[1]]) e.sender.webContents.send('bmp-img-comp', [src, args[1]])
}) })
}) })
@@ -46,9 +51,9 @@ function img(mainWindow, dir) {
} }
var b64 = args[0].replace(/^data:\w+\/\w+;base64,/, '') var b64 = args[0].replace(/^data:\w+\/\w+;base64,/, '')
var decodedFile = new Buffer(b64, 'base64') var decodedFile = new Buffer(b64, 'base64')
Jimp.read(decodedFile, function (err, lenna) { Jimp.read(decodedFile, function(err, lenna) {
if (err) throw err if (err) throw err
lenna.scaleToFit(args[1], args[1]).getBase64(Jimp[use], function (err, src) { lenna.scaleToFit(args[1], args[1]).getBase64(Jimp[use], function(err, src) {
e.sender.webContents.send('bmp-img-comp', [src, args[1]]) e.sender.webContents.send('bmp-img-comp', [src, args[1]])
}) })
}) })
@@ -58,24 +63,24 @@ function img(mainWindow, dir) {
var b64 = args[0].replace(/^data:\w+\/\w+;base64,/, '') var b64 = args[0].replace(/^data:\w+\/\w+;base64,/, '')
var decodedFile = new Buffer(b64, 'base64') var decodedFile = new Buffer(b64, 'base64')
console.log(text) console.log(text)
Jimp.read(decodedFile, function (err, image) { Jimp.read(decodedFile, function(err, image) {
if (err) throw err if (err) throw err
Jimp.loadFont(Jimp.FONT_SANS_16_BLACK).then((font) => { Jimp.loadFont(Jimp.FONT_SANS_16_BLACK).then(font => {
var evWidth = Jimp.measureText(font, text) var evWidth = Jimp.measureText(font, text)
var width = image.bitmap.width var width = image.bitmap.width
var height = image.bitmap.height var height = image.bitmap.height
var left = width - evWidth - 10 var left = width - evWidth - 10
var top = height - 30 var top = height - 30
var color = Jimp.intToRGBA(image.getPixelColor(left, top)) var color = Jimp.intToRGBA(image.getPixelColor(left, top))
console.log(left, top, color) console.log(left, top, color)
var ave = (color.r + color.g + color.b) / 3 var ave = (color.r + color.g + color.b) / 3
if (ave > 128) { if (ave > 128) {
image.print(font, left, top, args[1]).getBase64(Jimp.MIME_PNG, function (err, src) { image.print(font, left, top, args[1]).getBase64(Jimp.MIME_PNG, function(err, src) {
e.sender.webContents.send('bmp-img-comp', [src, args[1], true]) e.sender.webContents.send('bmp-img-comp', [src, args[1], true])
}) })
} else { } else {
Jimp.loadFont(Jimp.FONT_SANS_16_WHITE).then((font) => { Jimp.loadFont(Jimp.FONT_SANS_16_WHITE).then(font => {
image.print(font, left, top, args[1]).getBase64(Jimp.MIME_PNG, function (err, src) { image.print(font, left, top, args[1]).getBase64(Jimp.MIME_PNG, function(err, src) {
e.sender.webContents.send('bmp-img-comp', [src, args[1], true]) e.sender.webContents.send('bmp-img-comp', [src, args[1], true])
}) })
}) })

View File

@@ -1,19 +1,12 @@
// Create the Application's main menu // Create the Application's main menu
function templete(lang, mainWindow, packaged, dir, dirname, frame) { function templete(lang, mainWindow, packaged, dir, dirname) {
//フレーム
if(lang !="ja" && lang != "en"){ if(lang !="ja" && lang != "en"){
lang = "en" lang = "en"
} }
const electron = require("electron"); const electron = require("electron");
const ipc = electron.ipcMain;
const app = electron.app; const app = electron.app;
const BrowserWindow = electron.BrowserWindow; const BrowserWindow = electron.BrowserWindow;
const join = require('path').join; const join = require('path').join;
ipc.on("frameCheck", function(e, arg) {
if(!frame) {
e.sender.webContents.send("frame", "");
}
});
const dict = { const dict = {
"application": { "application": {
"ja": "アプリケーション", "ja": "アプリケーション",

View File

@@ -1,36 +1,36 @@
function np(mainWindow) { function np(mainWindow) {
const electron = require('electron') const electron = require("electron");
const ipc = electron.ipcMain const join = require('path').join;
ipc.on('itunes', async (e, args) => { const app = electron.app;
console.log('Access') const fs = require("fs");
if (args[0] == 'set') { var ipc = electron.ipcMain;
} else { ipc.on('itunes', async (e, args) => {
var platform = process.platform //Verified on Windows
var bit = process.arch console.log("Access");
if (platform == 'darwin') { if (args[0] == "set") {
try {
const nowplaying = require('itunes-nowplaying-mac')
let value = await nowplaying()
try {
const artwork = await nowplaying.getThumbnailBuffer(value.databaseID)
if(artwork) {
const base64 = artwork.toString('base64')
value.artwork = base64
e.sender.webContents.send('itunes-np', value)
}
} catch (error) {
console.error(error)
e.sender.webContents.send('itunes-np', value)
}
} catch (error) { } else {
console.error(error) var platform = process.platform;
e.sender.webContents.send('itunes-np', error) var bit = process.arch;
} if (platform == "darwin") {
} else { try {
} const nowplaying = require("itunes-nowplaying-mac");
} let value = await nowplaying();
})
const artwork = await nowplaying.getThumbnailBuffer(value.databaseID);
const base64 = artwork.toString('base64');
value.artwork = base64
e.sender.webContents.send('itunes-np', value);
} catch (error) {
// エラーを返す
console.error(error);
e.sender.webContents.send('itunes-np', error);
}
} else {
}
}
});
} }
exports.TheDeskNowPlaying = np exports.TheDeskNowPlaying = np;

View File

@@ -12,7 +12,6 @@ function system(mainWindow, dir, lang, dirname) {
var ua_path = join(app.getPath('userData'), 'useragent') var ua_path = join(app.getPath('userData'), 'useragent')
var lang_path = join(app.getPath('userData'), 'language') var lang_path = join(app.getPath('userData'), 'language')
var log_dir_path = join(app.getPath('userData'), 'logs') var log_dir_path = join(app.getPath('userData'), 'logs')
var frame_path = join(app.getPath('userData'), 'frame')
//ログ //ログ
var today = new Date() var today = new Date()
//今日のやつ //今日のやつ
@@ -29,104 +28,115 @@ function system(mainWindow, dir, lang, dirname) {
const os = require('os') const os = require('os')
const language = require('../main/language.js') const language = require('../main/language.js')
//プラットフォーム //プラットフォーム
ipc.on('getPlatform', function (e, arg) { ipc.on('getPlatform', function(e, arg) {
try { try {
var gitHash = fs.readFileSync('git', 'utf8') var gitHash = fs.readFileSync('git', 'utf8')
} catch { } catch {
var gitHash = null var gitHash = null
} }
e.sender.webContents.send('platform', [process.platform, process.arch, process.version, process.versions.chrome, process.versions.electron, gitHash]) e.sender.webContents.send('platform', [
process.platform,
process.arch,
process.version,
process.versions.chrome,
process.versions.electron,
gitHash
])
}) })
//言語 //言語
ipc.on('lang', function (e, arg) { ipc.on('lang', function(e, arg) {
console.log('set:' + arg) console.log('set:' + arg)
fs.writeFileSync(lang_path, arg) fs.writeFileSync(lang_path, arg)
e.sender.webContents.send('langres', arg) e.sender.webContents.send('langres', arg)
}) })
//エクスポートのダイアログ //エクスポートのダイアログ
ipc.on('exportSettings', function (e, args) { ipc.on('exportSettings', function(e, args) {
let savedFiles = dialog.showSaveDialogSync(mainWindow, { dialog.showSaveDialog(
title: 'Export', mainWindow,
properties: ['openFile', 'createDirectory'], {
defaultPath: 'export.thedeskconfig.json5', title: 'Export',
}) properties: ['openFile', 'createDirectory'],
if (!savedFiles) { defaultPath: 'export.thedeskconfig.json5'
return false },
} savedFiles => {
e.sender.webContents.send('exportSettingsFile', savedFiles) if (!savedFiles) {
return false
}
e.sender.webContents.send('exportSettingsFile', savedFiles)
}
)
}) })
//インポートのダイアログ //インポートのダイアログ
ipc.on('importSettings', function (e, args) { ipc.on('importSettings', function(e, args) {
let fileNames = dialog.showOpenDialogSync(mainWindow, { dialog.showOpenDialog(
title: 'Import', mainWindow,
properties: ['openFile'], {
filters: [{ name: 'TheDesk Config', extensions: ['thedeskconfig', 'thedeskconfigv2', 'json5'] }], title: 'Import',
}) properties: ['openFile'],
console.log('imported from: ', fileNames) filters: [
if (!fileNames) { { name: 'TheDesk Config', extensions: ['thedeskconfig', 'thedeskconfigv2', 'json5'] }
return false ]
} },
e.sender.webContents.send('config', JSON5.parse(fs.readFileSync(fileNames[0], 'utf8'))) fileNames => {
console.log('imported from: ', fileNames)
if (!fileNames) {
return false
}
e.sender.webContents.send('config', JSON5.parse(fs.readFileSync(fileNames[0], 'utf8')))
}
)
}) })
//保存フォルダのダイアログ //保存フォルダのダイアログ
ipc.on('savefolder', function (e, args) { ipc.on('savefolder', function(e, args) {
let fileNames = dialog.showOpenDialogSync( dialog.showOpenDialog(
mainWindow, mainWindow,
{ {
title: 'Save folder', title: 'Save folder',
properties: ['openDirectory'], properties: ['openDirectory']
},
fileNames => {
e.sender.webContents.send('savefolder', fileNames[0])
} }
) )
e.sender.webContents.send('savefolder', fileNames[0])
}) })
//カスタムサウンドのダイアログ //カスタムサウンドのダイアログ
ipc.on('customSound', function (e, arg) { ipc.on('customSound', function(e, arg) {
let fileNames = dialog.showOpenDialogSync( dialog.showOpenDialog(
mainWindow, mainWindow,
{ {
title: 'Custom sound', title: 'Custom sound',
properties: ['openFile'], properties: ['openFile'],
filters: [ filters: [
{ name: 'Audio', extensions: ['mp3', 'aac', 'wav', 'flac', 'm4a'] }, { name: 'Audio', extensions: ['mp3', 'aac', 'wav', 'flac', 'm4a'] },
{ name: 'All', extensions: ['*'] }, { name: 'All', extensions: ['*'] }
], ]
},
fileNames => {
e.sender.webContents.send('customSoundRender', [arg, fileNames[0]])
} }
) )
e.sender.webContents.send('customSoundRender', [arg, fileNames[0]])
}) })
//ハードウェアアクセラレーションの無効化 //ハードウェアアクセラレーションの無効化
ipc.on('ha', function (e, arg) { ipc.on('ha', function(e, arg) {
if (arg == 'true') { if (arg == 'true') {
fs.writeFileSync(ha_path, arg) fs.writeFileSync(ha_path, arg)
} else { } else {
fs.unlink(ha_path, function (err) {}) fs.unlink(ha_path, function(err) {})
} }
app.relaunch() app.relaunch()
app.exit() app.exit()
}) })
//ユーザーエージェント ipc.on('ua', function(e, arg) {
ipc.on('ua', function (e, arg) {
if (arg == '') { if (arg == '') {
fs.unlink(ua_path, function (err) {}) fs.unlink(ua_path, function(err) {})
} else { } else {
fs.writeFileSync(ua_path, arg) fs.writeFileSync(ua_path, arg)
} }
app.relaunch() app.relaunch()
app.exit() app.exit()
}) })
//フレームのありなし
ipc.on('frameSet', function (e, arg) {
fs.writeFileSync(frame_path, arg)
app.relaunch()
app.exit()
})
//スクリーンリーダー
ipc.on('acsCheck', function (e, arg) {
if (app.accessibilitySupportEnabled) {
mainWindow.webContents.send('accessibility', 'true')
}
})
ipc.on('quit', (e, args) => { ipc.on('quit', (e, args) => {
app.quit() app.quit()
}) })
@@ -140,18 +150,18 @@ function system(mainWindow, dir, lang, dirname) {
webviewTag: false, webviewTag: false,
nodeIntegration: false, nodeIntegration: false,
contextIsolation: true, contextIsolation: true,
preload: join(dirname, 'js', 'platform', 'preload.js'), preload: join(dirname, 'js', 'platform', 'preload.js')
}, },
width: 300, width: 300,
height: 500, height: 500,
transparent: false, // ウィンドウの背景を透過 transparent: false, // ウィンドウの背景を透過
frame: false, // 枠の無いウィンドウ frame: false, // 枠の無いウィンドウ
resizable: false, resizable: false
}) })
window.loadURL(dir + '/about.html?ver=' + ver) window.loadURL(dir + '/about.html?ver=' + ver)
return 'true' return 'true'
} }
ipc.on('nano', function (e, x, y) { ipc.on('nano', function(e, x, y) {
var nano_info_path = join(app.getPath('userData'), 'nano-window-position.json') var nano_info_path = join(app.getPath('userData'), 'nano-window-position.json')
var window_pos var window_pos
try { try {
@@ -164,19 +174,19 @@ function system(mainWindow, dir, lang, dirname) {
webviewTag: false, webviewTag: false,
nodeIntegration: false, nodeIntegration: false,
contextIsolation: true, contextIsolation: true,
preload: join(dirname, 'js', 'platform', 'preload.js'), preload: join(dirname, 'js', 'platform', 'preload.js')
}, },
width: 350, width: 350,
height: 140, height: 140,
transparent: false, // ウィンドウの背景を透過 transparent: false, // ウィンドウの背景を透過
frame: false, // 枠の無いウィンドウ frame: false, // 枠の無いウィンドウ
resizable: false, resizable: false
}) })
nanowindow.loadURL(dir + '/nano.html') nanowindow.loadURL(dir + '/nano.html')
nanowindow.setAlwaysOnTop(true) nanowindow.setAlwaysOnTop(true)
//nanowindow.toggleDevTools() //nanowindow.toggleDevTools()
nanowindow.setPosition(window_pos[0], window_pos[1]) nanowindow.setPosition(window_pos[0], window_pos[1])
nanowindow.on('close', function () { nanowindow.on('close', function() {
fs.writeFileSync(nano_info_path, JSON.stringify(nanowindow.getPosition())) fs.writeFileSync(nano_info_path, JSON.stringify(nanowindow.getPosition()))
}) })
return true return true
@@ -214,7 +224,7 @@ function system(mainWindow, dir, lang, dirname) {
num_b = -1 num_b = -1
} }
data = data.sort(function (a, b) { data = data.sort(function(a, b) {
var x = a[key] var x = a[key]
var y = b[key] var y = b[key]
if (x > y) return num_a if (x > y) return num_a
@@ -236,10 +246,11 @@ function system(mainWindow, dir, lang, dirname) {
fn(data) // ソート後の配列を返す fn(data) // ソート後の配列を返す
} }
ipc.on('fonts', (e, arg) => { ipc.on('fonts', (e, arg) => {
var SystemFonts = require('system-font-families').default const fm = require('font-manager')
var fm = new SystemFonts() var fonts = fm.getAvailableFontsSync()
const fontList = fm.getFontsSync() object_array_sort(fonts, 'family', 'asc', function(fonts_sorted) {
e.sender.webContents.send('font-list', fontList) e.sender.webContents.send('font-list', fonts_sorted)
})
}) })
//コピー //コピー
ipc.on('copy', (e, arg) => { ipc.on('copy', (e, arg) => {
@@ -250,7 +261,7 @@ function system(mainWindow, dir, lang, dirname) {
var today = new Date() var today = new Date()
var todayStr = today.getFullYear() + '' + (today.getMonth() + 1) + '' + today.getDate() var todayStr = today.getFullYear() + '' + (today.getMonth() + 1) + '' + today.getDate()
var log_path = join(log_dir_path, todayStr + '.log') var log_path = join(log_dir_path, todayStr + '.log')
fs.appendFile(log_path, '\n' + arg, function (err) { fs.appendFile(log_path, '\n' + arg, function(err) {
if (err) { if (err) {
throw err throw err
} }
@@ -261,9 +272,9 @@ function system(mainWindow, dir, lang, dirname) {
var todayLog = '' var todayLog = ''
var yestLog = '' var yestLog = ''
var yest2Log = '' var yest2Log = ''
fs.readdir(log_dir_path, function (err, files) { fs.readdir(log_dir_path, function(err, files) {
if (err) throw err if (err) throw err
files.filter(function (file) { files.filter(function(file) {
if (file == todayStr) { if (file == todayStr) {
todayLog = fs.readFileSync(join(log_dir_path, file), 'utf8') todayLog = fs.readFileSync(join(log_dir_path, file), 'utf8')
} }
@@ -279,9 +290,8 @@ function system(mainWindow, dir, lang, dirname) {
e.sender.webContents.send('logData', logs) e.sender.webContents.send('logData', logs)
}) })
}) })
//起動時ログディレクトリ存在確認と作成、古ログ削除 //起動時ログディレクトリ存在確認と作成、古ログ削除
fs.access(log_dir_path, fs.constants.R_OK | fs.constants.W_OK, (error) => { fs.access(log_dir_path, fs.constants.R_OK | fs.constants.W_OK, error => {
if (error) { if (error) {
if (error.code === 'ENOENT') { if (error.code === 'ENOENT') {
fs.mkdirSync(log_dir_path) fs.mkdirSync(log_dir_path)
@@ -289,9 +299,9 @@ function system(mainWindow, dir, lang, dirname) {
return return
} }
} else { } else {
fs.readdir(log_dir_path, function (err, files) { fs.readdir(log_dir_path, function(err, files) {
if (err) throw err if (err) throw err
files.filter(function (file) { files.filter(function(file) {
if (file != todayStr && file != yestStr && file != yest2Str) { if (file != todayStr && file != yestStr && file != yest2Str) {
fs.unlinkSync(join(log_dir_path, file)) fs.unlinkSync(join(log_dir_path, file))
} }
@@ -299,5 +309,57 @@ function system(mainWindow, dir, lang, dirname) {
}) })
} }
}) })
var $ = require('nodobjc')
$.framework('Foundation')
$.framework('AppKit')
var GetSongs = $.NSObject.extend('Delegate')
GetSongs.addMethod('getMySongs:', 'v@:@', function(self, _cmd, notif) {
var userInfo = notif('userInfo')
var keys = userInfo('keyEnumerator')
var key
var song = {}
while ((key = keys('nextObject'))) {
var value = userInfo('objectForKey', key)
song[key.toString()] = value.toString()
}
console.log(song)
})
GetSongs.register()
var gs = GetSongs('alloc')('init')
var nc = $.NSDistributedNotificationCenter('defaultCenter')
var selector = $.NSSelectorFromString($('getMySongs:'))
var notification = $('com.apple.iTunes.playerInfo')
nc('addObserver', gs, 'selector', 'getMySongs:', 'name', notification, 'object', null)
var apps = $.NSApplication('sharedApplication')
function runLoop() {
var pool = $.NSAutoreleasePool('alloc')('init')
try {
apps(
'nextEventMatchingMask',
$.NSAnyEventMask.toString(),
'untilDate',
$.NSDate('distantFuture'),
'inMode',
$.NSDefaultRunLoopMode,
'dequeue',
1
)
} catch (e) {
console.error('run loop error', e.message)
}
pool('drain')
setTimeout(runLoop, 1000)
//process.nextTick(runLoop);
}
runLoop()
} }
exports.system = system exports.system = system

View File

@@ -1,52 +0,0 @@
{
"name": "TheDesk",
"short_name": "TheDesk",
"theme_color": "#212121",
"background_color": "#212121",
"display": "standalone",
"Scope": "/",
"start_url": "/",
"icons": [
{
"src": "img/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "img/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "img/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "img/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "img/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "img/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "img/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "img/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"splash_pages": null
}

View File

@@ -1,54 +0,0 @@
[
"TheDeskは自称ステイホームの必須アイテム",
"あと数秒でPCのファンが全力で回り始める",
"カラムの数だけ夢があるがネットワークは逼迫する",
"朝起きたらストリーミングが止まっていた…",
"誰も使ってない機能1: 未読管理",
"誰も使ってない機能2: スタンプ機能",
"誰も使ってない機能3: コードセットアップをオフにしたログイン",
"誰も使ってない機能4: TheDesk上でのプロフィール更新",
"誰も使ってない機能5: フォローレコメンデーション",
"TheDeskは重い(ダブルミーニング)",
"今日も生茶が美味しい(4ケース96本の在庫)",
"jQueryは死すべき(流れ弾)",
"なんでTheDeskのバージョン19は無いの",
"デレマス要素なくない?",
"今日も「TheDesk」でエゴサが捗る",
"開発者はTheDeskのヘビーユーザではない",
"アイコンは猫だが開発者は犬派",
"#TheDeskのアイコンは猫虐待",
"上のアニメーションからしてこの猫は完全に仮想化されている",
"TheDeskの歴史は2016年まで遡ることができる",
"WIP: Croudia, ネコ型SNS",
"リリース間隔は平均1桁日(昔1日に6回アプデを提供したせい)",
"node_modulesをignoreせずに上げてしまったせいでCode Frequencyが破壊された",
"TheDesk XSS Hunt をしなければならない()",
"毎月出る支援お願いしますダイアログで月初めを知る人 #いろいろな人",
"Integrated TLは目玉機能なので消せないが消せるものなら消したいくらい内部構造がヤバい",
"「アンケート」か「投票」か。「時間指定投稿」か「予約投稿」か",
"実装当初は言語を「関西弁」にするとお問い合わせフォームまで関西弁だった",
"Ctrl+Kでメニューが出ます",
"検索ボックスは入力後Enterで確定できる",
"開発者の推しカラーテーマはPolar Night",
"TheDeskのユーザーエージェントは毎回起動時に変わります。TheDeskと確定させることはできません",
"AppData/Roaming/TheDesk(Windows)の中にcutsom.cssを入れるとカスタムCSSを導入できます",
"環境設定の「ウィンドウフレーム」は「オフ」がおすすめ",
"各トゥートの右上の時刻表示を押すとトゥートのリンクがコピーされます",
"各トゥートの左下の公開範囲のアイコンを押すとそのトゥートの本文がコピーされますが挙動にバグがあります",
"TheDeskをMisskeyクライアントだと思って使ってはいけません",
"この迷文を追加したい場合はapp/maxim.ja.jsonを編集",
"本当はTheDesk 21.0.0(Mayu)専用のアイコンを用意していた",
"TheDesk 20.x.xと21.x.xではアイコンがちょっと違う",
"三大見てはいけないもの: TheDeskのコード、TheDeskのDevTool console、あと一つは",
"この画面がずっと出続けているのは多分yarn construct忘れてる",
"たまにここに何も出ないことがあるけど、なんでかはわからない",
"Kawaii->Mayu(今ここ)->Koume->Chieri->Anastasia->Aiko",
"言語設定を日本語以外にするとこの表示はどうなると思う?",
"今日も使ってくれてありがとう。利用者カウンターがキリ番ならご報告を",
"Ctrl+Eで通知の赤くなって「Fav: 1」とかなってるのをリセットできる",
"このアプリケーションの正式な名称は小文字thedeskだけど、内部でしか使われてない",
"N押すとトゥートのボックスが出て、すぐ打ち込める。",
"Xを押すとトゥートのボックスは出るけど、打ち込めない。その代わりもう一度押すと消せる。",
"トゥートした後ボックスを閉じるとかそのままにしておくとかは、設定で変えられます。",
"OpenStickerへの登録データ募集中"
]

View File

@@ -128,7 +128,7 @@
</select> </select>
</div> </div>
<button onclick="set()" id="setting">Setting</button> <button onclick="set()" id="setting">Setting</button>
<textarea id="textarea" style="width:55%; background-color:transparent" placeholder="Post something new"></textarea> <textarea id="textarea" style="width:55%; background-color:transparent" placeholder="Post someyhing new"></textarea>
<button class="btn" onclick="post()">Post</button> <button class="btn" onclick="post()">Post</button>
<button onclick="window.close()">x</button><br /> <button onclick="window.close()">x</button><br />
<div id="timeline_nano">Click "settings" to show TL</div> <div id="timeline_nano">Click "settings" to show TL</div>

View File

@@ -1,5 +0,0 @@
[[redirects]]
from = "/"
to = "/app"
status = 301
force = true

View File

@@ -1,96 +0,0 @@
<!DOCTYPE html>
<html lang="ja">
<head>
<title>TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport" />
<meta charset="utf-8" />
<style>
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url('./fonts/OpenSans-Light.ttf') format('truetype');
}
body {
font-family: 'Open Sans';
-webkit-app-region: drag;
cursor: move;
padding: 5px;
padding-top: 15px;
background-color: #222222;
color: white;
text-align: center;
}
.loading {
animation: throbber-loader 1000ms 300ms infinite ease-out;
background: #3d3d3d;
display: inline-block;
position: relative;
text-indent: -9999px;
width: 0.9em;
height: 0.9em;
margin: 0 .9em;
}
.loading:before,
.loading:after {
background: #3d3d3d;
content: '\x200B';
display: inline-block;
width: 0.9em;
height: 0.9em;
position: absolute;
top: 0;
}
.loading:before {
animation: throbber-loader 1000ms 150ms infinite ease-out;
left: -1.9em;
}
.loading:after {
animation: throbber-loader 1000ms 450ms infinite ease-out;
right: -1.9em;
}
@keyframes throbber-loader {
0% {
background: #3d3d3d;
}
10% {
background: #6b9dc8;
}
40% {
background: #3d3d3d;
}
}
a,
button {
-webkit-app-region: no-drag;
}
h1 {
margin: 0;
}
#maxim {
font-size: 0.7rem;
}
</style>
</head>
<body class="center" style="overflow: hidden;">
<img src="./img/desk-animation.svg" style="max-width: 62%;" />
<h1>TheDesk</h1>
<span id="ver"></span><br />
<span class="loading"></span><br />
<div class="cp">
<span id="maxim"></span><br />
<script>
if (location.search) {
var m = location.search.match(/\?ver=([0-9.]+)&codename=([a-zA-Z]+)&maxim=(.+)/)
var ver = m[1]
var code = m[2]
var maxim = m[3]
document.getElementById('ver').innerText = `${ver}(${code})`
document.getElementById('maxim').innerText = `${decodeURI(maxim)}`
}
</script>
</div>
</body>
</html>

View File

@@ -1,130 +1,129 @@
{ {
"name": "thedesk", "name": "thedesk",
"version": "21.0.5", "version": "20.1.0",
"codename": "Mayu", "description": "TheDesk is a Mastodon client for PC.",
"description": "TheDesk is a Mastodon client for PC.", "repository": "https://github.com/cutls/TheDesk",
"repository": "https://github.com/cutls/TheDesk", "main": "main.js",
"main": "main.js", "scripts": {
"scripts": { "test": "echo \"Error: no test specified\" && exit 1",
"test": "echo \"Error: no test specified\" && exit 1", "construct": "cd view/make && node make --automatic && cd ../../",
"construct": "cd view/make && node make --automatic && cd ../../", "dev": "npx electron ./ --dev",
"dev": "npx electron ./ --dev", "dist": "build --linux snap",
"dist": "build --linux snap", "watchview": "node view/make/make.js --automatic --watch",
"watchview": "node view/make/make.js --automatic --watch", "build:js": "node build.js",
"build:js": "node build.js", "build": "npx electron-builder",
"build": "node view/make/make.js --automatic && npx electron-builder", "build:all": "npx electron-builder --win --linux",
"build:all": "npx electron-builder --win --linux", "build:win": "npx electron-builder --win"
"build:win": "npx electron-builder --win", },
"build:pwa": "node view/make/make.js --automatic --pwa" "keywords": [
"mastodon",
"client",
"electron",
"thedesk"
],
"bugs": {
"url": "https://github.com/cutls/TheDesk/issues",
"email": "web-pro@cutls.com"
},
"homepage": "https://thedesk.top",
"author": {
"name": "Cutls",
"url": "https://cutls.com/@Cutls",
"email": "web-pro@cutls.com"
},
"contributor": [
{
"name": "とねぢ",
"url": "https://minohdon.jp/@toneji",
"email": "solfa.tono@gmail.com"
}, },
"keywords": [ {
"mastodon", "name": "ぽぷんじゃ",
"client", "url": "https://popon.pptdn.jp/@popn_ja",
"electron", "email": "popn.ja@gmail.com"
"thedesk"
],
"bugs": {
"url": "https://github.com/cutls/TheDesk/issues",
"email": "p@cutls.com"
}, },
"homepage": "https://thedesk.top", {
"author": { "name": "kPherox",
"name": "Cutls", "url": "https://pl.kpherox.dev/kPherox",
"url": "https://cutls.dev", "email": "admin@mail.kr-kp.com"
"email": "p@cutls.com"
},
"contributor": [{
"name": "とねぢ",
"url": "https://minohdon.jp/@toneji",
"email": "solfa.tono@gmail.com"
},
{
"name": "ぽぷんじゃ",
"url": "https://popon.pptdn.jp/@popn_ja",
"email": "popn.ja@gmail.com"
},
{
"name": "kPherox",
"url": "https://pl.kpherox.dev/kPherox",
"email": "admin@mail.kr-kp.com"
}
],
"license": "GPL-3.0",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.14.0",
"custom-electron-titlebar": "^3.2.3",
"electron-dl": "^3.0.1",
"jimp": "^0.14.0",
"jquery": "^3.5.1",
"jquery-ui-dist": "^1.12.1",
"json5": "^2.1.3",
"lodash": "^4.17.19",
"materialize-css": "git://github.com/cutls/materialize#v1-dev",
"sumchecker": "^3.0.1",
"sweetalert2": "^9.17.0",
"system-font-families": "^0.4.1",
"vue": "^2.6.11"
},
"optionalDependencies": {
"itunes-nowplaying-mac": "0.3.1"
},
"devDependencies": {
"chokidar": "^3.4.1",
"electron": "^9.1.1",
"electron-builder": "^22.7.0",
"electron-rebuild": "^1.11.0",
"readline-sync": "1.4.10"
},
"build": {
"productName": "TheDesk",
"appId": "top.thedesk",
"asarUnpack": [
"node_modules/itunes-nowplaying-mac"
],
"directories": {
"output": "../build"
},
"win": {
"icon": "build/thedesk.ico",
"target": [
"nsis",
"portable",
"appx"
]
},
"appx": {
"identityName": "53491Cutls.TheDesk",
"applicationId": "Cutls.TheDesk",
"publisherDisplayName": "Cutls",
"publisher": "CN=629757F5-A5EE-474F-9562-B304A89A9FD1",
"languages": [
"JA-JP",
"EN-US"
]
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"artifactName": "TheDesk-setup.${ext}"
},
"linux": {
"icon": "build/icons",
"target": [
"zip",
"snap",
"deb"
],
"category": "Network"
},
"mac": {
"target": [
"dmg",
"zip"
]
},
"electronDownload": {
"version": "9.0.5"
},
"electronVersion": "9.0.5"
} }
],
"license": "GPL-3.0",
"dependencies": {
"@fortawesome/fontawesome-free": "^5.11.2",
"electron-dl": "^1.14.0",
"electron-window-state": "^5.0.3",
"jimp": "^0.9.1",
"jquery": "^3.4.1",
"jquery-ui-dist": "^1.12.1",
"json5": "^2.1.1",
"lodash": "^4.17.15",
"materialize-css": "git://github.com/cutls/materialize",
"sumchecker": "^3.0.1",
"sweetalert2": "^9.4.0",
"vue": "^2.6.10"
},
"optionalDependencies": {
"font-manager": "0.3.0",
"itunes-nowplaying-mac": "0.3.1"
},
"devDependencies": {
"chokidar": "^3.3.0",
"electron": "^7.1.1",
"electron-builder": "^22.1.0",
"electron-rebuild": "^1.8.8",
"readline-sync": "1.4.10"
},
"build": {
"productName": "TheDesk",
"appId": "top.thedesk",
"asarUnpack": [
"node_modules/itunes-nowplaying-mac"
],
"directories": {
"output": "../build"
},
"win": {
"icon": "build/thedesk.ico",
"target": [
"nsis",
"portable",
"appx"
]
},
"appx": {
"identityName": "53491Cutls.TheDesk",
"applicationId": "Cutls.TheDesk",
"publisherDisplayName": "Cutls",
"publisher": "CN=629757F5-A5EE-474F-9562-B304A89A9FD1",
"languages": [
"JA-JP",
"EN-US"
]
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"artifactName": "TheDesk-setup.${ext}"
},
"linux": {
"icon": "build/icons",
"target": [
"zip",
"snap",
"deb"
],
"category": "Network"
},
"mac": {
"target": [
"dmg",
"zip"
]
},
"electronDownload": {
"version": "6.0.0"
},
"electronVersion": "6.0.0"
}
} }

View File

@@ -1,18 +1,5 @@
{ {
"latest":[], "latest":[],
"3.1.4": [
"リモート限定の連合タイムライン"
],
"3.1.3": [],
"3.1.2": [],
"3.1.1": [],
"3.1.0": [
"ブックマーク機能",
"お知らせ機能",
"プロフィールをワードフィルターする",
"フォローリクエストが通知に表示される"
],
"3.0.1": [],
"3.0.0": [ "3.0.0": [
"プロフィールディレクトリの表示", "プロフィールディレクトリの表示",
"ホワイトリスト式のトレンドタグ(3.0の機能)", "ホワイトリスト式のトレンドタグ(3.0の機能)",

View File

@@ -1,2 +0,0 @@
//PWA用
self.addEventListener('fetch', function(e) {})

View File

@@ -4,7 +4,7 @@
<title>Account Manager - TheDesk</title> <title>Account Manager - TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport" /> <meta content="width=device-width,initial-scale=1.0" name="viewport" />
<link <link
href="../../@@node_base@@/materialize-css/dist/css/materialize.css" href="../../node_modules/materialize-css/dist/css/materialize.css"
type="text/css" type="text/css"
rel="stylesheet" rel="stylesheet"
/> />
@@ -13,7 +13,7 @@
<link href="../../css/tl.css" rel="stylesheet" type="text/css" /> <link href="../../css/tl.css" rel="stylesheet" type="text/css" />
<link href="../../css/userdata.css" rel="stylesheet" type="text/css" /> <link href="../../css/userdata.css" rel="stylesheet" type="text/css" />
<link <link
href="../../@@node_base@@/@fortawesome/fontawesome-free/css/all.min.css" href="../../node_modules/@fortawesome/fontawesome-free/css/all.min.css"
type="text/css" type="text/css"
rel="stylesheet" rel="stylesheet"
/> />
@@ -26,20 +26,19 @@
</script> </script>
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script> <script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
@@comment-end@@ @@comment-end@@
@@pwa@@
</head> </head>
<body id="mainView" class="@@pwaClass@@"> <body id="mainView">
<script type="text/javascript" src="../../@@node_base@@/jquery/dist/jquery.js"></script> <script type="text/javascript" src="../../node_modules/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="../../js/platform/first.js"></script> <script type="text/javascript" src="../../js/platform/first.js"></script>
<script <script
type="text/javascript" type="text/javascript"
src="../../@@node_base@@/materialize-css/dist/js/materialize.js" src="../../node_modules/materialize-css/dist/js/materialize.js"
></script> ></script>
<script type="text/javascript" src="main.js"></script> <script type="text/javascript" src="main.js"></script>
<script <script
type="text/javascript" type="text/javascript"
src="../../@@node_base@@/sweetalert2/dist/sweetalert2.all.min.js" src="../../node_modules/sweetalert2/dist/sweetalert2.all.min.js"
></script> ></script>
<script> <script>
var misskeytoken = false var misskeytoken = false
@@ -53,33 +52,27 @@
<div id="acct-list"></div> <div id="acct-list"></div>
<div class="divider"></div> <div class="divider"></div>
</div> </div>
<div class="hide-second">
<a href="setting.html">@@haveExported@@</a>
</div>
<div> <div>
<h5>@@add@@</h5> <h5>@@add@@</h5>
<br /> <br />
<div id="add"> <div id="add">
<div class="row"> <div class="row">
<div class="col s8"> <div class="col s8">
@@addAcct@@<br />
<input type="text" id="url" style="width:70%" placeholder="ex)mstdn.jp" /> <input type="text" id="url" style="width:70%" placeholder="ex)mstdn.jp" />
<div id="ins-suggest"></div> <div id="ins-suggest"></div>
<button class="btn waves-effect" onclick="instance()">Login</button><br /> @@codesetupwarn@@<br />
<div class="pwa"> <label>
@@codesetupwarn@@<br /> <input type="checkbox" class="filled-in" id="linux" />
<label> <span>@@codesetup@@</span>
<input type="checkbox" class="filled-in" id="linux" /> </label>
<span>@@codesetup@@</span> <br />
</label>
<br />
</div>
<label> <label>
<input type="checkbox" class="filled-in" id="misskey" /> <input type="checkbox" class="filled-in" id="misskey" />
<span>@@thisismisskey@@</span> </label <span>@@thisismisskey@@</span> </label
><br /> ><br />
<button class="btn waves-effect" onclick="instance()">Login</button><br />
</div> </div>
<div class="col s4 scr" aria-hidden="true"> <div class="col s4">
<span style="font-family:Open Sans;">Supports</span> <span style="font-family:Open Sans;">Supports</span>
<div id="support" class="collection transparent"></div> <div id="support" class="collection transparent"></div>
</div> </div>
@@ -91,7 +84,7 @@
<button class="btn waves-effect" onclick="code()">Auth</button><br /> <button class="btn waves-effect" onclick="code()">Auth</button><br />
<br /> <br />
<a onclick="atSetup()" class="pointer">@@accessTokenSetup@@</a> <a onclick="atSetup()" class="pointer">@@accessTokenSetup@@</a>
<div id="compt" style="display:none" class="scr"> <div id="compt" style="display:none">
<h5>ログイン前に必ずご確認ください</h5> <h5>ログイン前に必ずご確認ください</h5>
<span id="compt-instance"></span>はバージョンが<span id="compt-ver"></span <span id="compt-instance"></span>はバージョンが<span id="compt-ver"></span
>のため以下の機能がご利用いただけません。 >のため以下の機能がご利用いただけません。
@@ -142,13 +135,11 @@
</div> </div>
</div> </div>
<script type="text/javascript" src="../../js/ui/theme.js"></script> <script type="text/javascript" src="../../js/ui/theme.js"></script>
<script type="text/javascript" src="../../js/ui/tips.js"></script>
<script type="text/javascript" src="../../js/platform/end.js"></script> <script type="text/javascript" src="../../js/platform/end.js"></script>
<script type="text/javascript" src="../../js/common/sha256.js"></script> <script type="text/javascript" src="../../js/common/sha256.js"></script>
<script type="text/javascript" src="../../@@node_base@@/lodash/lodash.min.js"></script> <script type="text/javascript" src="../../node_modules/lodash/lodash.min.js"></script>
<script type="text/javascript" src="../../js/login/instance.js"></script> <script type="text/javascript" src="../../js/login/instance.js"></script>
<script type="text/javascript" src="../../js/login/manager.js"></script> <script type="text/javascript" src="../../js/login/manager.js"></script>
<script type="text/javascript" src="../../js/tl/date.js"></script> <script type="text/javascript" src="../../js/tl/date.js"></script>
<script>$('body').addClass(localStorage.getItem('platform'))</script>
</body> </body>
</html> </html>

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,6 @@
"list": "List of accounts", "list": "List of accounts",
"back": "Back", "back": "Back",
"add": "Add an account", "add": "Add an account",
"addAcct": "Fill the instance domain (like mastodon.social)",
"codesetupwarn": "Uncheck it to skip pasiting code.(login to Mastodon on Windows or macOS) (Recommended: pcheck)", "codesetupwarn": "Uncheck it to skip pasiting code.(login to Mastodon on Windows or macOS) (Recommended: pcheck)",
"codesetup": "Code setup", "codesetup": "Code setup",
"mainacct": "Main an account", "mainacct": "Main an account",
@@ -20,6 +19,5 @@
"thisismisskey": "Login as Misskey", "thisismisskey": "Login as Misskey",
"misskeylogin": "Read <a href=\"https://thedesk.top/how-to-misskey-login.html\">Docs(ja)</a> to login Misskey.", "misskeylogin": "Read <a href=\"https://thedesk.top/how-to-misskey-login.html\">Docs(ja)</a> to login Misskey.",
"nodata": "No data", "nodata": "No data",
"accessTokenSetup": "Use access token to login(click after fill not code but access-token in box: Advanced)", "accessTokenSetup": "Use access token to login(click after fill not code but access-token in box: Advanced)"
"haveExported": "Having the exported file of TheDesk, click here to jump setting page"
} }

View File

@@ -1,8 +1,6 @@
{ {
"draghere": "Drag here to upload", "draghere": "Drag here to upload",
"close": "Close", "close": "Close",
"webSrc": "Search on Web",
"tsSrc": "Search on tootsearch",
"showSelectProf": "Show profile of the selecting account", "showSelectProf": "Show profile of the selecting account",
"closethisbox": "Close this box", "closethisbox": "Close this box",
"toot": "Toot", "toot": "Toot",
@@ -11,6 +9,8 @@
"cwDes": "Hide text behind warning", "cwDes": "Hide text behind warning",
"selfile": "Attach..", "selfile": "Attach..",
"insertEmoji": "Emojis", "insertEmoji": "Emojis",
"NPSpotify": "NowPlaying(Spotify)",
"NPiTunes": "NowPlaying(macOS)",
"schedule": "Scheduled toot", "schedule": "Scheduled toot",
"postat": "Post at", "postat": "Post at",
"scheduleWarn": "2.7.0~ Minimum time gap:5min(clock on the server may not be accurate.)", "scheduleWarn": "2.7.0~ Minimum time gap:5min(clock on the server may not be accurate.)",
@@ -20,8 +20,6 @@
"yes": "Yes", "yes": "Yes",
"temp": "Attaching files", "temp": "Attaching files",
"nothing": "None", "nothing": "None",
"stamp": "Stamp",
"stampWarn": "Your acct(aa@bb.cc) is printed on the right-bottom of the uploaded image",
"vis": "Adjust status privacy", "vis": "Adjust status privacy",
"cwtext": "Warning text", "cwtext": "Warning text",
"selectVis": "Adjust status privacy", "selectVis": "Adjust status privacy",
@@ -75,7 +73,6 @@
"toots": "Toots", "toots": "Toots",
"follow": "Follow", "follow": "Follow",
"follower": "Follower", "follower": "Follower",
"utlColumn": "Show as a column",
"timeline": "Timeline", "timeline": "Timeline",
"operateOtherAcct": "Cross-account", "operateOtherAcct": "Cross-account",
"list": "List", "list": "List",
@@ -139,7 +136,6 @@
"filterWord": "Filtering words", "filterWord": "Filtering words",
"degree": "Filter contexts", "degree": "Filter contexts",
"conver": "Conversations", "conver": "Conversations",
"prof": "Profiles",
"option": "Options", "option": "Options",
"matchWord": "Whole word", "matchWord": "Whole word",
"warnMatchWord": "Nice for Latin language", "warnMatchWord": "Nice for Latin language",
@@ -178,11 +174,10 @@
"active": "Recently active", "active": "Recently active",
"newcomer": "New arrivals", "newcomer": "New arrivals",
"local_only": "Local only", "local_only": "Local only",
"menu": "Menu",
"demoBottomBtns": "Welcome guide", "demoBottomBtns": "Welcome guide",
"lookAtBottom": "Look at the bottom of this window. Here is some tips about it.", "lookAtBottom": "Look at the bottom of this window. Here is some tips about it.",
"acctManDesc": "Add more accounts and logout them.", "acctManDesc": "Add more accounts and logout them.",
"settingDesc": "Many and many preferences here. You will couldn't check it all!", "settingDesc": "Many and many preferences here. You will couldn't check it all!",
"nanoDescPlus": "Mini window client(experimental)", "nanoDescPlus": "Mini window client(experimental)",
"menuDesc": "All daily TheDesk and Mastodon tuning like <b>add and sort columns</b>, <b>list and filter check</b>." "listDesc": "All daily TheDesk and Mastodon tuning like <b>add and sort columns</b>, <b>list and filter check</b>."
} }

View File

@@ -48,7 +48,6 @@
"lang_manager_none": "None", "lang_manager_none": "None",
"lang_manager_godev": "Open DevCenter of Misskey. We show also an official documents to refer.", "lang_manager_godev": "Open DevCenter of Misskey. We show also an official documents to refer.",
"lang_manager_logout": "Logout", "lang_manager_logout": "Logout",
"lang_manager_maxChars": "Max chars of toots",
"lang_bbmd_misskey": "TheDesk regards \"@\" as reply, but put other parameter. Unlisted on Mastodon means Home on Misskey.", "lang_bbmd_misskey": "TheDesk regards \"@\" as reply, but put other parameter. Unlisted on Mastodon means Home on Misskey.",
"lang_emoji_get": "Get emojis", "lang_emoji_get": "Get emojis",
"lang_emoji_custom": "Custom emojis", "lang_emoji_custom": "Custom emojis",
@@ -60,8 +59,6 @@
"lang_postimg_delete": "Click to add description, right-click to delete this", "lang_postimg_delete": "Click to add description, right-click to delete this",
"lang_postimg_desc": "Description", "lang_postimg_desc": "Description",
"lang_postimg_leadContext": "right-click the thumbnail to delete this", "lang_postimg_leadContext": "right-click the thumbnail to delete this",
"lang_post_syncDetail": "Upload media synchronously",
"lang_post_syncDetailText": "Click each picture icon to get the thumbnail. If you can get, the media you uploaded are completely processed.",
"lang_post_tagTL": "This toot does not contain a default tag. This toot will not be shown on Local TL. Continue?", "lang_post_tagTL": "This toot does not contain a default tag. This toot will not be shown on Local TL. Continue?",
"lang_post_tagVis": "This toot(not 'public' toot) is not shown on this tag's TL.", "lang_post_tagVis": "This toot(not 'public' toot) is not shown on this tag's TL.",
"lang_post_cwtitle": "Auto CW Alert", "lang_post_cwtitle": "Auto CW Alert",
@@ -69,8 +66,6 @@
"lang_post_btn1": "Cancel (will not post)", "lang_post_btn1": "Cancel (will not post)",
"lang_post_btn2": "Make text hidden automatically", "lang_post_btn2": "Make text hidden automatically",
"lang_post_btn3": "Continue to post", "lang_post_btn3": "Continue to post",
"lang_post_unfinishedMedia": "The server has not finished processing your media. Retry.",
"lang_post_retry": "Retry",
"lang_status_favWarn": "It will take a miunte to favourite a remote toot.", "lang_status_favWarn": "It will take a miunte to favourite a remote toot.",
"lang_status_btWarn": "It will take a miunte to boost a remote toot.", "lang_status_btWarn": "It will take a miunte to boost a remote toot.",
"lang_status_follow": "Follow", "lang_status_follow": "Follow",
@@ -127,7 +122,6 @@
"lang_layout_delthis": "Remove this column", "lang_layout_delthis": "Remove this column",
"lang_layout_setthis": "Preferences of this column", "lang_layout_setthis": "Preferences of this column",
"lang_layout_mediafil": "Media filtering", "lang_layout_mediafil": "Media filtering",
"lang_layout_remoteOnly": "Remote only",
"lang_layout_linkana": "Auto Link Analyzer", "lang_layout_linkana": "Auto Link Analyzer",
"lang_layout_linkanades": "Auto link analyzer", "lang_layout_linkanades": "Auto link analyzer",
"lang_layout_tts": "Text to speech ", "lang_layout_tts": "Text to speech ",
@@ -144,7 +138,6 @@
"lang_layout_deleteColumnDesc": "Delete this column", "lang_layout_deleteColumnDesc": "Delete this column",
"lang_layout_unread": "Unread", "lang_layout_unread": "Unread",
"lang_layout_tagManager": "Tag timeline manager", "lang_layout_tagManager": "Tag timeline manager",
"lang_layout_announ": "Announcement: the counter is the number of your unread announcements. If not shown, it means announcements are all marked as read.",
"lang_sort_gothis": "Go to this column", "lang_sort_gothis": "Go to this column",
"lang_sort_remthis": "Delete this column", "lang_sort_remthis": "Delete this column",
"lang_spotify_img": "Attach an album artwork", "lang_spotify_img": "Attach an album artwork",
@@ -161,12 +154,10 @@
"lang_showontl_movebtn": "Continue on the new account", "lang_showontl_movebtn": "Continue on the new account",
"lang_showontl_botacct": "[bot]", "lang_showontl_botacct": "[bot]",
"lang_showontl_followed": "Following you", "lang_showontl_followed": "Following you",
"lang_parse_request": "Follow request",
"lang_showontl_notf": "Notification ", "lang_showontl_notf": "Notification ",
"lang_showontl_domain": "Domain ", "lang_showontl_domain": "Domain ",
"lang_showontl_listwarn": "Follow to add this user to lists.", "lang_showontl_listwarn": "Follow to add this user to lists.",
"lang_showontl_verified": "This website is verified by owner at ", "lang_showontl_verified": "This website is verified by owner at ",
"lang_status_requesting": "Requesting",
"lang_parse_mentioned": " replied to you", "lang_parse_mentioned": " replied to you",
"lang_parse_faved": " favourited your toot", "lang_parse_faved": " favourited your toot",
"lang_parse_bted": " boosted your toot", "lang_parse_bted": " boosted your toot",
@@ -174,7 +165,6 @@
"lang_parse_polled": "'s poll", "lang_parse_polled": "'s poll",
"lang_parse_notftime": "Actioned at", "lang_parse_notftime": "Actioned at",
"lang_parse_cwshow": "Show", "lang_parse_cwshow": "Show",
"lang_parse_cwshow_acc": "This is a post with content warning. click to show the whole content",
"lang_parse_fulltext": "Full size text:", "lang_parse_fulltext": "Full size text:",
"lang_parse_autofold": "Auto folded", "lang_parse_autofold": "Auto folded",
"lang_parse_more": "More", "lang_parse_more": "More",
@@ -203,7 +193,6 @@
"lang_parse_detail": "Details", "lang_parse_detail": "Details",
"lang_parse_redraft": "Delete & re-draft", "lang_parse_redraft": "Delete & re-draft",
"lang_parse_followed": "Followed you", "lang_parse_followed": "Followed you",
"lang_parse_moved": "Moved to...",
"lang_parse_clientop": "Operation of this client", "lang_parse_clientop": "Operation of this client",
"lang_parse_clienttxt": " will be", "lang_parse_clienttxt": " will be",
"lang_parse_clientno": "done nothing", "lang_parse_clientno": "done nothing",
@@ -221,7 +210,6 @@
"lang_parse_nsfw": "sensitive media", "lang_parse_nsfw": "sensitive media",
"lang_parse_html": "Show embed HTML", "lang_parse_html": "Show embed HTML",
"lang_parse_notffilter": "Show this user's notifications", "lang_parse_notffilter": "Show this user's notifications",
"lang_parse_hidden": "Unvisible quoted toot",
"lang_misskeyparse_renote": "Repost", "lang_misskeyparse_renote": "Repost",
"lang_misskeyparse_renoteqt": "Renote", "lang_misskeyparse_renoteqt": "Renote",
"lang_misskeyparse_reaction": "Reaction", "lang_misskeyparse_reaction": "Reaction",

View File

@@ -4,21 +4,18 @@
"yes": "Yes", "yes": "Yes",
"no": "No", "no": "No",
"none": "None", "none": "None",
"show": "Show",
"hide": "Hide",
"default": "Default", "default": "Default",
"change": "Change", "change": "Change",
"select": "Select", "select": "Select",
"env": "System Preferences", "env": "System Preferences",
"setlang": "Languages", "setlang": "Languages",
"backup": "Import and export of preferences", "backup": "Import and export of preferences",
"backupWarn": "If you got a error when you choose the file, please paste the strings printed when you open the file and click import",
"import": "Import", "import": "Import",
"export": "Export", "export": "Export",
"hardwareAcceleration": "Disable hardware acceleration", "hardwareAcceleration": "Disable hardware acceleration",
"hardwareAccelerationWarn": "Auto restarted", "hardwareAccelerationWarn": "Auto restarted",
"theme": "Themes", "theme": "Themes",
"popup": "Popup notification", "popup": "Popup notification(on Windows)",
"popupwarn": "Hide to set \"0\"", "popupwarn": "Hide to set \"0\"",
"s": "sec", "s": "sec",
"nativenotf": "Native notification", "nativenotf": "Native notification",
@@ -36,12 +33,7 @@
"savefolderwarn": "TheDesk uses this value when it try to save pictures or take screenshots.", "savefolderwarn": "TheDesk uses this value when it try to save pictures or take screenshots.",
"useragent": "User agent", "useragent": "User agent",
"useragentWarn": "Restart when changed", "useragentWarn": "Restart when changed",
"frame": "Window frame",
"frameWarn": "If 'off', the window looks cool.",
"downloadWin": "Versioning(o Windows downloader)",
"absolute": "absolute value", "absolute": "absolute value",
"srcUrl": "Search engine",
"srcUrlWarn": "{q} will be replaced to query.",
"themeSel": "Select theme", "themeSel": "Select theme",
"customtheme": "Edit and add custom themes", "customtheme": "Edit and add custom themes",
"customthemeDirection": "Color scheme", "customthemeDirection": "Color scheme",
@@ -102,7 +94,7 @@
"imgheight": "Height of images", "imgheight": "Height of images",
"imgheightwarn": "Option:Set \"full\" to uncrop.", "imgheightwarn": "Option:Set \"full\" to uncrop.",
"ticker": "Enable #InstanceTicker", "ticker": "Enable #InstanceTicker",
"tickerwarn": "Show colorful stickers about the server. <a href=\"https://github.com/MiyonMiyon/InstanceTicker_List\">About #InstanceTicker</a> (c)2018-2020 MiyonMiyon. Released under the MIT License.", "tickerwarn": "Show colorful stickers about the server. <a href=\"https://wee.jp/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
"animation": "Animation of timelines", "animation": "Animation of timelines",
"markers": "Markers(mark as read) on HTL and notifications", "markers": "Markers(mark as read) on HTL and notifications",
"markerswarn": "Mastodon 3.0~. Shared on WebUI and third-party supported clients.", "markerswarn": "Mastodon 3.0~. Shared on WebUI and third-party supported clients.",
@@ -145,8 +137,6 @@
"nothing": "Hidden", "nothing": "Hidden",
"localonly": "Local Only", "localonly": "Local Only",
"zeroWidthEmoji": "Zero-width space when inserting emojis", "zeroWidthEmoji": "Zero-width space when inserting emojis",
"uploadCrop": "Auto scale to fit",
"uploadCropWarn": "Max long-side px. Uploaded images are converted to JPEG(from JPEG) or PNG(from others). Set 0 and the images will not be resized. Notice: if you post an animated picture like GIF, it will be converted static one.",
"keysc": "Keyboard shortcut Preferences", "keysc": "Keyboard shortcut Preferences",
"iks": "Easy inserter", "iks": "Easy inserter",
"okswarn": "You can insert any letters and emojis with only 3 keys", "okswarn": "You can insert any letters and emojis with only 3 keys",
@@ -167,15 +157,12 @@
"linkwarn": "TheDesk save your data on thedesk.top server.", "linkwarn": "TheDesk save your data on thedesk.top server.",
"connect": "Connect", "connect": "Connect",
"disconnect": "Disconnect", "disconnect": "Disconnect",
"lastFmWarn": "User name...(empty to disconnect) You cannot hide your recent play log at last.fm privacy settings.",
"templateedit": "Edit a template", "templateedit": "Edit a template",
"templateeditwarn": "", "templateeditwarn": "",
"template1": "Spotify:{song}:Song name/{album}:Album name/{artist}:Artist name/{url}:URL to Spotify", "template1": "Spotify:{song}:Song name/{album}:Album name/{artist}:Artist name/{url}:URL to Spotify",
"template2": "macOS:{song}:Song name/{album}:Album name/{artist}:Artist name/composer:{composer}/spampling rate:{hz}/bit rate:{bitRate}/genre:{genre}", "template2": "macOS:{song}:Song name/{album}:Album name/{artist}:Artist name/composer:{composer}/spampling rate:{hz}/bit rate:{bitRate}/genre:{genre}",
"template3": "", "template3": "",
"postartwork": "Attach an Artwork of Spotify", "postartwork": "Attach an Artwork of Spotify",
"searchArtwork": "If the song has no artwork, automatic complete it(macOS)",
"searchArtworkWarn": "If you nowplaying an non-artwork song, get one which seems nice through API. If you do not like the completed artwork, you can right-click it to delete.",
"tts": "TTS(text to speech) Preferences", "tts": "TTS(text to speech) Preferences",
"bouyomi": "BouyomiChan connect", "bouyomi": "BouyomiChan connect",
"bouyomiWarn": "Require: BouyomiChan WebSocket Plugin", "bouyomiWarn": "Require: BouyomiChan WebSocket Plugin",

View File

@@ -2,7 +2,6 @@
"list": "List of accounts", "list": "List of accounts",
"back": "Back", "back": "Back",
"add": "Add an account", "add": "Add an account",
"addAcct": "Fill the instance domain (like mastodon.social)",
"codesetupwarn": "Uncheck it to skip pasiting code.(login to Mastodon on Windows or macOS) (Recommended: pcheck)", "codesetupwarn": "Uncheck it to skip pasiting code.(login to Mastodon on Windows or macOS) (Recommended: pcheck)",
"codesetup": "Code setup", "codesetup": "Code setup",
"mainacct": "Main an account", "mainacct": "Main an account",
@@ -20,6 +19,5 @@
"thisismisskey": "Login as Misskey", "thisismisskey": "Login as Misskey",
"misskeylogin": "Read <a href=\"https://thedesk.top/how-to-misskey-login.html\">Docs(ja)</a> to login Misskey.", "misskeylogin": "Read <a href=\"https://thedesk.top/how-to-misskey-login.html\">Docs(ja)</a> to login Misskey.",
"nodata": "No data", "nodata": "No data",
"accessTokenSetup": "Use access token to login(click after fill not code but access-token in box: Advanced)", "accessTokenSetup": "Use access token to login(click after fill not code but access-token in box: Advanced)"
"haveExported": "Having the exported file of TheDesk, click here to jump setting page"
} }

View File

@@ -1,8 +1,6 @@
{ {
"draghere": "Drag here to upload", "draghere": "Drag here to upload",
"close": "Close", "close": "Close",
"webSrc": "Search on Web",
"tsSrc": "Search on tootsearch",
"showSelectProf": "Show profile of the selecting account", "showSelectProf": "Show profile of the selecting account",
"closethisbox": "Close this box", "closethisbox": "Close this box",
"toot": "Toot", "toot": "Toot",
@@ -11,6 +9,8 @@
"cwDes": "Hide text behind warning", "cwDes": "Hide text behind warning",
"selfile": "Attach..", "selfile": "Attach..",
"insertEmoji": "Emojis", "insertEmoji": "Emojis",
"NPSpotify": "NowPlaying(Spotify)",
"NPiTunes": "NowPlaying(macOS)",
"schedule": "Scheduled toot", "schedule": "Scheduled toot",
"postat": "Post at", "postat": "Post at",
"scheduleWarn": "2.7.0~ Minimum time gap:5min(clock on the server may not be accurate.)", "scheduleWarn": "2.7.0~ Minimum time gap:5min(clock on the server may not be accurate.)",
@@ -20,8 +20,6 @@
"yes": "Yes", "yes": "Yes",
"temp": "Attaching files", "temp": "Attaching files",
"nothing": "None", "nothing": "None",
"stamp": "Stamp",
"stampWarn": "Your acct(aa@bb.cc) is printed on the right-bottom of the uploaded image",
"vis": "Adjust status privacy", "vis": "Adjust status privacy",
"cwtext": "Warning text", "cwtext": "Warning text",
"selectVis": "Adjust status privacy", "selectVis": "Adjust status privacy",
@@ -75,7 +73,6 @@
"toots": "Toots", "toots": "Toots",
"follow": "Follow", "follow": "Follow",
"follower": "Follower", "follower": "Follower",
"utlColumn": "Show as a column",
"timeline": "Timeline", "timeline": "Timeline",
"operateOtherAcct": "Cross-account", "operateOtherAcct": "Cross-account",
"list": "List", "list": "List",
@@ -139,7 +136,6 @@
"filterWord": "Filtering words", "filterWord": "Filtering words",
"degree": "Filter contexts", "degree": "Filter contexts",
"conver": "Conversations", "conver": "Conversations",
"prof": "Profiles",
"option": "Options", "option": "Options",
"matchWord": "Whole word", "matchWord": "Whole word",
"warnMatchWord": "Nice for Latin language", "warnMatchWord": "Nice for Latin language",
@@ -178,11 +174,10 @@
"active": "Recently active", "active": "Recently active",
"newcomer": "New arrivals", "newcomer": "New arrivals",
"local_only": "Local only", "local_only": "Local only",
"menu": "Menu",
"demoBottomBtns": "Welcome guide", "demoBottomBtns": "Welcome guide",
"lookAtBottom": "Look at the bottom of this window. Here is some tips about it.", "lookAtBottom": "Look at the bottom of this window. Here is some tips about it.",
"acctManDesc": "Add more accounts and logout them.", "acctManDesc": "Add more accounts and logout them.",
"settingDesc": "Many and many preferences here. You will couldn't check it all!", "settingDesc": "Many and many preferences here. You will couldn't check it all!",
"nanoDescPlus": "Mini window client(experimental)", "nanoDescPlus": "Mini window client(experimental)",
"menuDesc": "All daily TheDesk and Mastodon tuning like <b>add and sort columns</b>, <b>list and filter check</b>." "listDesc": "All daily TheDesk and Mastodon tuning like <b>add and sort columns</b>, <b>list and filter check</b>."
} }

View File

@@ -48,7 +48,6 @@
"lang_manager_none": "None", "lang_manager_none": "None",
"lang_manager_godev": "Open DevCenter of Misskey. We show also an official documents to refer.", "lang_manager_godev": "Open DevCenter of Misskey. We show also an official documents to refer.",
"lang_manager_logout": "Logout", "lang_manager_logout": "Logout",
"lang_manager_maxChars": "Max chars of toots",
"lang_bbmd_misskey": "TheDesk regards \"@\" as reply, but put other parameter. Unlisted on Mastodon means Home on Misskey.", "lang_bbmd_misskey": "TheDesk regards \"@\" as reply, but put other parameter. Unlisted on Mastodon means Home on Misskey.",
"lang_emoji_get": "Get emojis", "lang_emoji_get": "Get emojis",
"lang_emoji_custom": "Custom emojis", "lang_emoji_custom": "Custom emojis",
@@ -60,8 +59,6 @@
"lang_postimg_delete": "Click to add description, right-click to delete this", "lang_postimg_delete": "Click to add description, right-click to delete this",
"lang_postimg_desc": "Description", "lang_postimg_desc": "Description",
"lang_postimg_leadContext": "right-click the thumbnail to delete this", "lang_postimg_leadContext": "right-click the thumbnail to delete this",
"lang_post_syncDetail": "Upload media synchronously",
"lang_post_syncDetailText": "Click each picture icon to get the thumbnail. If you can get, the media you uploaded are completely processed.",
"lang_post_tagTL": "This toot does not contain a default tag. This toot will not be shown on Local TL. Continue?", "lang_post_tagTL": "This toot does not contain a default tag. This toot will not be shown on Local TL. Continue?",
"lang_post_tagVis": "This toot(not 'public' toot) is not shown on this tag's TL.", "lang_post_tagVis": "This toot(not 'public' toot) is not shown on this tag's TL.",
"lang_post_cwtitle": "Auto CW Alert", "lang_post_cwtitle": "Auto CW Alert",
@@ -69,8 +66,6 @@
"lang_post_btn1": "Cancel (will not post)", "lang_post_btn1": "Cancel (will not post)",
"lang_post_btn2": "Make text hidden automatically", "lang_post_btn2": "Make text hidden automatically",
"lang_post_btn3": "Continue to post", "lang_post_btn3": "Continue to post",
"lang_post_unfinishedMedia": "The server has not finished processing your media. Retry.",
"lang_post_retry": "Retry",
"lang_status_favWarn": "It will take a miunte to favourite a remote toot.", "lang_status_favWarn": "It will take a miunte to favourite a remote toot.",
"lang_status_btWarn": "It will take a miunte to boost a remote toot.", "lang_status_btWarn": "It will take a miunte to boost a remote toot.",
"lang_status_follow": "Follow", "lang_status_follow": "Follow",
@@ -127,7 +122,6 @@
"lang_layout_delthis": "Remove this column", "lang_layout_delthis": "Remove this column",
"lang_layout_setthis": "Preferences of this column", "lang_layout_setthis": "Preferences of this column",
"lang_layout_mediafil": "Media filtering", "lang_layout_mediafil": "Media filtering",
"lang_layout_remoteOnly": "Remote only",
"lang_layout_linkana": "Auto Link Analyzer", "lang_layout_linkana": "Auto Link Analyzer",
"lang_layout_linkanades": "Auto link analyzer", "lang_layout_linkanades": "Auto link analyzer",
"lang_layout_tts": "Text to speech ", "lang_layout_tts": "Text to speech ",
@@ -144,7 +138,6 @@
"lang_layout_deleteColumnDesc": "Delete this column", "lang_layout_deleteColumnDesc": "Delete this column",
"lang_layout_unread": "Unread", "lang_layout_unread": "Unread",
"lang_layout_tagManager": "Tag timeline manager", "lang_layout_tagManager": "Tag timeline manager",
"lang_layout_announ": "Announcement: the counter is the number of your unread announcements. If not shown, it means announcements are all marked as read.",
"lang_sort_gothis": "Go to this column", "lang_sort_gothis": "Go to this column",
"lang_sort_remthis": "Delete this column", "lang_sort_remthis": "Delete this column",
"lang_spotify_img": "Attach an album artwork", "lang_spotify_img": "Attach an album artwork",
@@ -161,12 +154,10 @@
"lang_showontl_movebtn": "Continue on the new account", "lang_showontl_movebtn": "Continue on the new account",
"lang_showontl_botacct": "[bot]", "lang_showontl_botacct": "[bot]",
"lang_showontl_followed": "Following you", "lang_showontl_followed": "Following you",
"lang_parse_request": "Follow request",
"lang_showontl_notf": "Notification ", "lang_showontl_notf": "Notification ",
"lang_showontl_domain": "Domain ", "lang_showontl_domain": "Domain ",
"lang_showontl_listwarn": "Follow to add this user to lists.", "lang_showontl_listwarn": "Follow to add this user to lists.",
"lang_showontl_verified": "This website is verified by owner at ", "lang_showontl_verified": "This website is verified by owner at ",
"lang_status_requesting": "Requesting",
"lang_parse_mentioned": " replied to you", "lang_parse_mentioned": " replied to you",
"lang_parse_faved": " favourited your toot", "lang_parse_faved": " favourited your toot",
"lang_parse_bted": " boosted your toot", "lang_parse_bted": " boosted your toot",
@@ -174,7 +165,6 @@
"lang_parse_polled": "'s poll", "lang_parse_polled": "'s poll",
"lang_parse_notftime": "Actioned at", "lang_parse_notftime": "Actioned at",
"lang_parse_cwshow": "Show", "lang_parse_cwshow": "Show",
"lang_parse_cwshow_acc": "This is a post with content warning. click to show the whole content",
"lang_parse_fulltext": "Full size text:", "lang_parse_fulltext": "Full size text:",
"lang_parse_autofold": "Auto folded", "lang_parse_autofold": "Auto folded",
"lang_parse_more": "More", "lang_parse_more": "More",
@@ -203,7 +193,6 @@
"lang_parse_detail": "Details", "lang_parse_detail": "Details",
"lang_parse_redraft": "Delete & re-draft", "lang_parse_redraft": "Delete & re-draft",
"lang_parse_followed": "Followed you", "lang_parse_followed": "Followed you",
"lang_parse_moved": "Moved to...",
"lang_parse_clientop": "Operation of this client", "lang_parse_clientop": "Operation of this client",
"lang_parse_clienttxt": " will be", "lang_parse_clienttxt": " will be",
"lang_parse_clientno": "done nothing", "lang_parse_clientno": "done nothing",
@@ -221,7 +210,6 @@
"lang_parse_nsfw": "sensitive media", "lang_parse_nsfw": "sensitive media",
"lang_parse_html": "Show embed HTML", "lang_parse_html": "Show embed HTML",
"lang_parse_notffilter": "Show this user's notifications", "lang_parse_notffilter": "Show this user's notifications",
"lang_parse_hidden": "Unvisible quoted toot",
"lang_misskeyparse_renote": "Repost", "lang_misskeyparse_renote": "Repost",
"lang_misskeyparse_renoteqt": "Renote", "lang_misskeyparse_renoteqt": "Renote",
"lang_misskeyparse_reaction": "Reaction", "lang_misskeyparse_reaction": "Reaction",

View File

@@ -4,21 +4,18 @@
"yes": "Yes", "yes": "Yes",
"no": "No", "no": "No",
"none": "None", "none": "None",
"show": "Show",
"hide": "Hide",
"default": "Default", "default": "Default",
"change": "Change", "change": "Change",
"select": "Select", "select": "Select",
"env": "System Preferences", "env": "System Preferences",
"setlang": "Languages", "setlang": "Languages",
"backup": "Import and export of preferences", "backup": "Import and export of preferences",
"backupWarn": "If you got a error when you choose the file, please paste the strings printed when you open the file and click import",
"import": "Import", "import": "Import",
"export": "Export", "export": "Export",
"hardwareAcceleration": "Disable hardware acceleration", "hardwareAcceleration": "Disable hardware acceleration",
"hardwareAccelerationWarn": "Auto restarted", "hardwareAccelerationWarn": "Auto restarted",
"theme": "Themes", "theme": "Themes",
"popup": "Popup notification", "popup": "Popup notification(on Windows)",
"popupwarn": "Hide to set \"0\"", "popupwarn": "Hide to set \"0\"",
"s": "sec", "s": "sec",
"nativenotf": "Native notification", "nativenotf": "Native notification",
@@ -36,12 +33,7 @@
"savefolderwarn": "TheDesk uses this value when it try to save pictures or take screenshots.", "savefolderwarn": "TheDesk uses this value when it try to save pictures or take screenshots.",
"useragent": "User agent", "useragent": "User agent",
"useragentWarn": "Restart when changed", "useragentWarn": "Restart when changed",
"frame": "Window frame",
"frameWarn": "If 'off', the window looks cool.",
"downloadWin": "Versioning(o Windows downloader)",
"absolute": "absolute value", "absolute": "absolute value",
"srcUrl": "Search engine",
"srcUrlWarn": "{q} will be replaced to query.",
"themeSel": "Select theme", "themeSel": "Select theme",
"customtheme": "Edit and add custom themes", "customtheme": "Edit and add custom themes",
"customthemeDirection": "Color scheme", "customthemeDirection": "Color scheme",
@@ -102,7 +94,7 @@
"imgheight": "Height of images", "imgheight": "Height of images",
"imgheightwarn": "Option:Set \"full\" to uncrop.", "imgheightwarn": "Option:Set \"full\" to uncrop.",
"ticker": "Enable #InstanceTicker", "ticker": "Enable #InstanceTicker",
"tickerwarn": "Show colorful stickers about the server. <a href=\"https://github.com/MiyonMiyon/InstanceTicker_List\">About #InstanceTicker</a> (c)2018-2020 MiyonMiyon. Released under the MIT License.", "tickerwarn": "Show colorful stickers about the server. <a href=\"https://wee.jp/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
"animation": "Animation of timelines", "animation": "Animation of timelines",
"markers": "Markers(mark as read) on HTL and notifications", "markers": "Markers(mark as read) on HTL and notifications",
"markerswarn": "Mastodon 3.0~. Shared on WebUI and third-party supported clients.", "markerswarn": "Mastodon 3.0~. Shared on WebUI and third-party supported clients.",
@@ -145,8 +137,6 @@
"nothing": "Hidden", "nothing": "Hidden",
"localonly": "Local Only", "localonly": "Local Only",
"zeroWidthEmoji": "Zero-width space when inserting emojis", "zeroWidthEmoji": "Zero-width space when inserting emojis",
"uploadCrop": "Auto scale to fit",
"uploadCropWarn": "Max long-side px. Uploaded images are converted to JPEG(from JPEG) or PNG(from others). Set 0 and the images will not be resized. Notice: if you post an animated picture like GIF, it will be converted static one.",
"keysc": "Keyboard shortcut Preferences", "keysc": "Keyboard shortcut Preferences",
"iks": "Easy inserter", "iks": "Easy inserter",
"okswarn": "You can insert any letters and emojis with only 3 keys", "okswarn": "You can insert any letters and emojis with only 3 keys",
@@ -167,15 +157,12 @@
"linkwarn": "TheDesk save your data on thedesk.top server.", "linkwarn": "TheDesk save your data on thedesk.top server.",
"connect": "Connect", "connect": "Connect",
"disconnect": "Disconnect", "disconnect": "Disconnect",
"lastFmWarn": "User name...(empty to disconnect) You cannot hide your recent play log at last.fm privacy settings.",
"templateedit": "Edit a template", "templateedit": "Edit a template",
"templateeditwarn": "", "templateeditwarn": "",
"template1": "Spotify:{song}:Song name/{album}:Album name/{artist}:Artist name/{url}:URL to Spotify", "template1": "Spotify:{song}:Song name/{album}:Album name/{artist}:Artist name/{url}:URL to Spotify",
"template2": "macOS:{song}:Song name/{album}:Album name/{artist}:Artist name/composer:{composer}/spampling rate:{hz}/bit rate:{bitRate}/genre:{genre}", "template2": "macOS:{song}:Song name/{album}:Album name/{artist}:Artist name/composer:{composer}/spampling rate:{hz}/bit rate:{bitRate}/genre:{genre}",
"template3": "", "template3": "",
"postartwork": "Attach an Artwork of Spotify", "postartwork": "Attach an Artwork of Spotify",
"searchArtwork": "If the song has no artwork, automatic complete it(macOS)",
"searchArtworkWarn": "If you nowplaying an non-artwork song, get one which seems nice through API. If you do not like the completed artwork, you can right-click it to delete.",
"tts": "TTS(text to speech) Preferences", "tts": "TTS(text to speech) Preferences",
"bouyomi": "BouyomiChan connect", "bouyomi": "BouyomiChan connect",
"bouyomiWarn": "Require: BouyomiChan WebSocket Plugin", "bouyomiWarn": "Require: BouyomiChan WebSocket Plugin",

View File

@@ -2,7 +2,6 @@
"list": "Списък на профилите", "list": "Списък на профилите",
"back": "Назад", "back": "Назад",
"add": "Добавяне на профил", "add": "Добавяне на профил",
"addAcct": "Fill the instance domain (like mastodon.social)",
"codesetupwarn": "Премахнете отметката за да пропуснете влизането с код. (Вход в Mastodon от Windows или macOS) (Препоръчително: pcheck)", "codesetupwarn": "Премахнете отметката за да пропуснете влизането с код. (Вход в Mastodon от Windows или macOS) (Препоръчително: pcheck)",
"codesetup": "Настройка на код", "codesetup": "Настройка на код",
"mainacct": "Основен профил", "mainacct": "Основен профил",
@@ -20,6 +19,5 @@
"thisismisskey": "Влезте като Misskey", "thisismisskey": "Влезте като Misskey",
"misskeylogin": "Прочетете <a href=\"https://thedesk.top/how-to-misskey-login.html\">Документацията</a>, за да влезете в Misskey.", "misskeylogin": "Прочетете <a href=\"https://thedesk.top/how-to-misskey-login.html\">Документацията</a>, за да влезете в Misskey.",
"nodata": "Няма данни", "nodata": "Няма данни",
"accessTokenSetup": "Използвайте маркера за достъп и вход (щракнете след попълване, но не код, а знак за достъп в поле: Разширено)", "accessTokenSetup": "Използвайте маркера за достъп и вход (щракнете след попълване, но не код, а знак за достъп в поле: Разширено)"
"haveExported": "Having the exported file of TheDesk, click here to jump setting page"
} }

View File

@@ -1,8 +1,6 @@
{ {
"draghere": "Плъзнете тук за да качите", "draghere": "Плъзнете тук за да качите",
"close": "Затвори", "close": "Затвори",
"webSrc": "Search on Web",
"tsSrc": "Search on tootsearch",
"showSelectProf": "Показване на профила на избрания акаунт", "showSelectProf": "Показване на профила на избрания акаунт",
"closethisbox": "Затвори полето", "closethisbox": "Затвори полето",
"toot": "Тоот", "toot": "Тоот",
@@ -11,6 +9,8 @@
"cwDes": "Скриване на текста зад предупреждение", "cwDes": "Скриване на текста зад предупреждение",
"selfile": "Прикачи..", "selfile": "Прикачи..",
"insertEmoji": "Емотикони", "insertEmoji": "Емотикони",
"NPSpotify": "Възпроизвеждане сега (Spotify)",
"NPiTunes": "Възпроизвеждане сега (macOS)",
"schedule": "Планиран тоот", "schedule": "Планиран тоот",
"postat": "Публикация в", "postat": "Публикация в",
"scheduleWarn": "2.7.0 ~ Минимален интервал от време:5мин. (часовникът на сървъра може да не е точен.)", "scheduleWarn": "2.7.0 ~ Минимален интервал от време:5мин. (часовникът на сървъра може да не е точен.)",
@@ -20,8 +20,6 @@
"yes": "Да", "yes": "Да",
"temp": "Прикачени файлове", "temp": "Прикачени файлове",
"nothing": "Няма", "nothing": "Няма",
"stamp": "Stamp",
"stampWarn": "Your acct(aa@bb.cc) is printed on the right-bottom of the uploaded image",
"vis": "Регулирайте поверителността на състоянието", "vis": "Регулирайте поверителността на състоянието",
"cwtext": "Текст за предупреждение", "cwtext": "Текст за предупреждение",
"selectVis": "Регулирайте поверителността на състоянието", "selectVis": "Регулирайте поверителността на състоянието",
@@ -75,7 +73,6 @@
"toots": "Тоот", "toots": "Тоот",
"follow": "Следвам", "follow": "Следвам",
"follower": "Последователи", "follower": "Последователи",
"utlColumn": "Show as a column",
"timeline": "Времева линия", "timeline": "Времева линия",
"operateOtherAcct": "Свързан-профил", "operateOtherAcct": "Свързан-профил",
"list": "Списък", "list": "Списък",
@@ -139,7 +136,6 @@
"filterWord": "Филтриране на думи", "filterWord": "Филтриране на думи",
"degree": "Контекстно филтриране", "degree": "Контекстно филтриране",
"conver": "Разговори", "conver": "Разговори",
"prof": "Profiles",
"option": "Настройки", "option": "Настройки",
"matchWord": "Цяла дума", "matchWord": "Цяла дума",
"warnMatchWord": "Ница на латински език", "warnMatchWord": "Ница на латински език",
@@ -172,17 +168,16 @@
"contactwithlog": "Ако ми кажете за грешки (нещо не работи или подобно) с този дневник, мога по-лесно да открия какво не е наред.", "contactwithlog": "Ако ми кажете за грешки (нещо не работи или подобно) с този дневник, мога по-лесно да открия какво не е наред.",
"about": "За TheDesk", "about": "За TheDesk",
"hereAddColumns": "<- Добави ТЛ", "hereAddColumns": "<- Добави ТЛ",
"foundBug": "Намерена е грешка", "foundBug": "I found a bug",
"show": "Покажи", "show": "Покажи",
"directory": "Директория", "directory": "Директория",
"active": "Наскоро активен", "active": "Наскоро активен",
"newcomer": "Новодошли", "newcomer": "Новодошли",
"local_only": "Само местно", "local_only": "Само местно",
"menu": "Menu",
"demoBottomBtns": "Ръководство за добре дошли", "demoBottomBtns": "Ръководство за добре дошли",
"lookAtBottom": "Погледнете в края на този прозорец. Ето няколко съвета за това.", "lookAtBottom": "Погледнете в края на този прозорец. Ето няколко съвета за това.",
"acctManDesc": "Добавете още акаунти и излезте от тях.", "acctManDesc": "Добавете още акаунти и излезте от тях.",
"settingDesc": "Много. много предпочитания са тук. Няма да можете да ги проверите всички!", "settingDesc": "Много. много предпочитания са тук. Няма да можете да ги проверите всички!",
"nanoDescPlus": "Клиент мини прозорец (експериментално)", "nanoDescPlus": "Клиент мини прозорец (експериментално)",
"menuDesc": "All daily TheDesk and Mastodon tuning like <b>add and sort columns</b>, <b>list and filter check</b>." "listDesc": "Всички настройки на TheDesk и Mastodon, като <b> добавяне и сортиране на колони </b>, <b> списък и проверка на филтрите </b>."
} }

View File

@@ -48,7 +48,6 @@
"lang_manager_none": "Няма", "lang_manager_none": "Няма",
"lang_manager_godev": "Отворете DevCenter на Misskey. Ние показваме официални документи, на които се позоваваме.", "lang_manager_godev": "Отворете DevCenter на Misskey. Ние показваме официални документи, на които се позоваваме.",
"lang_manager_logout": "Излизане", "lang_manager_logout": "Излизане",
"lang_manager_maxChars": "Max chars of toots",
"lang_bbmd_misskey": "TheDesk разглежда \"@\" като отговор, но поставя друг параметър. Ако не е включено в Mastodon това означава, че е в Home на Misskey.", "lang_bbmd_misskey": "TheDesk разглежда \"@\" като отговор, но поставя друг параметър. Ако не е включено в Mastodon това означава, че е в Home на Misskey.",
"lang_emoji_get": "Вземи емотикони", "lang_emoji_get": "Вземи емотикони",
"lang_emoji_custom": "Персонализирани емотикони", "lang_emoji_custom": "Персонализирани емотикони",
@@ -60,8 +59,6 @@
"lang_postimg_delete": "Кликнете за да добавите описание, щракнете с десния бутон за да го изтриете", "lang_postimg_delete": "Кликнете за да добавите описание, щракнете с десния бутон за да го изтриете",
"lang_postimg_desc": "Описание", "lang_postimg_desc": "Описание",
"lang_postimg_leadContext": "щракнете с десния бутон върху миниатюрата за да изтриете това", "lang_postimg_leadContext": "щракнете с десния бутон върху миниатюрата за да изтриете това",
"lang_post_syncDetail": "Upload media synchronously",
"lang_post_syncDetailText": "Click each picture icon to get the thumbnail. If you can get, the media you uploaded are completely processed.",
"lang_post_tagTL": "Тази раздумка не съдържа маркер по подразбиране. Тази раздумка няма да се показва в локалния TL. Продължавате?", "lang_post_tagTL": "Тази раздумка не съдържа маркер по подразбиране. Тази раздумка няма да се показва в локалния TL. Продължавате?",
"lang_post_tagVis": "Тази раздумка (не е \"публична\") не е показана с този етикет в ТЛ.", "lang_post_tagVis": "Тази раздумка (не е \"публична\") не е показана с този етикет в ТЛ.",
"lang_post_cwtitle": "Авто CW Сигнал", "lang_post_cwtitle": "Авто CW Сигнал",
@@ -69,8 +66,6 @@
"lang_post_btn1": "Отказ (няма да се публикува)", "lang_post_btn1": "Отказ (няма да се публикува)",
"lang_post_btn2": "Текстът да се скрива автоматично", "lang_post_btn2": "Текстът да се скрива автоматично",
"lang_post_btn3": "Продължете към публикуването", "lang_post_btn3": "Продължете към публикуването",
"lang_post_unfinishedMedia": "The server has not finished processing your media. Retry.",
"lang_post_retry": "Retry",
"lang_status_favWarn": "Ще отнеме минута раздумката отдалечено да стане любима.", "lang_status_favWarn": "Ще отнеме минута раздумката отдалечено да стане любима.",
"lang_status_btWarn": "Ще отнеме минута раздумката отдалечено да бъде подсилена.", "lang_status_btWarn": "Ще отнеме минута раздумката отдалечено да бъде подсилена.",
"lang_status_follow": "Следване", "lang_status_follow": "Следване",
@@ -81,73 +76,71 @@
"lang_status_unmute": "Със звук", "lang_status_unmute": "Със звук",
"lang_status_redraftTitle": "Изтрий & върни", "lang_status_redraftTitle": "Изтрий & върни",
"lang_status_redraft": "Продължете да изтривате & преработвате? Ще изгубите статуса на тази раздумка. В тази функция може да се съдържат някои грешки. Снимките от тази раздумка ще бъдат изтрити на по-стари от Mastodon 2.4.1.", "lang_status_redraft": "Продължете да изтривате & преработвате? Ще изгубите статуса на тази раздумка. В тази функция може да се съдържат някои грешки. Снимките от тази раздумка ще бъдат изтрити на по-стари от Mastodon 2.4.1.",
"lang_status_emphas": "toots са подчертани. Моля, презаредете след това действие.", "lang_status_emphas": "'s toots are emphasized. Please reload after this action.",
"lang_status_unemphas": "toots не са подчертани. Моля, презаредете след това действие.", "lang_status_unemphas": "'s toots are not emphasized. Please reload after this action.",
"lang_status_unendorse": "Не присъства в профила", "lang_status_unendorse": "Not feature on profile",
"lang_status_endorse": "Функция в профила", "lang_status_endorse": "Функция в профила",
"lang_status_followers": "Последователи", "lang_status_followers": "Followers",
"lang_status_active": "Последно състояние", "lang_status_active": "Last status",
"lang_suggest_nodata": "Моля, вземете списък с емотикони за да покажете състояние.", "lang_suggest_nodata": "Please get emojis list in order to show suggestion.",
"lang_usetxtbox_reply": "Режим на отговор. Ctrl+Shift+C за изчистване.", "lang_usetxtbox_reply": "Reply Mode. Ctrl+Shift+C to clear.",
"lang_cards_check": " проверка", "lang_cards_check": " check",
"lang_cards_pip": "PiP режим", "lang_cards_pip": "PiP mode",
"lang_cards_trusted": "Доверен вграден HTML от TheDesk (Twitter, nicovideo, YouTube, Spotify, twitcasing)", "lang_cards_trusted": "Trusted embed HTML by TheDesk(Twitter, nicovideo, YouTube, Spotify, twitcasing)",
"lang_cards_untrusted": "Ненадеждно вграждане на HTML от TheDesk", "lang_cards_untrusted": "Untrusted embed HTML by TheDesk",
"lang_details_nodata": "Няма данни", "lang_details_nodata": "Няма данни",
"lang_details_filtered": "Филтриране на toot", "lang_details_filtered": "Filtered toot",
"lang_details_embed": "Вграденият HTML е изрязан.", "lang_details_embed": "Embed HTML is cliped.",
"lang_details_url": "URL адресът на този toot е изрязан.", "lang_details_url": "URL of this toot is cliped.",
"lang_details_txt": "Съдържанието на този toot е изрязано.", "lang_details_txt": "Content of this toot is cliped.",
"lang_filter_nodata": "Няма данни", "lang_filter_nodata": "Няма данни",
"lang_filter_errordegree": "Моля, проверете контекстта", "lang_filter_errordegree": "Please check a context",
"lang_list_nodata": "Няма данни", "lang_list_nodata": "Няма данни",
"lang_list_show": "Покажи", "lang_list_show": "Покажи",
"lang_list_users": "Списък с потребители", "lang_list_users": "Users list",
"lang_list_nouser": "Няма потребители в този списък.", "lang_list_nouser": "No users in this list.",
"lang_list_add": "Добавяне към списъка", "lang_list_add": "Add to the list",
"lang_list_add_misskey": "(може би този потребител е добавен)", "lang_list_add_misskey": "(perhaps this user has been listed)",
"lang_list_remove": "Премахване от списъка", "lang_list_remove": "Remove from the list",
"lang_notf_new": " нови известия", "lang_notf_new": " new notifications",
"lang_speech_refresh": "Запазване на стойността за конфигурацията на TTS", "lang_speech_refresh": "Save value about TTS config",
"lang_src_ts": "хронологичен ред", "lang_src_ts": "chronological order",
"lang_src_people": " хора toot", "lang_src_people": " people toot",
"lang_tags_always": "Винаги toots с ", "lang_tags_always": "Always toots with ",
"lang_tags_realtime": "Tag-поток toot", "lang_tags_realtime": "Tag-stream toot",
"lang_tags_tagunpin": "Разкачане на {{tag}}", "lang_tags_tagunpin": "Unpin {{tag}}",
"lang_tags_unrealtime": "Деактивиране на TsT", "lang_tags_unrealtime": "Disable TsT",
"lang_tags_tagwarn": "Автоматично попълване на {{tag}}, ако раздумката няма {{tag}}", "lang_tags_tagwarn": "Автоматично попълване на {{tag}}, ако раздумката няма {{tag}}",
"lang_tl_media": "Медия", "lang_tl_media": "Media",
"lang_tl_reconnect": "Свързване отново към API за стрийминг", "lang_tl_reconnect": "Reconnect to streaming API",
"lang_tl_postmarkers_title": "В процес...", "lang_tl_postmarkers_title": "Process...",
"lang_tl_postmarkers": "Данни за POST маркери. Моля изчакайте", "lang_tl_postmarkers": "POST markers data. Please wait",
"lang_img_DLDone": "Изтеглени:", "lang_img_DLDone": "Downloaded:",
"lang_img_copyDone": "Копирано: URL адреса на това изображение", "lang_img_copyDone": "Copied: URL of this image",
"lang_layout_gotop": "Върнете се в горната част на тази колона. Когато иконата е червена, означава че тази колона не може да свърже API за споделане. Моля, презаредете.", "lang_layout_gotop": "Go top of this column. When icon is red, this column cannot connect straming API. Please reload.",
"lang_layout_thisacct": "{{notf}} от този акаунт", "lang_layout_thisacct": "{{notf}} of this account",
"lang_layout_delthis": "Премахване на тази колона", "lang_layout_delthis": "Remove this column",
"lang_layout_setthis": "Предпочитания за тази колона", "lang_layout_setthis": "Preferences of this column",
"lang_layout_mediafil": "Филтриране на медиите", "lang_layout_mediafil": "Media filtering",
"lang_layout_remoteOnly": "Remote only", "lang_layout_linkana": "Auto Link Analyzer",
"lang_layout_linkana": "Автоматичен анализатор на връзки", "lang_layout_linkanades": "Auto link analyzer",
"lang_layout_linkanades": "Автоматичен анализатор на връзки", "lang_layout_tts": "Text to speech ",
"lang_layout_tts": "Текст към говор ",
"lang_layout_reconnect": "Reconnect to streaming API", "lang_layout_reconnect": "Reconnect to streaming API",
"lang_layout_headercolor": "Цвят на заглавката на тази колона", "lang_layout_headercolor": "Header color of this column",
"lang_layout_nodata": "[Няма данни]<br>F5/⌘+R за презареждане", "lang_layout_nodata": "[No data]<br>F5/⌘+R to reload",
"lang_layout_dm": "Директни съобщения", "lang_layout_dm": "Директни съобщения",
"lang_layout_webviewmode": "Предпочитания за WebView", "lang_layout_webviewmode": "Prefer WebView",
"lang_excluded": "Изключване на вид уведомление", "lang_excluded": "Excluded type of notification",
"lang_layout_excludingbt": "Показване в BT режим (ИЗКЛ./Изключване BT/ Само в BT)", "lang_layout_excludingbt": "Показване в BT режим (ИЗКЛ./Изключване BT/ Само в BT)",
"lang_layout_leftFold": "Стъпка наляво", "lang_layout_leftFold": "Стъпка наляво",
"lang_layout_leftUnfold": "Док отдясно", "lang_layout_leftUnfold": "Док отдясно",
"lang_layout_deleteColumn": "Премахване на тази колона", "lang_layout_deleteColumn": "Премахване на тази колона",
"lang_layout_deleteColumnDesc": "Премахване на тази колона", "lang_layout_deleteColumnDesc": "Премахване на тази колона",
"lang_layout_unread": "Непрочетени", "lang_layout_unread": "Unread",
"lang_layout_tagManager": "Мениджър на таговете на времевата линия", "lang_layout_tagManager": "Tag timeline manager",
"lang_layout_announ": "Announcement: the counter is the number of your unread announcements. If not shown, it means announcements are all marked as read.",
"lang_sort_gothis": "Отидете в тази колона", "lang_sort_gothis": "Отидете в тази колона",
"lang_sort_remthis": "Премахване на тази колона", "lang_sort_remthis": "Премахване на тази колона",
"lang_spotify_img": "Добавете към албум произведенията на изкуството", "lang_spotify_img": "Attach an album artwork",
"lang_spotify_imgno": "Not attach an album artwork", "lang_spotify_imgno": "Not attach an album artwork",
"lang_spotify_acct": "Connect TheDesk to Spotify", "lang_spotify_acct": "Connect TheDesk to Spotify",
"lang_spotify_np": "Готово:шаблон на NowPlaying", "lang_spotify_np": "Готово:шаблон на NowPlaying",
@@ -161,12 +154,10 @@
"lang_showontl_movebtn": "Continue on the new account", "lang_showontl_movebtn": "Continue on the new account",
"lang_showontl_botacct": "[bot]", "lang_showontl_botacct": "[bot]",
"lang_showontl_followed": "Following you", "lang_showontl_followed": "Following you",
"lang_parse_request": "Follow request",
"lang_showontl_notf": "Notification ", "lang_showontl_notf": "Notification ",
"lang_showontl_domain": "Domain ", "lang_showontl_domain": "Domain ",
"lang_showontl_listwarn": "Следвайте, за да добавите този потребител към списъците.", "lang_showontl_listwarn": "Следвайте, за да добавите този потребител към списъците.",
"lang_showontl_verified": "This website is verified by owner at ", "lang_showontl_verified": "This website is verified by owner at ",
"lang_status_requesting": "Requesting",
"lang_parse_mentioned": " replied to you", "lang_parse_mentioned": " replied to you",
"lang_parse_faved": " favourited your toot", "lang_parse_faved": " favourited your toot",
"lang_parse_bted": " boosted your toot", "lang_parse_bted": " boosted your toot",
@@ -174,7 +165,6 @@
"lang_parse_polled": "'s poll", "lang_parse_polled": "'s poll",
"lang_parse_notftime": "Actioned at", "lang_parse_notftime": "Actioned at",
"lang_parse_cwshow": "Покажи", "lang_parse_cwshow": "Покажи",
"lang_parse_cwshow_acc": "This is a post with content warning. click to show the whole content",
"lang_parse_fulltext": "Full size text:", "lang_parse_fulltext": "Full size text:",
"lang_parse_autofold": "Auto folded", "lang_parse_autofold": "Auto folded",
"lang_parse_more": "Още", "lang_parse_more": "Още",
@@ -203,39 +193,37 @@
"lang_parse_detail": "Details", "lang_parse_detail": "Details",
"lang_parse_redraft": "Изтрий & върни", "lang_parse_redraft": "Изтрий & върни",
"lang_parse_followed": "Followed you", "lang_parse_followed": "Followed you",
"lang_parse_moved": "Moved to...",
"lang_parse_clientop": "Operation of this client", "lang_parse_clientop": "Operation of this client",
"lang_parse_clienttxt": " will be", "lang_parse_clienttxt": " will be",
"lang_parse_clientno": "done nothing", "lang_parse_clientno": "done nothing",
"lang_parse_clientemp": "emphasized(/not emphasized)", "lang_parse_clientemp": "emphasized(/not emphasized)",
"lang_parse_clientmute": "без звук", "lang_parse_clientmute": "muted",
"lang_parse_mute": " ще бъдат заглушени. Можете да ги премахнете от предпочитания.", "lang_parse_mute": " will be muted. You can remove on preferences.",
"lang_parse_voted": "(Гласуваха)", "lang_parse_voted": "(Voted)",
"lang_parse_myvote": "(Моята собствена анкета)", "lang_parse_myvote": "(My own poll)",
"lang_parse_vote": "Гласували", "lang_parse_vote": "Vote",
"lang_parse_unvoted": "Показване на резултата без гласувалите", "lang_parse_unvoted": "Show the result without voting",
"lang_parse_endedvote": "Изтекъл", "lang_parse_endedvote": "Expired",
"lang_parse_people": "човека", "lang_parse_people": "people",
"lang_parse_thread": "Показване на нишката", "lang_parse_thread": "Show thread",
"lang_parse_unknown": "Прикачени файлове", "lang_parse_unknown": "Attached file",
"lang_parse_nsfw": "NSFW media", "lang_parse_nsfw": "NSFW media",
"lang_parse_html": "Показване на вграденият HTML код", "lang_parse_html": "Show embed HTML",
"lang_parse_notffilter": "Показване на известията от този потребител", "lang_parse_notffilter": "Show this user's notifications",
"lang_parse_hidden": "Unvisible quoted toot", "lang_misskeyparse_renote": "Repost",
"lang_misskeyparse_renote": "Повторно публикуване", "lang_misskeyparse_renoteqt": "Renote",
"lang_misskeyparse_renoteqt": "Повторна бележка", "lang_misskeyparse_reaction": "Reaction",
"lang_misskeyparse_reaction": "Реакция", "lang_misskeyparse_tagnostr": "No streaming API on Tag TLs",
"lang_misskeyparse_tagnostr": "Няма стрийминг API за TLs маркери", "lang_misskeyparse_listnostr": "No streaming API on List TLs",
"lang_misskeyparse_listnostr": "Няма стрийминг API за TLs списък",
"lang_misskeyparse_home": "Начало", "lang_misskeyparse_home": "Начало",
"lang_misskeyparse_followers": "Последователи", "lang_misskeyparse_followers": "Последователи",
"lang_misskeyparse_specified": "Посочен потребител", "lang_misskeyparse_specified": "Specified User",
"lang_misskeyparse_qt": "Misskey в режим повторна бележка (цитат):Ctrl + Shift + Enter за изчистване", "lang_misskeyparse_qt": "Misskey renote(quote) mode:Ctrl+Shift+Enter to clear",
"lang_misskeyparse_renoted": " повторно отбелязали на вашата следваща публикация.", "lang_misskeyparse_renoted": " renoted your following post.",
"lang_misskeyparse_quoted": " цитирали следващата ви публикация.", "lang_misskeyparse_quoted": " quoted your following post.",
"lang_misskeyparse_reacted": " реагирали на следващата ви публикация.", "lang_misskeyparse_reacted": " reacted your following post.",
"lang_setting_time": "Времеви формат:{{set}}", "lang_setting_time": "Time format:{{set}}",
"lang_setting_theme": "Тема:{{set}}", "lang_setting_theme": "Theme:{{set}}",
"lang_setting_nsfw": "NSFW:{{set}}", "lang_setting_nsfw": "NSFW:{{set}}",
"lang_setting_cw": "CW:{{set}}", "lang_setting_cw": "CW:{{set}}",
"lang_setting_cwtext": "Default CW text:{{set}}", "lang_setting_cwtext": "Default CW text:{{set}}",

View File

@@ -4,15 +4,12 @@
"yes": "Да", "yes": "Да",
"no": "Не", "no": "Не",
"none": "Няма", "none": "Няма",
"show": "Покажи",
"hide": "Hide",
"default": "По подразбиране", "default": "По подразбиране",
"change": "Промяна", "change": "Промяна",
"select": "Избери", "select": "Избери",
"env": "Системни предпочитания", "env": "Системни предпочитания",
"setlang": "Езици", "setlang": "Езици",
"backup": "Внос и износ на предпочитания", "backup": "Внос и износ на предпочитания",
"backupWarn": "If you got a error when you choose the file, please paste the strings printed when you open the file and click import",
"import": "Внос", "import": "Внос",
"export": "Износ", "export": "Износ",
"hardwareAcceleration": "Деактивиране на хардуерното ускорение", "hardwareAcceleration": "Деактивиране на хардуерното ускорение",
@@ -36,12 +33,7 @@
"savefolderwarn": "TheDesk ще използва това местоназначение, когато се опитва да запази снимки или да прави екранни снимки.", "savefolderwarn": "TheDesk ще използва това местоназначение, когато се опитва да запази снимки или да прави екранни снимки.",
"useragent": "User agent", "useragent": "User agent",
"useragentWarn": "Restart when changed", "useragentWarn": "Restart when changed",
"frame": "Window frame",
"frameWarn": "If 'off', the window looks cool.",
"downloadWin": "Versioning(o Windows downloader)",
"absolute": "абсолютна стойност", "absolute": "абсолютна стойност",
"srcUrl": "Search engine",
"srcUrlWarn": "{q} will be replaced to query.",
"themeSel": "Изберете тема", "themeSel": "Изберете тема",
"customtheme": "Редактирайте и добавете персонализирани теми", "customtheme": "Редактирайте и добавете персонализирани теми",
"customthemeDirection": "Цветова схема", "customthemeDirection": "Цветова схема",
@@ -145,8 +137,6 @@
"nothing": "Hidden", "nothing": "Hidden",
"localonly": "Local Only", "localonly": "Local Only",
"zeroWidthEmoji": "Zero-width space when inserting emojis", "zeroWidthEmoji": "Zero-width space when inserting emojis",
"uploadCrop": "Auto scale to fit",
"uploadCropWarn": "Max long-side px. Uploaded images are converted to JPEG(from JPEG) or PNG(from others). Set 0 and the images will not be resized. Notice: if you post an animated picture like GIF, it will be converted static one.",
"keysc": "Keyboard shortcut Preferences", "keysc": "Keyboard shortcut Preferences",
"iks": "Easy inserter", "iks": "Easy inserter",
"okswarn": "Можете да вмъкнете всякакви букви и емотикони само с 3 клавиша", "okswarn": "Можете да вмъкнете всякакви букви и емотикони само с 3 клавиша",
@@ -167,15 +157,12 @@
"linkwarn": "TheDesk save your data on thedesk.top server.", "linkwarn": "TheDesk save your data on thedesk.top server.",
"connect": "Connect", "connect": "Connect",
"disconnect": "Disconnect", "disconnect": "Disconnect",
"lastFmWarn": "User name...(empty to disconnect) You cannot hide your recent play log at last.fm privacy settings.",
"templateedit": "Edit a template", "templateedit": "Edit a template",
"templateeditwarn": "", "templateeditwarn": "",
"template1": "Spotify:{song}:Song name/{album}:Album name/{artist}:Artist name/{url}:URL to Spotify", "template1": "Spotify:{song}:Song name/{album}:Album name/{artist}:Artist name/{url}:URL to Spotify",
"template2": "macOS:{song}:Song name/{album}:Album name/{artist}:Artist name/composer:{composer}/spampling rate:{hz}/bit rate:{bitRate}/genre:{genre}", "template2": "macOS:{song}:Song name/{album}:Album name/{artist}:Artist name/composer:{composer}/spampling rate:{hz}/bit rate:{bitRate}/genre:{genre}",
"template3": "", "template3": "",
"postartwork": "Attach an Artwork of Spotify", "postartwork": "Attach an Artwork of Spotify",
"searchArtwork": "If the song has no artwork, automatic complete it(macOS)",
"searchArtworkWarn": "If you nowplaying an non-artwork song, get one which seems nice through API. If you do not like the completed artwork, you can right-click it to delete.",
"tts": "TTS(text to speech) Preferences", "tts": "TTS(text to speech) Preferences",
"bouyomi": "BouyomiChan connect", "bouyomi": "BouyomiChan connect",
"bouyomiWarn": "Require: BouyomiChan WebSocket Plugin", "bouyomiWarn": "Require: BouyomiChan WebSocket Plugin",

View File

@@ -169,11 +169,10 @@
"active": "Recently active", "active": "Recently active",
"newcomer": "New arrivals", "newcomer": "New arrivals",
"local_only": "Local only", "local_only": "Local only",
"menu": "Menu",
"demoBottomBtns": "Welcome guide", "demoBottomBtns": "Welcome guide",
"lookAtBottom": "Look at the bottom of this window. Here is some tips about it.", "lookAtBottom": "Look at the bottom of this window. Here is some tips about it.",
"acctManDesc": "Add more accounts and logout them.", "acctManDesc": "Add more accounts and logout them.",
"settingDesc": "Many and many preferences here. You will couldn't check it all!", "settingDesc": "Many and many preferences here. You will couldn't check it all!",
"nanoDescPlus": "Mini window client(experimental)", "nanoDescPlus": "Mini window client(experimental)",
"menuDesc": "All daily TheDesk and Mastodon tuning like <b>add and sort columns</b>, <b>list and filter check</b>." "listDesc": "All daily TheDesk and Mastodon tuning like <b>add and sort columns</b>, <b>list and filter check</b>."
} }

View File

@@ -2,7 +2,6 @@
"list": "List of accounts", "list": "List of accounts",
"back": "Back", "back": "Back",
"add": "Add an account", "add": "Add an account",
"addAcct": "Fill the instance domain (like mastodon.social)",
"codesetupwarn": "Uncheck it to skip pasiting code.(login to Mastodon on Windows or macOS) (Recommended: pcheck)", "codesetupwarn": "Uncheck it to skip pasiting code.(login to Mastodon on Windows or macOS) (Recommended: pcheck)",
"codesetup": "Code setup", "codesetup": "Code setup",
"mainacct": "Main an account", "mainacct": "Main an account",
@@ -20,6 +19,5 @@
"thisismisskey": "Login as Misskey", "thisismisskey": "Login as Misskey",
"misskeylogin": "Read <a href=\"https://thedesk.top/how-to-misskey-login.html\">Docs(ja)</a> to login Misskey.", "misskeylogin": "Read <a href=\"https://thedesk.top/how-to-misskey-login.html\">Docs(ja)</a> to login Misskey.",
"nodata": "No data", "nodata": "No data",
"accessTokenSetup": "Use access token to login(click after fill not code but access-token in box: Advanced)", "accessTokenSetup": "Use access token to login(click after fill not code but access-token in box: Advanced)"
"haveExported": "Having the exported file of TheDesk, click here to jump setting page"
} }

View File

@@ -1,8 +1,6 @@
{ {
"draghere": "Drag here to upload", "draghere": "Drag here to upload",
"close": "Close", "close": "Close",
"webSrc": "Search on Web",
"tsSrc": "Search on tootsearch",
"showSelectProf": "Show profile of the selecting account", "showSelectProf": "Show profile of the selecting account",
"closethisbox": "Close this box", "closethisbox": "Close this box",
"toot": "Toot", "toot": "Toot",
@@ -11,6 +9,8 @@
"cwDes": "Hide text behind warning", "cwDes": "Hide text behind warning",
"selfile": "Attach..", "selfile": "Attach..",
"insertEmoji": "Emojis", "insertEmoji": "Emojis",
"NPSpotify": "NowPlaying(Spotify)",
"NPiTunes": "NowPlaying(macOS)",
"schedule": "Scheduled toot", "schedule": "Scheduled toot",
"postat": "Post at", "postat": "Post at",
"scheduleWarn": "2.7.0~ Minimum time gap:5min(clock on the server may not be accurate.)", "scheduleWarn": "2.7.0~ Minimum time gap:5min(clock on the server may not be accurate.)",
@@ -20,8 +20,6 @@
"yes": "Yes", "yes": "Yes",
"temp": "Attaching files", "temp": "Attaching files",
"nothing": "None", "nothing": "None",
"stamp": "Stamp",
"stampWarn": "Your acct(aa@bb.cc) is printed on the right-bottom of the uploaded image",
"vis": "Adjust status privacy", "vis": "Adjust status privacy",
"cwtext": "Warning text", "cwtext": "Warning text",
"selectVis": "Adjust status privacy", "selectVis": "Adjust status privacy",
@@ -75,7 +73,6 @@
"toots": "Toots", "toots": "Toots",
"follow": "Follow", "follow": "Follow",
"follower": "Follower", "follower": "Follower",
"utlColumn": "Show as a column",
"timeline": "Timeline", "timeline": "Timeline",
"operateOtherAcct": "Cross-account", "operateOtherAcct": "Cross-account",
"list": "List", "list": "List",
@@ -139,7 +136,6 @@
"filterWord": "Filtering words", "filterWord": "Filtering words",
"degree": "Filter contexts", "degree": "Filter contexts",
"conver": "Conversations", "conver": "Conversations",
"prof": "Profiles",
"option": "Options", "option": "Options",
"matchWord": "Whole word", "matchWord": "Whole word",
"warnMatchWord": "Nice for Latin language", "warnMatchWord": "Nice for Latin language",
@@ -178,11 +174,10 @@
"active": "Recently active", "active": "Recently active",
"newcomer": "New arrivals", "newcomer": "New arrivals",
"local_only": "Local only", "local_only": "Local only",
"menu": "Menu",
"demoBottomBtns": "Welcome guide", "demoBottomBtns": "Welcome guide",
"lookAtBottom": "Look at the bottom of this window. Here is some tips about it.", "lookAtBottom": "Look at the bottom of this window. Here is some tips about it.",
"acctManDesc": "Add more accounts and logout them.", "acctManDesc": "Add more accounts and logout them.",
"settingDesc": "Many and many preferences here. You will couldn't check it all!", "settingDesc": "Many and many preferences here. You will couldn't check it all!",
"nanoDescPlus": "Mini window client(experimental)", "nanoDescPlus": "Mini window client(experimental)",
"menuDesc": "All daily TheDesk and Mastodon tuning like <b>add and sort columns</b>, <b>list and filter check</b>." "listDesc": "All daily TheDesk and Mastodon tuning like <b>add and sort columns</b>, <b>list and filter check</b>."
} }

Some files were not shown because too many files have changed in this diff Show More