Compare commits

...

179 Commits

Author SHA1 Message Date
Cutls
f843872a14 travis final 2019-05-27 02:59:57 +09:00
Cutls
b365b9d15b travis 19 2019-05-27 02:40:48 +09:00
Cutls
938ff926c3 travis 18 2019-05-27 02:28:08 +09:00
Cutls
7a1a6354df travis 17 2019-05-27 02:21:40 +09:00
Cutls
37e9d8242b travis 16 2019-05-27 02:19:09 +09:00
Cutls
8bf03f2809 travis 2019-05-27 02:02:37 +09:00
Cutls
c684a5b0d0 travis 16 2019-05-27 01:40:07 +09:00
Cutls
3281461809 travis 15 2019-05-27 01:38:52 +09:00
Cutls
2cd5cf505d travis 14 2019-05-27 01:34:26 +09:00
Cutls
42334450bf travis 14 2019-05-27 01:24:00 +09:00
Cutls
410633c873 travis 14 2019-05-27 01:18:44 +09:00
Cutls
ee67baf0b4 travis 13 2019-05-27 01:17:15 +09:00
Cutls
7afa959e6c travis 12 2019-05-27 00:45:26 +09:00
Cutls
ca0db95910 travis 11 2019-05-27 00:41:34 +09:00
Cutls
9825a84880 travis 11 2019-05-27 00:33:30 +09:00
Cutls
68260f3d85 travis 10 2019-05-27 00:22:50 +09:00
Cutls
d25fcfadc1 travis 9 2019-05-27 00:10:12 +09:00
Cutls
7059c1bb31 travis 9 2019-05-26 23:59:38 +09:00
Cutls
a4ac0af6e1 travis 8 2019-05-26 23:56:16 +09:00
Cutls
205a3bea44 travis 7 2019-05-26 23:55:16 +09:00
Cutls
748a69b3bd travis 6 2019-05-26 23:42:35 +09:00
Cutls
be36c3dd0b travis run all test 2019-05-26 23:40:03 +09:00
Cutls
13384ed93f travis final 2019-05-26 22:56:37 +09:00
Cutls
92b8a36019 travis windows 2 2019-05-26 22:43:08 +09:00
Cutls
225786e07f travis win 2019-05-26 22:40:37 +09:00
Cutls
8c8cf44ed6 travis 6 2019-05-26 22:22:45 +09:00
Cutls
c3e6e657c9 travis 5 2019-05-26 22:16:16 +09:00
Cutls
04185ea07b travis 4 2019-05-26 22:09:00 +09:00
Cutls
49794e05d0 travis 3 2019-05-26 21:58:31 +09:00
Cutls
b2be1a7bcc travis 2 2019-05-26 21:53:33 +09:00
Cutls
2d167c9c2e travis 1 2019-05-26 21:46:26 +09:00
Cutls
5251ba9b3f update README 2019-05-26 20:57:42 +09:00
Cutls
df443003e4 travis 2019-05-26 20:49:49 +09:00
Cutls
3719b1ed40 travis 2019-05-26 20:47:07 +09:00
Cutls
d4a246ea59 Merge pull request #80 from cutls/WIP-(before-CI)
Wip (before ci)
2019-05-26 20:44:18 +09:00
Cutls
c77b0f5924 Merge branch 'master' into WIP-(before-CI) 2019-05-26 20:44:09 +09:00
Cutls
bb1165ecf9 Merge branch 'WIP-(before-CI)' of https://github.com/cutls/TheDesk into WIP-(before-CI) 2019-05-26 20:43:15 +09:00
Cutls
93d2e8e0d5 Update to Usamin (18.5.0) 2019-05-26 20:42:52 +09:00
Cutls
b0db765f25 Update FUNDING.yml 2019-05-25 16:43:13 +09:00
Cutls
68a3786fb8 Create FUNDING.yml 2019-05-25 14:53:51 +09:00
Cutls
9103ba6af1 Merge pull request #75 from cutls/dependabot/npm_and_yarn/app/WIP-(before-CI)/jimp-0.6.4
Bump jimp from 0.2.28 to 0.6.4 in /app
2019-05-25 13:22:24 +09:00
Cutls
dd8e89234c Fix TheDesk Oshirase 2019-05-22 23:39:55 +09:00
Cutls
bcb358cc8b Merge pull request #77 from kPherox/fix-hidden-timeline-scroll-bottom
Fix the hidden last of the timeline
2019-05-22 07:45:17 +09:00
kPherox
f42c59669f refs cutls#11 Fix the hidden last of the timeline
- 通知TLを一番下までスクロールしても最後の投稿の全文が見えない。(「アクションメニューを非表示」は「いいえ」にしてある)
2019-05-22 02:02:30 +09:00
dependabot[bot]
d656860b2e Bump jimp from 0.2.28 to 0.6.4 in /app
Bumps [jimp](https://github.com/oliver-moran/jimp) from 0.2.28 to 0.6.4.
- [Release notes](https://github.com/oliver-moran/jimp/releases)
- [Commits](https://github.com/oliver-moran/jimp/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-21 15:55:10 +00:00
Cutls
30744e402a Merge pull request #76 from cutls/dependabot/npm_and_yarn/app/WIP-(before-CI)/electron-builder-20.40.2
Bump electron-builder from 20.39.0 to 20.40.2 in /app
2019-05-22 00:53:36 +09:00
Cutls
43bac6f3e6 Add: notification filter by user (for head) 2019-05-22 00:00:54 +09:00
dependabot[bot]
dae4371a3f Bump electron-builder from 20.39.0 to 20.40.2 in /app
Bumps [electron-builder](https://github.com/electron-userland/electron-builder) from 20.39.0 to 20.40.2.
- [Release notes](https://github.com/electron-userland/electron-builder/releases)
- [Changelog](https://github.com/electron-userland/electron-builder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/electron-userland/electron-builder/compare/v20.39.0...v20.40.2)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-20 20:21:58 +00:00
Cutls
990c2f796e Fix acct-select-box 2019-05-20 22:34:58 +09:00
Cutls
89c3a4f8b1 Delete some 2019-05-20 08:41:24 +09:00
Cutls
ca12884735 WIP: Introduce Electron 5.0.1 2019-05-19 19:24:27 +09:00
Cutls
07e907b599 Add: Astarte marquee BBCode 2019-05-19 18:31:47 +09:00
Cutls
e0bdd1e0b2 japanese README 2019-05-19 18:21:54 +09:00
Cutls
595b1a3c62 reverse 2019-05-19 17:57:07 +09:00
Cutls
236392299b add screenshot 2019-05-19 17:54:04 +09:00
Cutls
418b2e7668 check2 2019-05-19 17:38:46 +09:00
Cutls
052694dbde test readme 2019-05-19 17:30:15 +09:00
Cutls
d529a105c5 Merge branch 'WIP-(before-CI)' of https://github.com/cutls/TheDesk into WIP-(before-CI) 2019-05-19 17:01:18 +09:00
Cutls
40d877682b check dependa 2019-05-19 17:01:15 +09:00
Cutls
5e324f19ae Merge pull request #72 from cutls/dependabot/npm_and_yarn/app/WIP-(before-CI)/vue-2.6.10
Bump vue from 2.6.9 to 2.6.10 in /app
2019-05-19 17:00:45 +09:00
Cutls
9d8b9cbd04 Merge pull request #71 from cutls/dependabot/npm_and_yarn/app/WIP-(before-CI)/electron-dl-1.14.0
Bump electron-dl from 1.11.0 to 1.14.0 in /app
2019-05-19 17:00:35 +09:00
dependabot[bot]
54e5180732 Bump vue from 2.6.9 to 2.6.10 in /app
Bumps [vue](https://github.com/vuejs/vue) from 2.6.9 to 2.6.10.
- [Release notes](https://github.com/vuejs/vue/releases)
- [Commits](https://github.com/vuejs/vue/compare/v2.6.9...v2.6.10)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-19 08:00:07 +00:00
Cutls
dbf959782f Merge pull request #70 from cutls/dependabot/npm_and_yarn/app/WIP-(before-CI)/tar-4.4.8
[Security] Bump tar from 2.2.1 to 4.4.8 in /app
2019-05-19 16:58:43 +09:00
Cutls
33114ca3c8 Merge pull request #74 from cutls/dependabot/npm_and_yarn/app/WIP-(before-CI)/sumchecker-3.0.0
Bump sumchecker from 2.0.2 to 3.0.0 in /app
2019-05-19 16:56:54 +09:00
dependabot[bot]
4c2aebc7c1 Bump sumchecker from 2.0.2 to 3.0.0 in /app
Bumps [sumchecker](https://github.com/malept/sumchecker) from 2.0.2 to 3.0.0.
- [Release notes](https://github.com/malept/sumchecker/releases)
- [Changelog](https://github.com/malept/sumchecker/blob/master/NEWS.md)
- [Commits](https://github.com/malept/sumchecker/compare/v2.0.2...v3.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-19 07:56:12 +00:00
Cutls
b51470f999 Merge pull request #73 from cutls/dependabot/npm_and_yarn/app/WIP-(before-CI)/node-notifier-5.4.0
Bump node-notifier from 5.2.1 to 5.4.0 in /app
2019-05-19 16:54:43 +09:00
Cutls
b2be5f3706 become a patreon 2019-05-19 16:54:23 +09:00
Cutls
06eb347cf8 More prettier 2019-05-19 16:39:30 +09:00
dependabot[bot]
81c5c1d86a Bump node-notifier from 5.2.1 to 5.4.0 in /app
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 5.2.1 to 5.4.0.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v5.2.1...v5.4.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-19 07:13:55 +00:00
dependabot[bot]
82858b7b92 Bump electron-dl from 1.11.0 to 1.14.0 in /app
Bumps [electron-dl](https://github.com/sindresorhus/electron-dl) from 1.11.0 to 1.14.0.
- [Release notes](https://github.com/sindresorhus/electron-dl/releases)
- [Commits](https://github.com/sindresorhus/electron-dl/compare/v1.11.0...v1.14.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-19 07:12:59 +00:00
dependabot[bot]
b3506aec3c [Security] Bump tar from 2.2.1 to 4.4.8 in /app
Bumps [tar](https://github.com/npm/node-tar) from 2.2.1 to 4.4.8. **This update includes security fixes.**
- [Release notes](https://github.com/npm/node-tar/releases)
- [Commits](https://github.com/npm/node-tar/compare/v2.2.1...v4.4.8)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-19 07:12:56 +00:00
Cutls
de6e9c6f11 Update SHA256 lib 2019-05-19 15:47:45 +09:00
Cutls
d3ff1aa17a Debug 2019-05-19 15:17:05 +09:00
Cutls
3cde6d0bff Improved: attached video on Pleroma 2019-05-16 00:17:47 +09:00
Cutls
bfade31849 Add link to unknown media 2019-05-16 00:11:09 +09:00
Cutls
3a06820f1e Fix: follow request 2019-05-16 00:01:54 +09:00
Cutls
c5f712359d Merge pull request #68 from cutls/WIP-(before-CI)
18.4.0
2019-05-11 01:36:07 +09:00
Cutls
c9cca85db3 Add features 2019-05-11 01:32:54 +09:00
Cutls
07b203b719 TheDesk Usamin (18.4.0) 2019-05-11 01:31:15 +09:00
Cutls
a636c745e4 Add: follow request auth/reject 2019-05-09 00:46:26 +09:00
Cutls
e9024312a7 Fix: some Misskey bugs about reaction 2019-05-09 00:31:05 +09:00
Cutls
edbe3c164f Add: Misskey v11 streaming method 2019-05-08 00:48:59 +09:00
Cutls
8991cb5a96 Add: NSFW notice 2019-05-07 22:43:30 +09:00
Cutls
b4aa5aead5 Merge pull request #67 from cutls/WIP-(before-CI)
TheDesk Usamin (18.3.3)
2019-05-07 00:45:08 +09:00
Cutls
873a8fd229 fix typo 2019-05-07 00:44:04 +09:00
Cutls
d0ddc58160 TheDesk Usamin (18.3.3) 2019-05-07 00:43:21 +09:00
Cutls
6eebfed609 get blurhash 2019-05-07 00:42:06 +09:00
Cutls
09b7b8633e Merge pull request #66 from cutls/WIP-(before-CI)
TheDesk Usaimin (18.3.2)
2019-05-06 19:36:08 +09:00
Cutls
c93326d218 Add notestock notice 2019-05-06 19:34:49 +09:00
Cutls
a03c5c0ecf TheDesk Usain (18.3.2) 2019-05-06 19:31:28 +09:00
Cutls
0380251294 Check vulnerability 2019-05-06 19:30:05 +09:00
Cutls
d8f857e05d TheDesk Usamin (18.3.2) 2019-05-06 19:15:54 +09:00
Cutls
7a06a2b192 Add: min_id TL 2019-05-06 19:10:03 +09:00
Cutls
771db8c3ad Notestock 2019-05-06 01:28:00 +09:00
Cutls
9a800639e6 Custom emojis' marign 2019-05-06 01:27:54 +09:00
Cutls
550c7b1805 change to cutls.com from kirishima.cloud 2019-05-03 01:08:46 +09:00
Cutls
ad7c7ffa66 Fix: flag emojis #64 2019-05-03 00:51:10 +09:00
Cutls
57978bd152 TheDesk Minami💛(announce) 2019-04-25 01:10:49 +09:00
Cutls
5cd72a538c add note 2019-04-22 23:19:34 +09:00
Cutls
d439169c63 Merge pull request #61 from kPherox/fix-integrated-tl-reconnect-streaming
Fix integrated tl reconnect streaming
2019-04-22 23:18:12 +09:00
Cutls
da39e0ded6 package 2019-04-22 23:17:46 +09:00
Cutls
823fae5eac TheDesk Usamin (18.3.1) 2019-04-22 23:16:57 +09:00
kPherox
4f3a7c47e3 Change console log level 2019-04-22 03:33:56 +09:00
kPherox
bd8d480e07 Check error count on integrated tl 2019-04-22 03:31:14 +09:00
kPherox
a09c031dbe Add type integrated to reconnector 2019-04-22 03:26:57 +09:00
kPherox
1fee94846d Fix typo 2019-04-22 02:02:23 +09:00
Cutls
4fb37525d5 Merge branch 'WIP-(before-CI)' of https://github.com/cutls/TheDesk into WIP-(before-CI) 2019-04-22 01:51:42 +09:00
Cutls
8f25557f20 wip 2019-04-22 01:51:32 +09:00
Cutls
cb47eabed9 Merge pull request #60 from kPherox/fix-poll-vote-button
Fix poll vote button
2019-04-22 01:50:29 +09:00
kPherox
f8823a4c5a Fix bug that deleting the vote button 2019-04-22 01:34:50 +09:00
kPherox
7fdd5964cc Fix lang_parse_vote for en 2019-04-22 01:00:20 +09:00
Cutls
3aadcaef0f add some notifications sound 2019-04-20 23:40:12 +09:00
Cutls
f58d4f349b TheDesk Usamin (18.3.0) 2019-04-20 00:59:31 +09:00
Cutls
9bb8ec0b66 some security update 2019-04-19 23:02:30 +09:00
Cutls
ec9a14d63b custom emojis when poll 2019-04-16 01:38:29 +09:00
Cutls
82a00f4d1e security 2019-04-16 01:29:44 +09:00
Cutls
af97f88d0a sound 2019-04-15 00:45:04 +09:00
Cutls
e27351481b Merge pull request #58 from cutls/WIP-(before-CI)
Wip (before ci)
2019-04-14 18:58:33 +09:00
Cutls
4c375e2d0a travis 2019-04-14 18:58:12 +09:00
Cutls
53cd49d4e8 travis 2019-04-14 18:55:30 +09:00
Cutls
e36942180e restart 2019-04-14 03:48:44 +09:00
Cutls
6b58c88118 travis 2019-04-14 03:46:15 +09:00
Cutls
d20777ed18 travis 2019-04-14 03:45:30 +09:00
Cutls
202e389c20 travis 2019-04-14 03:38:07 +09:00
Cutls
707a5b2033 change travis 2019-04-14 03:31:19 +09:00
Cutls
0967c93dde Merge pull request #57 from cutls/WIP-(before-CI)
Wip (before ci)
2019-04-14 03:26:44 +09:00
Cutls
b13849a427 readme 2019-04-14 03:26:19 +09:00
Cutls
d0322c7bda TheDesk Usamin (18.2.3) 2019-04-14 03:22:16 +09:00
Cutls
494a4e90d6 fix some undif 2019-04-14 03:06:59 +09:00
Cutls
d1968a2e69 Merge pull request #56 from cutls/mac
miss
2019-04-14 01:43:57 +09:00
Cutls
51e6909f77 #64 fix 2019-04-14 01:42:49 +09:00
Cutls
cec46faf19 keybase 2019-04-14 01:42:18 +09:00
Cutls
53f880ab97 Merge pull request #55 from kPherox/fix-nowplaying-for-asar-packed
Fix nowplaying for asar packed
2019-04-14 01:41:30 +09:00
kPherox
cc20b0a7c0 Replace promise to async/await 2019-04-14 01:33:00 +09:00
kPherox
efac88db4c Change to pass error on itunes-np 2019-04-14 01:32:16 +09:00
Cutls
2e1c076b5f Merge pull request #53 from kPherox/update-package
Update package
2019-04-14 00:36:19 +09:00
kPherox
5a03df6ee9 Change itunes-nowplaying-mac pull request number 2019-04-14 00:13:57 +09:00
kPherox
ade5893183 Unpack asar for itunes-nowplaying-mac 2019-04-14 00:12:35 +09:00
kPherox
8a17e737f9 Add npm scripts for build
Update README.md#buildビルド

初回のcloneするときの流れを修正してからnpm scriptsを利用するように書き換え
2019-04-14 00:09:35 +09:00
kPherox
94c1ff3731 Replace dev dependency electron-packager to electron-builder
Some package update
2019-04-13 23:34:10 +09:00
Cutls
4e5fe2fc91 proof lang 2019-04-13 12:51:54 +09:00
Cutls
f88ed31e38 Add keybase 2019-04-13 12:41:58 +09:00
Cutls
7df51c161b mac 18.2.2 2019-04-13 03:55:05 +09:00
Cutls
b5d1686c12 update package 2019-04-13 02:32:42 +09:00
Cutls
a1048b3243 to linux 2019-04-13 02:31:07 +09:00
Cutls
f9090e261d travis 2019-04-13 02:21:21 +09:00
Cutls
4029f168df readme 2019-04-13 01:55:01 +09:00
Cutls
7965e7c742 pavkage 2019-04-13 01:54:33 +09:00
Cutls
932e6731c9 readme package 2019-04-13 01:49:22 +09:00
Cutls
3c3eb5209b readme 2019-04-13 01:48:26 +09:00
Cutls
a07d6b3172 Merge pull request #52 from cutls/WIP-(before-CI)
travis
2019-04-12 23:39:54 +09:00
Cutls
253f742332 travis 2019-04-12 23:39:28 +09:00
Cutls
35e262293d Merge pull request #51 from cutls/WIP-(before-CI)
Wip (before ci)
2019-04-12 23:37:14 +09:00
Cutls
972ea9f5ed travjs 2019-04-12 23:36:16 +09:00
Cutls
0c1191e362 travis 2019-04-12 23:35:48 +09:00
Cutls
426e48325c osx 2019-04-12 23:35:22 +09:00
Cutls
6c86825732 update travis 2019-04-12 23:33:36 +09:00
Cutls
e0cae78827 Merge pull request #50 from cutls/WIP-(before-CI)
Wip (before ci)
2019-04-12 23:32:37 +09:00
Cutls
09d3643b19 travis 2019-04-12 23:32:14 +09:00
Cutls
ed93d5b4f2 ul 2019-04-12 23:30:59 +09:00
Cutls
f0d7d84f8e travis update 2019-04-12 23:29:30 +09:00
Cutls
05fab4c45c Change 2019-04-12 23:26:38 +09:00
Cutls
3059ec9941 Merge pull request #49 from cutls/WIP-(before-CI)
Wip (before ci)
2019-04-12 23:20:26 +09:00
Cutls
892872869b TheDesk Usamin (18.2.1) 2019-04-12 23:19:27 +09:00
Cutls
0db7ed4a33 TheDesk Usamin (18.2.1) 2019-04-12 23:14:38 +09:00
Cutls
54e12db08b Fix XSS 2019-04-12 23:12:57 +09:00
Cutls
6fb90f0c8e Merge pull request #48 from cutls/WIP-(before-CI)
TheDesk Usamin (18.2.0)
2019-04-11 17:13:20 +09:00
Cutls
5f3257a83b TheDesk Usamin (18.2.0) 2019-04-11 17:11:26 +09:00
Cutls
f333595817 WIP: done some ToDo 2019-04-11 12:52:38 +09:00
Cutls
cc1018c65d next ver 2019-04-11 03:11:03 +09:00
Cutls
1c16a5f4a0 WIP done some ToDO 2019-04-11 02:59:13 +09:00
Cutls
0ad7bf9036 WIP some ToDo 2019-04-11 01:52:01 +09:00
Cutls
1670c0bc08 ToDo: done: ts column/menu .active/ about 2019-04-09 23:12:11 +09:00
Cutls
f1c4276d06 Add list on misskey 2019-04-08 00:14:06 +09:00
Cutls
50bfbbd755 Merge pull request #47 from kPherox/fix-reopen-macos
Fix cannot reopen in macOS
2019-04-05 21:48:24 +09:00
kPherox
f5afafe26a Remove all listener when closed main window 2019-04-05 20:43:37 +09:00
kPherox
c524777505 Fix cannot repoen in macOS 2019-04-05 19:55:13 +09:00
Cutls
8155baa07d fix about window 2019-04-04 01:09:57 +09:00
Cutls
32c56dcf6a Fix link to quesdon 2019-04-04 01:07:07 +09:00
123 changed files with 29370 additions and 22769 deletions

8
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: cutls
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: https://www.pixiv.net/fanbox/creator/28105985

2
.gitignore vendored
View File

@@ -5,8 +5,6 @@
TheDesk-*
app/build
build
make.js
make_js.js
app/.DS_Store
.DS_Store
.vs/*

View File

@@ -1,33 +1,47 @@
os: windows
os:
- windows
- linux
- osx
language: node_js
node_js:
- '10.15.2'
script: node -v
before_deploy:
- cd app
- npm install electron-builder -g
- cd app
- VERSION=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
- npm install
- electron-builder --win --ia32
- mv ../build/TheDesk-setup.exe ../TheDesk-setup-ia32.exe
- mv ../build/TheDesk*.exe ../TheDesk-ia32.exe
- electron-builder --win --x64
- mv ../build/TheDesk-setup.exe ../TheDesk-setup.exe
- mv ../build/TheDesk*.exe ../TheDesk.exe
- if [ "$TRAVIS_OS_NAME" = "osx" ];then electron-builder --mac -p never;else :;fi
- if [ "$TRAVIS_OS_NAME" = "linux" ];then electron-builder --linux --x64 -p never;else :;fi
- if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../build;else :;fi
- if [ "$TRAVIS_OS_NAME" = "linux" ];then ls;else :;fi
- if [ "$TRAVIS_OS_NAME" = "linux" ];then mv thedesk-*.zip thedesk.zip;else :;fi
- if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../app;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then electron-builder --win --ia32 -p never;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../build;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then ls;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then mv TheDesk-setup.exe TheDesk-setup-ia32.exe;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then mv *$VERSION.exe TheDesk-ia32.exe;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../app;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then electron-builder --win --x64 -p never;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../build;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then ls;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then mv ../build/TheDesk-setup.exe ../build/TheDesk-setup.exe;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then mv ../build/*$VERSION.exe ../build/TheDesk.exe;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../app;else :;fi
- cd ../
- ls
after_deploy: ls
- ls build
deploy:
skip_cleanup: true
provider: releases
# GitHub にリリースするための API KEY を暗号化した値
api_key:
secure: jndR02p5KRTtcJk18b3YsXL2cC+yzEf1AOqXdpWciF8f3lO5oY01jlxd17xdHIcK7VywSsLVZpLToSdqAoIEhJ5OxEQ/FmA3FlmbwwD6ou13gLa4VGIvsBHveCmKGjVu0Z++atIy76tZYU1SOWFWv4B0ZhnVz2ca2VZynvLgw3YNsPJH7rHO966GXgRkGYJAJ4UvLg3sj/iztVh2FSfbUj5IGO1e/JHJO63wAo1MSQtRjkutVgl/djnBLC6vbL4YHkM3Ynpkx/YQEcxwrmeY0Ra8D5yYDq4MNIDMmZahWC+k4u2eA2Cj2ifBFNxbZvTN75vLwRBp6DsTNHsiqkXrSPDBdNeet31RbwTQ6LtsK8jqmL4S/59dmLcj7uCU2WxyBLPbJdbdZWlqW2ZQvfQY8QVAYy7S3MiHQWQN0oP5wqXk89jcgR42ig/zsqFNPpXHM4mExR7l/gDLPg0j9c3XEF6sWtk3FmJN1i4+B+9kn09b6UKlV7EFPKp8XcFNrz4ZcE9/I8lKwsqLVG2jAXIk7Z9LwDRcAmK5eG348X5zwFtOY6raKIvRw2cn92bPnEI+55v8A4WANS2647GFTgxHj30D0d/sOZmJ5BS34zpdWTgE0AlKg7sOqkncjqoW5J5zCh5Ow7b3KXvEvlAts44mAag8tZTectxMP4iguXvTnv4=
# Releases ページにアップロードするファイル
file_glob: true
file:
- TheDesk.exe
- TheDesk-setup.exe
- TheDesk-ia32.exe
- TheDesk-setup-ia32.exe
- build/*
skip_cleanup: true
on:
repo: cutls/TheDesk
branches:
only:
- master
tags: true
all_branches: true

100
README.md
View File

@@ -1,25 +1,26 @@
<img src="https://thedesk.top/img/top.png" width="300" align="left">
<img src="https://thedesk.top/img/desk.png" width="150" align="right">
# TheDesk
[![Build Status](https://travis-ci.org/cutls/TheDesk.svg?branch=master)](https://travis-ci.org/cutls/TheDesk)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/thedesk/localized.svg)](https://translate.thedesk.top/project/thedesk)
[![Version](https://flat.badgen.net/github/release/cutls/TheDesk)](https://github.com/cutls/TheDesk/releases)
[![Download](https://flat.badgen.net/github/assets-dl/cutls/TheDesk)](https://github.com/cutls/TheDesk/releases)
![Contributors](https://flat.badgen.net/github/contributors/cutls/TheDesk)
Mastodon/Misskey client for PC(Windows/Linux/macOS)
オープンソースSNSマストドン/MisskeyのWindows/Linuxクライアント
Download:[TheDesk](https://thedesk.top)
オープンソースSNSマストドン/MisskeyのPC向けクライアント[日本語はこちら](README_ja.md)
Contact me(bug report...):GitHub Issues, mention to [Cutls@kirishima.cloud](https://kirishima.cloud/@Cutls) or toot with #Desk
Download:[TheDesk](https://thedesk.top) [![check](https://status.cutls.com/badge/?site=thedesk.top)](https://status.cutls.com)
バグレポートなど:GitHub Issuesや[Cutls@kirishima.cloud](https://kirishima.cloud/@Cutls)へのリプ,または#Deskでトゥートして下さい.
<a href="https://www.patreon.com/cutls"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="Become a Patron!" width="160"></a>
![Screenshots1](https://thedesk.top/img/scr1.png)
### Contribute/コントリビュート
Please make a pull request to ***WIP(before CI)*** brunch
***WIP(before CI)*** ブランチにプルリクエストをお願いします。
## License/ライセンス
## License
[GNU General Public License v3.0](https://github.com/cutls/TheDesk/blob/master/LICENSE)
The icon is provided under [Creative Commons BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/)/アイコンは[クリエイティブ・コモンズ 表示-非営利-継承](https://creativecommons.org/licenses/by-nc-sa/4.0/)で提供されています。
The icon is provided under [Creative Commons BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[Press Kit](https://dl.thedesk.top/press/TheDesk+PressKit.zip)
* [PNG](https://dl.thedesk.top/press/TheDesk.png)
@@ -27,25 +28,25 @@ The icon is provided under [Creative Commons BY-NC-SA](https://creativecommons.o
* [ico](https://dl.thedesk.top/press/TheDesk.ico)
* [icns](https://dl.thedesk.top/press/TheDesk.icns)
## Terms of Use/利用規約
The default sounds of notifications is provided [Creative Commons BY](https://creativecommons.org/licenses/by/4.0/)
## Terms of Use
* [利用規約(Terms of Use(ja))](https://thedesk.top/tos.html)
* [プライバシーポリシー(Privacy Policy(ja))](https://thedesk.top/priv.html)
## Language/言語
## Language
* 日本語(Japanese)
* English(英語)
* English
### Translation/翻訳
### Translation
Crowdin project is available! Visit: https://translate.thedesk.top
Crowdinから翻訳に参加してみませんか: https://translate.thedesk.top
## Requirement
## Requirement/環境
* Electron 3.0.10(install yourself)
* Electron 4.2 or above(install yourself)
* electron-dl(in package.json)
* Jimp(in package.json)
* font-manager(in package.json)
@@ -56,28 +57,47 @@ Crowdinから翻訳に参加してみませんか: https://translate.thedesk.
* sumchecker(in package.json)
* Ability to read unformated files!(install yourself)
## Contributors/主なコントリビューター
## Contributors
macOSビルダー
Build for macOS
* [とねぢ](https://minohdon.jp/@toneji)
* [toneji](https://minohdon.jp/@toneji)
Linuxビルダー
Build for Linux
* [ぽぷんじゃ](https://popon.pptdn.jp/@popn_ja)
* [popn_ja](https://popon.pptdn.jp/@popn_ja)
iTunes NowPlayingにアルバムアートワークを付けてくれた人
Fellow coder
* [kPherox](https://www.kr-kp.com/)
## Build/ビルド
## Build
Misskey(misskey.xyz) application token is not in cutls/TheDesk
Misskey(misskey.xyz)のトークンは含まれておりません。
`git clone https://github.com/cutls/TheDesk`
`npm install electron -g`
`cd TheDesk/app`
`npm install`
```sh
git clone https://github.com/cutls/TheDesk
cd TheDesk/app
npm install
npm install --only=dev
```
### electron-builder(Recommended)
Use npm scripts.
```sh
# Build for current platform
npm run build
# Select build target
## Windows
npm run build:win
## Windows and Linux (The macOS target should run on macOS. So, this option hasn't include the build for macOS)
npm run build:all
```
Config is all on package.json
### electron-packager
`npm install --save-dev electron-rebuild`
Linux/macOS
@@ -86,13 +106,8 @@ Windows
`.\node_modules\.bin\electron-rebuild.cmd`
To install Python 2.x and Visual C++ for Windows, before running `npm install --save-dev electron-rebuild`
WindowsでPython 2.xやVisualC++を一発でインストールできるツールもあります(`npm install --save-dev electron-rebuild`の前に)
`npm install --global windows-build-tools`
日本語話者向けですが、macOSビルドにはXCodeが要るとの情報があります。([とねぢ](https://minohdon.jp/@toneji)氏談)
### electron-packager
Windows
`electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --win32metadata.CompanyName="TheDesk&Cutls.com" --win32metadata.FileDescription="TheDesk" --win32metadata.OriginalFilename="TheDesk" --win32metadata.InternalName="TheDesk" --win32metadata.ProductName="TheDesk" --platform=win32 --arch=all --electron-version=4.0.5 --icon=.\app\thedesk.ico --overwrite`
Linux
@@ -100,19 +115,8 @@ Linux
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-builder
Config is all on package.json
ビルド設定はすべてpackage.jsonに記載しています。
## Pleroma support
Did you find a bug with Pleroma accounts?
Pleroma **does not** follow Mastodon API rules completely although Pleroma developers say so.
Please write issues to improve TheDesk affinity with Pleroma.
Pleromaは、Mastodon APIとの互換性を謳っていますが、実際には様々な差異があり、TheDeskで不具合が発生することがあります。
Issuesに書いてある問題についてはなるべく対処しますので、ぜひお知らせください。
## See also/詳しく
[TheDesk - マストドン日本語ウィキ](https://ja.mstdn.wiki/TheDesk)

128
README_ja.md Normal file
View File

@@ -0,0 +1,128 @@
<img src="https://thedesk.top/img/top.png" width="300" align="left">
<img src="https://thedesk.top/img/desk.png" width="150" align="right">
# TheDesk
[![Build Status](https://travis-ci.org/cutls/TheDesk.svg?branch=master)](https://travis-ci.org/cutls/TheDesk)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/thedesk/localized.svg)](https://translate.thedesk.top/project/thedesk)
[![Version](https://flat.badgen.net/github/release/cutls/TheDesk)](https://github.com/cutls/TheDesk/releases)
[![Download](https://flat.badgen.net/github/assets-dl/cutls/TheDesk)](https://github.com/cutls/TheDesk/releases)
![Contributors](https://flat.badgen.net/github/contributors/cutls/TheDesk)
Mastodon/Misskey client for PC(Windows/Linux/macOS)
オープンソースSNSマストドン/MisskeyのPC向けクライアント
Download:[TheDesk](https://thedesk.top) [![check](https://status.cutls.com/badge/?site=thedesk.top)](https://status.cutls.com)
[Pixiv FANBOX](https://www.pixiv.net/fanbox/creator/28105985)
![Screenshots1](https://thedesk.top/img/scr1.png)
## ライセンス
[GNU General Public License v3.0](https://github.com/cutls/TheDesk/blob/master/LICENSE)
アイコンは[クリエイティブ・コモンズ 表示-非営利-継承](https://creativecommons.org/licenses/by-nc-sa/4.0/)で提供されています。
[プレスキット](https://dl.thedesk.top/press/TheDesk+PressKit.zip)
* [PNG](https://dl.thedesk.top/press/TheDesk.png)
* [Monotone SVG](https://dl.thedesk.top/press/TheDesk.svg)
* [ico](https://dl.thedesk.top/press/TheDesk.ico)
* [icns](https://dl.thedesk.top/press/TheDesk.icns)
標準の通知音は [Creative Commons BY](https://creativecommons.org/licenses/by/4.0/) で提供されています。
## 利用規約
* [利用規約](https://thedesk.top/tos.html)
* [プライバシーポリシー](https://thedesk.top/priv.html)
## 言語
* 日本語
* English(英語)
### 翻訳
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!(自分で入れて)
## 主なコントリビューター
macOSビルダー
* [とねぢ](https://minohdon.jp/@toneji)
Linuxビルダー
* [ぽぷんじゃ](https://popon.pptdn.jp/@popn_ja)
iTunes NowPlayingにアルバムアートワークを付けてくれた人
* [kPherox](https://www.kr-kp.com/)
## ビルド
```sh
git clone https://github.com/cutls/TheDesk
cd TheDesk/app
npm install
npm install --only=dev
```
### electron-builder(推奨)
npm scriptsを利用します
```sh
# 実行している環境向けにビルド
npm run build
# ターゲットを指定してビルド
## Windows
npm run build:win
## macOS向けのビルドにはmacOSで実行する必要があるためこのコマンドではビルドされません
npm run build:all
```
ビルド設定はすべてpackage.jsonに記載しています。
### electron-packager(非推奨)
`npm install --save-dev electron-rebuild`
Linux/macOS
`./node_modules/.bin/electron-rebuild`
Windows
`.\node_modules\.bin\electron-rebuild.cmd`
WindowsでPython 2.xやVisualC++を一発でインストールできるツールもあります(`npm install --save-dev electron-rebuild`の前に)
`npm install --global windows-build-tools`
日本語話者向けですが、macOSビルドにはXCodeが要るとの情報があります。([とねぢ](https://minohdon.jp/@toneji)氏談)
Windows
`electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --win32metadata.CompanyName="TheDesk&Cutls.com" --win32metadata.FileDescription="TheDesk" --win32metadata.OriginalFilename="TheDesk" --win32metadata.InternalName="TheDesk" --win32metadata.ProductName="TheDesk" --platform=win32 --arch=all --electron-version=4.0.5 --icon=.\app\thedesk.ico --overwrite`
Linux
`electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=linux --arch=x64,ia32 --electron-version=4.0.5 --overwrite`
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`
## Pleromaのサポート
Pleromaは、Mastodon APIとの互換性を謳っていますが、実際には様々な差異があり、TheDeskで不具合が発生することがあります。
Issuesに書いてある問題についてはなるべく対処しますので、ぜひお知らせください。
## 詳しく
[TheDesk - マストドン日本語ウィキ](https://ja.mstdn.wiki/TheDesk)

View File

@@ -1,5 +1,6 @@
<!doctype html>
<html lang="ja">
<head>
<title>TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport">
@@ -15,9 +16,12 @@ body{
-webkit-app-region: drag;
cursor: move;
}
a,button{
a,
button {
-webkit-app-region: no-drag;
}
.container {
width: 100%;
display: grid;
@@ -69,6 +73,7 @@ a,button{
}
</style>
</head>
<body class="center " style="overflow:hidden">
<script type="text/javascript" src="./js/common/jquery.js"></script>
<script type="text/javascript" src="./js/platform/first-not-view.js"></script>
@@ -76,7 +81,7 @@ a,button{
<img src="./img/desk.png" style="max-width:70%;">
<h5>TheDesk</h5>
<div class='container'>
<div class='area-name1'>バージョン</div>
<div class='area-name1'>Display version</div>
<div class='area-data1' id="now"></div>
<div class='area-name2'>Internal version</div>
<div class='area-data2' id="ver"></div>
@@ -87,23 +92,33 @@ a,button{
<div class='area-name5'>Node.js</div>
<div class='area-data5' id="node"></div>
</div>
<div class="cp">Copyright &copy; TheDesk 2018 All rights reserved.<br><a href="https://thedesk.top" target="_blank">Web site</a></div>
<button onclick="window.close()" class="btn waves-effect indigo" style="width:calc(100% - 10px);"><i class="material-icons left">close</i>Close</button>
<div class="cp">Copyright &copy; TheDesk 2018<br>
Main developer(author): <a href="https://cutls.com/@Cutls" target="_blank">Cutls P</a><br>
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 href="https://pawoo.net/@kPherox"
target="_blank">kPherox</a> and all users
<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">
<br><a href="https://thedesk.top" target="_blank">Web site</a></div>
<button onclick="window.close()" class="btn waves-effect indigo" style="width:calc(100% - 10px);"><i
class="material-icons left">close</i>Close</button>
<script type="text/javascript" src="./js/ui/theme.js"></script>
<script>
$("#now").text(localStorage.getItem("ver"));
var electron = require("electron");
var remote = electron.remote;
//JSON.parse(fs.readFileSync(info_path, 'utf8'));
console.log(process.versions);
$("#node").text(process.version);
$("#chrome").text(process.versions.chrome);
$("#electron").text(process.versions.electron);
const shell = electron.shell;
$("#node").text(remote.process.version);
$("#chrome").text(remote.process.versions.chrome);
$("#electron").text(remote.process.versions.electron);
if (location.search) {
var m = location.search.match(/\?ver=([a-zA-Z-0-9.]+)/);
var ver = m[1];
$("#ver").text(ver);
}
$(document).on('click', 'a', e => {
var url = $(e.target).attr('href');
shell.openExternal(url);
return false;
});
</script>
<script type="text/javascript" src="./js/platform/end.js"></script>

View File

@@ -1,5 +1,6 @@
<!doctype html>
<html lang="ja">
<head>
<title>Adobe Photo Editor - TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport">
@@ -17,32 +18,38 @@
padding: 24px 0;
text-align: center;
}
#cb-drag p {
font-weight: bold;
text-align: center;
}
#cb-file {
cursor: pointer;
}
#cb-display {
margin-bottom: 0;
}
#cb-display p {
margin-top: 8px;
margin-bottom: 0;
line-height: 1.4;
}
.cb-div {
padding: 16px;
margin-bottom: 8px;
}
.cb-image {
cursor: pointer;
}
</style>
<meta charset="utf-8">
</head>
<body id="mainView">
<script type="text/javascript" src="./js/common/jquery.js"></script>
<script type="text/javascript" src="./js/platform/first-not-view.js"></script>
@@ -190,7 +197,6 @@ function launchEditor(id, src) {
}
function editPhoto() {
//console.log(this);
var id = this.getAttribute("id");
var src = this.getAttribute("src");
launchEditor(id, src);
@@ -257,4 +263,5 @@ photoEditor.init();
<script type="text/javascript" src="./js/ui/theme.js"></script>
<script type="text/javascript" src="./js/platform/end.js"></script>
</body>
</html>

112
app/build.js Normal file
View File

@@ -0,0 +1,112 @@
const builder = require("electron-builder");
const fs = require('fs');
const os = process.platform;
const Platform = builder.Platform
const Arch = builder.Arch
const targets = new Map();
const archToType = new Map();
const pref = {
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
},
linux: {
icon: "build/icons",
target: [
"zip",
"snap"
],
category: "Network"
},
mac: {
target: [
"dmg",
"zip"
]
},
electronDownload: {
version: "5.0.1"
},
electronVersion: "5.0.1"
}
const json = JSON.parse(fs.readFileSync("package.json", 'utf8'));
const version = json.version;
if (os == "win32") {
archToType.set(Arch.ia32, []);
targets.set(Platform.WINDOWS, archToType);
} else if (os == "linux") {
archToType.set(Arch.x64, []);
archToType.set(Arch.ia32, []);
targets.set(Platform.LINUX, archToType);
} else if (os == "darwin") {
archToType.set(Arch.x64, []);
targets.set(Platform.MAC, archToType);
} else {
return false
}
builder.build({
targets: targets,
config: pref
})
.then(() => {
console.log("Done on "+os)
if (os == "win32") {
console.log("Windows")
fs.renameSync('../build/TheDesk ' + version + '.exe', '../build/TheDesk-ia32.exe');
fs.renameSync('../build/TheDesk Setup ' + version + '.exe', '../build/TheDesk-setup-ia32.exe');
retry()
}else if (os == "linux") {
console.log("Linux")
fs.renameSync('../build/thedesk-' + version + '.zip', '../build/TheDesk.zip');
fs.renameSync('../build/TheDesk Setup ' + version + '.exe', '../build/TheDesk-setup-ia32.exe');
}
})
.catch((error) => {
// handle error
})
function retry(){
console.log("Windows x64")
const targetsAlt = new Map();
const archToTypeAlt = new Map();
targetsAlt.set(Platform.WINDOWS, archToTypeAlt);
archToTypeAlt.set(Arch.x64, []);
builder.build({
targets: targetsAlt,
config: pref
})
.then(() => {
fs.renameSync('../build/TheDesk Setup ' + version + '.exe', '../build/TheDesk-setup.exe');
fs.renameSync('../build/TheDesk ' + version + '.exe', '../build/TheDesk.exe');
})
.catch((error) => {
// handle error
})
}

View File

@@ -1,2 +1,4 @@
/*このソフトについてを押した時に読み込まれます*/
body{font-family:Open Sans;}
body {
font-family: Open Sans;
}

View File

@@ -5,9 +5,15 @@
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-family: "FontAwesome";
src: url("../fonts/fontawesome-webfont.eot?v=4.7.0");
src: url("../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0")
format("embedded-opentype"),
url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2"),
url("../fonts/fontawesome-webfont.woff?v=4.7.0") format("woff"),
url("../fonts/fontawesome-webfont.ttf?v=4.7.0") format("truetype"),
url("../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular")
format("svg");
font-weight: normal;
font-style: normal;
}
@@ -60,9 +66,9 @@
left: -1.85714286em;
}
.fa-border {
padding: .2em .25em .15em;
padding: 0.2em 0.25em 0.15em;
border: solid 0.08em #eeeeee;
border-radius: .1em;
border-radius: 0.1em;
}
.fa-pull-left {
float: left;
@@ -71,10 +77,10 @@
float: right;
}
.fa.fa-pull-left {
margin-right: .3em;
margin-right: 0.3em;
}
.fa.fa-pull-right {
margin-left: .3em;
margin-left: 0.3em;
}
/* Deprecated as of 4.4.0 */
.pull-right {
@@ -84,10 +90,10 @@
float: left;
}
.fa.pull-left {
margin-right: .3em;
margin-right: 0.3em;
}
.fa.pull-right {
margin-left: .3em;
margin-left: 0.3em;
}
.fa-spin {
-webkit-animation: fa-spin 2s infinite linear;

View File

@@ -1,5 +1,6 @@
/*共通CSS*/
html,body{
html,
body {
/*transform: translate3d(0,0,0);*/
overflow: hidden;
user-select: none;
@@ -30,6 +31,8 @@ option {
}
#mainView {
padding: 10px;
overflow: scroll;
height: auto;
}
#message {
display: none;
@@ -40,14 +43,16 @@ option {
color: white;
z-index: 9999;
}
#imagemodal, #videomodal {
#imagemodal,
#videomodal {
display: none;
max-width: 100vw;
max-height: 100vh;
position: fixed;
z-index: 9;
}
#videomodal, #tootmodal {
#videomodal,
#tootmodal {
background-color: var(--modal);
}
#imagemodal .modal-content {
@@ -70,7 +75,9 @@ option {
min-width: 0 !important;
margin-left: 5px !important;
}
.bbcode-pulse-loadings, .bbcode-pulse-loading, .fa-pulse {
.bbcode-pulse-loadings,
.bbcode-pulse-loading,
.fa-pulse {
display: inline-block;
animation-duration: 3s;
animation-fill-mode: both;
@@ -78,10 +85,13 @@ option {
animation-name: pulse;
}
@keyframes pulse {
from, 50%, to {
from,
50%,
to {
opacity: 1;
}
25%, 75% {
25%,
75% {
opacity: 0;
}
}
@@ -117,7 +127,8 @@ option {
animation-iteration-count: infinite;
animation-name: shake;
}
code:before, .pre:before {
code:before,
.pre:before {
content: "Code";
font-size: 1.8rem;
line-height: 1em;
@@ -127,7 +138,8 @@ code:before, .pre:before {
right: 0;
top: 0;
}
code, pre {
code,
pre {
color: white;
display: block;
border-left: 5px solid;
@@ -143,10 +155,12 @@ code, pre {
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
blockquote, .quote p {
blockquote,
.quote p {
margin: 0;
}
blockquote, .quote {
blockquote,
.quote {
color: black;
background-color: #ddd;
padding: 1em 1em 1em;
@@ -155,7 +169,8 @@ blockquote, .quote {
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
blockquote:before, .quote:before {
blockquote:before,
.quote:before {
content: "Quote";
font-size: 1.8rem;
line-height: 1em;
@@ -220,7 +235,7 @@ blockquote:before, .quote:before {
font-size: 2rem;
}
.radio {
font-family:'Baloo Bhai'
font-family: "Baloo Bhai";
}
#pip {
z-index: 504;
@@ -250,7 +265,7 @@ blockquote:before, .quote:before {
background-color: var(--modal);
}
#releasenote li {
list-style-type: disc
list-style-type: disc;
}
@media only screen and (min-width: 993px) {
#toast-container {
@@ -284,7 +299,8 @@ blockquote:before, .quote:before {
opacity: 0;
}
}
.collapsible-header,.tabs{
.collapsible-header,
.tabs {
background-color: var(--subcolor);
}
.modal-footer {
@@ -351,7 +367,6 @@ blockquote:before, .quote:before {
#tltype {
display: flex;
flex-wrap: wrap;
}
#tltype .type {
display: flex;
@@ -375,7 +390,6 @@ blockquote:before, .quote:before {
position: relative;
color: var(--beforehover);
left: -15px;
}
.drag-bar {
cursor: move;
@@ -389,6 +403,15 @@ blockquote:before, .quote:before {
font-size: 16px;
padding: 4px;
}
#something-wrong {
flex-direction: column;
width: 100%;
height: 100%;
position: absolute;
display: flex;
justify-content: center;
align-items: center;
}
/*スクロールバー*/
::-webkit-scrollbar {

1490
app/css/materialize.css vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -20,7 +20,6 @@
position: absolute;
right: 2px;
top: 4px;
}
.more-show {
display: none;
@@ -44,7 +43,9 @@
#sch-box input {
width: auto;
}
.picker__close, .picker__today, .picker__clear {
.picker__close,
.picker__today,
.picker__clear {
color: #26a69a !important;
}
.cw {
@@ -54,7 +55,6 @@
filter: blur(50px);
}
#emoji {
}
#suggest {
max-height: 300px;
@@ -93,10 +93,14 @@
display: flex;
}
#toot-post-btn {
width:calc(100% - 10px); padding:0; margin-top:10px;
width: calc(100% - 10px);
padding: 0;
margin-top: 10px;
}
#toot-sec-btn {
width:30px; padding:0; margin-top:10px;
width: 30px;
padding: 0;
margin-top: 10px;
}
#left-side {
float: left;
@@ -109,7 +113,6 @@
padding: 5px;
}
#poll {
}
.poll-provider {
position: absolute;

View File

@@ -1,4 +1,3 @@
.drag-content {
text-overflow: ellipsis;
cursor: move;
@@ -10,7 +9,7 @@
padding: 3px;
display: grid;
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 {
grid-area: sorticon;

View File

@@ -1,14 +1,13 @@
/*TL CSS(ただしBBCode pulse:master.css/spin:font-awesome*/
#main {
display:flex;
width: 100vw;
height: calc(100vh - 40px);
}
#timeline-container {
overflow-x: scroll;
overflow-y: hidden;
display: flex;
height: calc(100vh - 40px);
flex-grow:4;
height: 100%;
}
#bottom {
position: absolute;
@@ -87,8 +86,13 @@
font-size: 15px;
}
@media screen and (max-width: 890px) {
.btnsgroup .grouptitle{ display: none; }
#tips,#tips-menu{ display: none; }
.btnsgroup .grouptitle {
display: none;
}
#tips,
#tips-menu {
display: none;
}
}
iframe {
max-width: 100%;
@@ -120,34 +124,67 @@ iframe {
.bbcode_FTL {
display: none;
}
.marquee {
width: 100%;
padding: .5em 0;
overflow: hidden;
margin-bottom: 0;
position: relative;
}
.marquee .bbcode-marq-lateral {
margin: 0;
padding-left: 100%;
display: inline-block;
white-space: nowrap;
animation-name: marquee;
animation-timing-function: linear;
animation-duration: 10s;
animation-iteration-count: infinite;
}
@keyframes marquee {
0% {
-webkit-transform: translate(0);
transform: translate(0);
}
99%, 100% {
-webkit-transform: translate(-100%);
transform: translate(-100%);
}
}
.boxIn {
display: flex;
flex-direction: column;
height: 100%;
border: thin solid gray;
overflow: hidden;
}
.box .pin,#his-data .pin{
.box .pin,
#his-data .pin {
display: none;
}
.user {
cursor: text;
font-size: 1.1rem;
}
.emoji,.emoji-img{
.emoji,
.emoji-img {
width: 15px;
}
.area-toot .emoji,.area-toot .emoji-img{
.area-toot .emoji,
.area-toot .emoji-img {
width: 20px;
vertical-align: middle;
margin: -3px 0 0;
margin: -1px 0;
}
.faicon_FTL {
display: none;
}
.tl-box {
position: relative;
height:calc(100% - 40px);
flex: 1;
overflow-y: scroll;
overflow-x:hidden }
overflow-x: hidden;
}
.additional {
overflow-x: scroll;
width: 100%;
@@ -170,9 +207,14 @@ iframe {
width: 100%;
display: grid;
grid-template-columns: 43px 2fr 1fr;
grid-template-areas: 'notice notice notice' 'icon display_name display_name' 'icon toot toot' 'vis additional additional' 'actions actions side';
grid-template-areas: "notice notice notice" "icon display_name display_name" "icon toot toot" "vis additional additional" "actions actions side";
}
.cvo h1,.cvo h2,.cvo h3,.cvo h4,.cvo h5,.cvo h6{
.cvo h1,
.cvo h2,
.cvo h3,
.cvo h4,
.cvo h5,
.cvo h6 {
margin: 0;
}
@@ -199,7 +241,7 @@ text-overflow: ellipsis;
display: flex;
justify-content: space-between;
width: 100%;
flex-wrap:nowrap
flex-wrap: nowrap;
}
.flex-name {
max-width: calc(100% - 60px);
@@ -224,6 +266,9 @@ grid-area: toot;
cursor: text;
user-select: auto;
grid-area: additional;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.area-actions {
@@ -246,6 +291,29 @@ grid-area: toot;
margin: 2px;
grid-area: side;
}
.quote-renote {
display: grid;
grid-template-columns: 43px 2fr 1fr;
grid-template-areas: "ricon ruser" "ricon rtext";
border: 1px solid;
margin-top: 3px;
padding: 1px;
border-radius: 3px;
}
.renote-icon {
grid-area: ricon;
}
.renote-icon img {
width: 43px;
}
.renote-user {
grid-area: ruser;
}
.renote-text {
grid-area: rtext;
}
.btn-flat {
color: var(--color);
}
@@ -282,7 +350,6 @@ grid-area: toot;
.toot-img {
object-fit: cover;
width: 100%;
margin-right:1px;
}
.toot img:not(.emoji-img) {
max-width: 100%;
@@ -318,6 +385,7 @@ grid-area: toot;
p {
margin: 0;
margin-bottom: 0px;
line-height: 20px;
}
p:not(:last-child) {
margin-bottom: 10px;
@@ -334,6 +402,7 @@ p:not(:last-child){
.notice-box {
top: 0;
background-color: var(--notfbox);
filter: brightness(110%);
position: relative;
margin-right: 10px;
width: 100%;
@@ -343,7 +412,7 @@ p:not(:last-child){
display: grid;
grid-template-columns: 40px 48px 1fr 24px;
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 {
font-weight: bold;
@@ -429,7 +498,9 @@ p:not(:last-child){
border: thin solid gray;
border-bottom: 2px solid white;
grid-area: notf-box;
box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.3), 0px -10px 10px 0px rgba(0,0,0,0.3) inset;
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.3),
0px -10px 10px 0px rgba(0, 0, 0, 0.3) inset;
}
#src-contents {
min-height: 100px;
@@ -466,19 +537,19 @@ p:not(:last-child){
}
.fa-2x > .emoji-img {
width: 36px !important;
height: 36px!important
height: 36px !important;
}
.fa-3x > .emoji-img {
width: 54px !important;
height: 54px!important
height: 54px !important;
}
.fa-4x > .emoji-img {
width: 72px !important;
height: 72px!important
height: 72px !important;
}
.fa-5x > .emoji-img {
width: 90px !important;
height: 90px!important
height: 90px !important;
}
#lists-user {
overflow-y: scroll;
@@ -501,7 +572,45 @@ p:not(:last-child){
.votebtn:hover {
background-color: var(--color);
}
.jump {
display: inline-block;
animation: jump 0.75s linear infinite;
}
.img-link {
position: relative;
display: block;
margin-right: 1px;
float: left;
}
.nsfw-media {
position: absolute;
top: 0;
right: 0;
background-color: black;
color: white;
}
.img-link img {
display: block;
width: 100%;
height: 100%;
}
@keyframes jump {
0% {
transform: translateY(0);
}
25% {
transform: translateY(-16px);
}
50% {
transform: translateY(0);
}
75% {
transform: translateY(-8px);
}
100% {
transform: translateY(0);
}
}
@keyframes fadeInDown {
from {
opacity: 0;
@@ -537,4 +646,3 @@ p:not(:last-child){
animation-duration: 0.1s;
animation-name: fadeInDown;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
/*アイコンをクリックした時とかにでてくるユーザーデータ*/
#his-data {
background-repeat: no-repeat;
background-image: url('../../loading.svg');
background-image: url("../../loading.svg");
overflow-y: hidden;
}
#his-name {
@@ -42,12 +42,18 @@
height: 1.5rem;
}
.his-field-title {
height:1.5rem; padding:0; background-color:#757575; text-align:center;
height: 1.5rem;
padding: 0;
background-color: #757575;
text-align: center;
padding: 5px;
margin-bottom: 1px;
width: 30%;
}
.his-field-content {
height:1.5rem; padding:0; padding-left:5px;
height: 1.5rem;
padding: 0;
padding-left: 5px;
}
#his-data a span.ellipsis:after {
content: "...";
@@ -66,7 +72,7 @@
.tab-content {
overflow-y: scroll;
overflow-x: hidden;
height: calc(100% - 240px)
height: calc(100% - 240px);
}
.my-data-width {
width: 10%;
@@ -74,11 +80,12 @@
.active-back {
background-color: var(--active);
}
#his-name .emojione,#his-name .emoji-img{
#his-name .emojione,
#his-name .emoji-img {
width: 20px;
}
#his-plus-action .btn {
width:170px
width: 170px;
}
.custom-tabs {
display: flex;
@@ -90,3 +97,12 @@
color: #039be5;
cursor: pointer;
}
#his-float-blocked {
display: flex;
justify-content: center;
align-items: center;
font-size: 2rem;
width: 90%;
height: 100%;
position: absolute;
}

View File

@@ -0,0 +1,4 @@
directories:
output: dist
buildResources: build
electronVersion: 1.4.13

BIN
app/img/thinkingdesk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

119
app/js/common/blurhash.js Normal file
View File

@@ -0,0 +1,119 @@
var digitCharacters = [
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
"K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
"U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d",
"e", "f", "g", "h", "i", "j", "k", "l", "m", "n",
"o", "p", "q", "r", "s", "t", "u", "v", "w", "x",
"y", "z", "#", "$", "%", "*", "+", ",", "-", ".",
":", ";", "=", "?", "@", "[", "]", "^", "_", "{",
"|", "}", "~",
];
function decode83(str) {
var value = 0;
for (var i = 0; i < str.length; i++) {
var c = str[i];
var digit = digitCharacters.indexOf(c);
value = value * 83 + digit;
}
return value;
}
function linearTosRGB(value) {
var v = Math.max(0, Math.min(1, value));
if (v <= 0.0031308) {
return Math.round(v * 12.92 * 255 + 0.5);
}
else {
return Math.round((1.055 * Math.pow(v, 1 / 2.4) - 0.055) * 255 + 0.5);
}
}
function sRGBToLinear(value) {
var v = value / 255;
if (v <= 0.04045) {
return v / 12.92;
}
else {
return Math.pow((v + 0.055) / 1.055, 2.4);
}
}
function decodeDC(value) {
var intR = value >> 16;
var intG = (value >> 8) & 255;
var intB = value & 255;
return [sRGBToLinear(intR), sRGBToLinear(intG), sRGBToLinear(intB)];
};
function sign(n) { return (n < 0 ? -1 : 1); }
function signPow(val, exp) { return sign(val) * Math.pow(Math.abs(val), exp); }
function decodeDC2(value, maximumValue) {
var quantR = Math.floor(value / (19 * 19));
var quantG = Math.floor(value / 19) % 19;
var quantB = value % 19;
var rgb = [
signPow((quantR - 9) / 9, 2.0) * maximumValue,
signPow((quantG - 9) / 9, 2.0) * maximumValue,
signPow((quantB - 9) / 9, 2.0) * maximumValue,
];
return rgb;
};
function decodeblur(blurhash, width, height, punch) {
punch = punch | 1;
if (blurhash.length < 6) {
console.error('too short blurhash');
return null;
}
var sizeFlag = decode83(blurhash[0]);
var numY = Math.floor(sizeFlag / 9) + 1;
var numX = (sizeFlag % 9) + 1;
var quantisedMaximumValue = decode83(blurhash[1]);
var maximumValue = (quantisedMaximumValue + 1) / 166;
if (blurhash.length !== 4 + 2 * numX * numY) {
console.error('blurhash length mismatch', blurhash.length, 4 + 2 * numX * numY);
return null;
}
var colors = new Array(numX * numY);
for (var i = 0; i < colors.length; i++) {
if (i === 0) {
var value = decode83(blurhash.substring(2, 6));
colors[i] = decodeDC(value);
}
else {
var value = decode83(blurhash.substring(4 + i * 2, 6 + i * 2));
colors[i] = decodeDC2(value, maximumValue * punch);
}
}
var bytesPerRow = width * 4;
var pixels = new Uint8ClampedArray(bytesPerRow * height);
for (var y = 0; y < height; y++) {
for (var x = 0; x < width; x++) {
var r = 0;
var g = 0;
var b = 0;
for (var j = 0; j < numY; j++) {
for (var i = 0; i < numX; i++) {
var basis = Math.cos(Math.PI * x * i / width) * Math.cos(Math.PI * y * j / height);
var color = colors[i + j * numX];
r += color[0] * basis;
g += color[1] * basis;
b += color[2] * basis;
}
}
var intR = linearTosRGB(r);
var intG = linearTosRGB(g);
var intB = linearTosRGB(b);
pixels[4 * x + 0 + y * bytesPerRow] = intR;
pixels[4 * x + 1 + y * bytesPerRow] = intG;
pixels[4 * x + 2 + y * bytesPerRow] = intB;
pixels[4 * x + 3 + y * bytesPerRow] = 255; // alpha
}
}
return pixels;
}
function parseBlur(blur) {
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var pixels = decodeblur(blur, 32, 32)
const imageData = new ImageData(pixels, 32, 32);
ctx.putImageData(imageData, 0, 0);
return canvas.toDataURL()
}

View File

@@ -246,7 +246,8 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
r.dequeue(a, t);
}));
});
}, r.fn = r.prototype = { init: function (e) {
}, r.fn = r.prototype = {
init: function (e) {
if (e.nodeType) return this[0] = e, this; throw new Error("Not a DOM node.");
}, offset: function () {
var t = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : { top: 0, left: 0 }; return { top: t.top + (e.pageYOffset || document.scrollTop || 0) - (document.clientTop || 0), left: t.left + (e.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || 0) };
@@ -259,7 +260,8 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
e = e.apply(t),
a = this.offset(),
n = /^(?:body|html)$/i.test(e.nodeName) ? { top: 0, left: 0 } : r(e).offset(); return a.top -= parseFloat(t.style.marginTop) || 0, a.left -= parseFloat(t.style.marginLeft) || 0, e.style && (n.top += parseFloat(e.style.borderTopWidth) || 0, n.left += parseFloat(e.style.borderLeftWidth) || 0), { top: a.top - n.top, left: a.left - n.left };
} };var a = {};r.expando = "velocity" + new Date().getTime(), r.uuid = 0;for (var n = {}, o = n.hasOwnProperty, i = n.toString, s = "Boolean Number String Function Array Date RegExp Object Error".split(" "), l = 0; l < s.length; l++) {
}
}; var a = {}; r.expando = "velocity" + new Date().getTime(), r.uuid = 0; for (var n = {}, o = n.hasOwnProperty, i = n.toString, s = "Boolean Number String Function Array Date RegExp Object Error".split(" "), l = 0; l < s.length; l++) {
n["[object " + s[l] + "]"] = s[l].toLowerCase();
} r.fn.init.prototype = r.fn, e.Velocity = { Utilities: r };
}
@@ -404,7 +406,8 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
}, r);
};
}(),
m = { isString: function (e) {
m = {
isString: function (e) {
return "string" == typeof e;
}, isArray: Array.isArray || function (e) {
return "[object Array]" === Object.prototype.toString.call(e);
@@ -422,12 +425,15 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
for (var t in e) {
return !1;
} return !0;
} },
}
},
y = !1; if (e.fn && e.fn.jquery ? (f = e, y = !0) : f = t.Velocity.Utilities, 8 >= d && !y) throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity."); if (7 >= d) return void (jQuery.fn.velocity = jQuery.fn.animate); var h = 400,
v = "swing",
b = { State: { isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), isAndroid: /Android/i.test(navigator.userAgent), isGingerbread: /Android 2\.3\.[3-7]/i.test(navigator.userAgent), isChrome: t.chrome, isFirefox: /Firefox/i.test(navigator.userAgent), prefixElement: r.createElement("div"), prefixMatches: {}, scrollAnchor: null, scrollPropertyLeft: null, scrollPropertyTop: null, isTicking: !1, calls: [] }, CSS: {}, Utilities: f, Redirects: {}, Easings: {}, Promise: t.Promise, defaults: { queue: "", duration: h, easing: v, begin: a, complete: a, progress: a, display: a, visibility: a, loop: !1, delay: !1, mobileHA: !0, _cacheValues: !0 }, init: function (e) {
b = {
State: { isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), isAndroid: /Android/i.test(navigator.userAgent), isGingerbread: /Android 2\.3\.[3-7]/i.test(navigator.userAgent), isChrome: t.chrome, isFirefox: /Firefox/i.test(navigator.userAgent), prefixElement: r.createElement("div"), prefixMatches: {}, scrollAnchor: null, scrollPropertyLeft: null, scrollPropertyTop: null, isTicking: !1, calls: [] }, CSS: {}, Utilities: f, Redirects: {}, Easings: {}, Promise: t.Promise, defaults: { queue: "", duration: h, easing: v, begin: a, complete: a, progress: a, display: a, visibility: a, loop: !1, delay: !1, mobileHA: !0, _cacheValues: !0 }, init: function (e) {
f.data(e, "velocity", { isSVG: m.isSVG(e), isAnimating: !1, computedStyle: null, tweensContainer: null, rootPropertyValueCache: {}, transformCache: {} });
}, hook: null, mock: !1, version: { major: 1, minor: 2, patch: 2 }, debug: !1 };t.pageYOffset !== a ? (b.State.scrollAnchor = t, b.State.scrollPropertyLeft = "pageXOffset", b.State.scrollPropertyTop = "pageYOffset") : (b.State.scrollAnchor = r.documentElement || r.body.parentNode || r.body, b.State.scrollPropertyLeft = "scrollLeft", b.State.scrollPropertyTop = "scrollTop");var x = function () {
}, hook: null, mock: !1, version: { major: 1, minor: 2, patch: 2 }, debug: !1
}; t.pageYOffset !== a ? (b.State.scrollAnchor = t, b.State.scrollPropertyLeft = "pageXOffset", b.State.scrollPropertyTop = "pageYOffset") : (b.State.scrollAnchor = r.documentElement || r.body.parentNode || r.body, b.State.scrollPropertyLeft = "scrollLeft", b.State.scrollPropertyTop = "scrollTop"); var x = function () {
function e(e) {
return -e.tension * e.x - e.friction * e.v;
} function t(t, r, a) {
@@ -451,15 +457,19 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
return u[e * (u.length - 1) | 0];
} : c;
};
}();b.Easings = { linear: function (e) {
}(); b.Easings = {
linear: function (e) {
return e;
}, swing: function (e) {
return .5 - Math.cos(e * Math.PI) / 2;
}, spring: function (e) {
return 1 - Math.cos(4.5 * e * Math.PI) * Math.exp(6 * -e);
} }, f.each([["ease", [.25, .1, .25, 1]], ["ease-in", [.42, 0, 1, 1]], ["ease-out", [0, 0, .58, 1]], ["ease-in-out", [.42, 0, .58, 1]], ["easeInSine", [.47, 0, .745, .715]], ["easeOutSine", [.39, .575, .565, 1]], ["easeInOutSine", [.445, .05, .55, .95]], ["easeInQuad", [.55, .085, .68, .53]], ["easeOutQuad", [.25, .46, .45, .94]], ["easeInOutQuad", [.455, .03, .515, .955]], ["easeInCubic", [.55, .055, .675, .19]], ["easeOutCubic", [.215, .61, .355, 1]], ["easeInOutCubic", [.645, .045, .355, 1]], ["easeInQuart", [.895, .03, .685, .22]], ["easeOutQuart", [.165, .84, .44, 1]], ["easeInOutQuart", [.77, 0, .175, 1]], ["easeInQuint", [.755, .05, .855, .06]], ["easeOutQuint", [.23, 1, .32, 1]], ["easeInOutQuint", [.86, 0, .07, 1]], ["easeInExpo", [.95, .05, .795, .035]], ["easeOutExpo", [.19, 1, .22, 1]], ["easeInOutExpo", [1, 0, 0, 1]], ["easeInCirc", [.6, .04, .98, .335]], ["easeOutCirc", [.075, .82, .165, 1]], ["easeInOutCirc", [.785, .135, .15, .86]]], function (e, t) {
}
}, f.each([["ease", [.25, .1, .25, 1]], ["ease-in", [.42, 0, 1, 1]], ["ease-out", [0, 0, .58, 1]], ["ease-in-out", [.42, 0, .58, 1]], ["easeInSine", [.47, 0, .745, .715]], ["easeOutSine", [.39, .575, .565, 1]], ["easeInOutSine", [.445, .05, .55, .95]], ["easeInQuad", [.55, .085, .68, .53]], ["easeOutQuad", [.25, .46, .45, .94]], ["easeInOutQuad", [.455, .03, .515, .955]], ["easeInCubic", [.55, .055, .675, .19]], ["easeOutCubic", [.215, .61, .355, 1]], ["easeInOutCubic", [.645, .045, .355, 1]], ["easeInQuart", [.895, .03, .685, .22]], ["easeOutQuart", [.165, .84, .44, 1]], ["easeInOutQuart", [.77, 0, .175, 1]], ["easeInQuint", [.755, .05, .855, .06]], ["easeOutQuint", [.23, 1, .32, 1]], ["easeInOutQuint", [.86, 0, .07, 1]], ["easeInExpo", [.95, .05, .795, .035]], ["easeOutExpo", [.19, 1, .22, 1]], ["easeInOutExpo", [1, 0, 0, 1]], ["easeInCirc", [.6, .04, .98, .335]], ["easeOutCirc", [.075, .82, .165, 1]], ["easeInOutCirc", [.785, .135, .15, .86]]], function (e, t) {
b.Easings[t[0]] = l.apply(null, t[1]);
});var S = b.CSS = { RegEx: { isHex: /^#([A-f\d]{3}){1,2}$/i, valueUnwrap: /^[A-z]+\((.*)\)$/i, wrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/, valueSplit: /([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi }, Lists: { colors: ["fill", "stroke", "stopColor", "color", "backgroundColor", "borderColor", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "outlineColor"], transformsBase: ["translateX", "translateY", "scale", "scaleX", "scaleY", "skewX", "skewY", "rotateZ"], transforms3D: ["transformPerspective", "translateZ", "scaleZ", "rotateX", "rotateY"] }, Hooks: { templates: { textShadow: ["Color X Y Blur", "black 0px 0px 0px"], boxShadow: ["Color X Y Blur Spread", "black 0px 0px 0px 0px"], clip: ["Top Right Bottom Left", "0px 0px 0px 0px"], backgroundPosition: ["X Y", "0% 0%"], transformOrigin: ["X Y Z", "50% 50% 0px"], perspectiveOrigin: ["X Y", "50% 50%"] }, registered: {}, register: function () {
}); var S = b.CSS = {
RegEx: { isHex: /^#([A-f\d]{3}){1,2}$/i, valueUnwrap: /^[A-z]+\((.*)\)$/i, wrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/, valueSplit: /([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi }, Lists: { colors: ["fill", "stroke", "stopColor", "color", "backgroundColor", "borderColor", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "outlineColor"], transformsBase: ["translateX", "translateY", "scale", "scaleX", "scaleY", "skewX", "skewY", "rotateZ"], transforms3D: ["transformPerspective", "translateZ", "scaleZ", "rotateX", "rotateY"] }, Hooks: {
templates: { textShadow: ["Color X Y Blur", "black 0px 0px 0px"], boxShadow: ["Color X Y Blur Spread", "black 0px 0px 0px 0px"], clip: ["Top Right Bottom Left", "0px 0px 0px 0px"], backgroundPosition: ["X Y", "0% 0%"], transformOrigin: ["X Y Z", "50% 50% 0px"], perspectiveOrigin: ["X Y", "50% 50%"] }, registered: {}, register: function () {
for (var e = 0; e < S.Lists.colors.length; e++) {
var t = "color" === S.Lists.colors[e] ? "0 0 0 1" : "255 255 255 1"; S.Hooks.templates[S.Lists.colors[e]] = ["Red Green Blue Alpha", t];
} var r, a, n; if (d) for (r in S.Hooks.templates) {
@@ -486,54 +496,74 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
i = a[0],
s = a[1]; return r = S.Hooks.cleanRootPropertyValue(i, r), n = r.toString().match(S.RegEx.valueSplit), n[s] = t, o = n.join(" ");
} return r;
} }, Normalizations: { registered: { clip: function (e, t, r) {
switch (e) {case "name":
}
}, Normalizations: {
registered: {
clip: function (e, t, r) {
switch (e) {
case "name":
return "clip"; case "extract":
var a; return S.RegEx.wrappedValueAlreadyExtracted.test(r) ? a = r : (a = r.toString().match(S.RegEx.valueUnwrap), a = a ? a[1].replace(/,(\s+)?/g, " ") : r), a; case "inject":
return "rect(" + r + ")";}
return "rect(" + r + ")";
}
}, blur: function (e, t, r) {
switch (e) {case "name":
switch (e) {
case "name":
return b.State.isFirefox ? "filter" : "-webkit-filter"; case "extract":
var a = parseFloat(r); if (!a && 0 !== a) {
var n = r.toString().match(/blur\(([0-9]+[A-z]+)\)/i); a = n ? n[1] : 0;
} return a; case "inject":
return parseFloat(r) ? "blur(" + r + ")" : "none";}
return parseFloat(r) ? "blur(" + r + ")" : "none";
}
}, opacity: function (e, t, r) {
if (8 >= d) switch (e) {case "name":
if (8 >= d) switch (e) {
case "name":
return "filter"; case "extract":
var a = r.toString().match(/alpha\(opacity=(.*)\)/i); return r = a ? a[1] / 100 : 1; case "inject":
return t.style.zoom = 1, parseFloat(r) >= 1 ? "" : "alpha(opacity=" + parseInt(100 * parseFloat(r), 10) + ")";} else switch (e) {case "name":
return t.style.zoom = 1, parseFloat(r) >= 1 ? "" : "alpha(opacity=" + parseInt(100 * parseFloat(r), 10) + ")";
} else switch (e) {
case "name":
return "opacity"; case "extract":
return r; case "inject":
return r;}
} }, register: function () {
return r;
}
}
}, register: function () {
9 >= d || b.State.isGingerbread || (S.Lists.transformsBase = S.Lists.transformsBase.concat(S.Lists.transforms3D)); for (var e = 0; e < S.Lists.transformsBase.length; e++) {
!function () {
var t = S.Lists.transformsBase[e]; S.Normalizations.registered[t] = function (e, r, n) {
switch (e) {case "name":
switch (e) {
case "name":
return "transform"; case "extract":
return i(r) === a || i(r).transformCache[t] === a ? /^scale/i.test(t) ? 1 : 0 : i(r).transformCache[t].replace(/[()]/g, ""); case "inject":
var o = !1;switch (t.substr(0, t.length - 1)) {case "translate":
var o = !1; switch (t.substr(0, t.length - 1)) {
case "translate":
o = !/(%|px|em|rem|vw|vh|\d)$/i.test(n); break; case "scal": case "scale":
b.State.isAndroid && i(r).transformCache[t] === a && 1 > n && (n = 1), o = !/(\d)$/i.test(n); break; case "skew":
o = !/(deg|\d)$/i.test(n); break; case "rotate":
o = !/(deg|\d)$/i.test(n);}return o || (i(r).transformCache[t] = "(" + n + ")"), i(r).transformCache[t];}
o = !/(deg|\d)$/i.test(n);
}return o || (i(r).transformCache[t] = "(" + n + ")"), i(r).transformCache[t];
}
};
}();
} for (var e = 0; e < S.Lists.colors.length; e++) {
!function () {
var t = S.Lists.colors[e]; S.Normalizations.registered[t] = function (e, r, n) {
switch (e) {case "name":
switch (e) {
case "name":
return t; case "extract":
var o; if (S.RegEx.wrappedValueAlreadyExtracted.test(n)) o = n; else {
var i,
s = { black: "rgb(0, 0, 0)", blue: "rgb(0, 0, 255)", gray: "rgb(128, 128, 128)", green: "rgb(0, 128, 0)", red: "rgb(255, 0, 0)", white: "rgb(255, 255, 255)" }; /^[A-z]+$/i.test(n) ? i = s[n] !== a ? s[n] : s.black : S.RegEx.isHex.test(n) ? i = "rgb(" + S.Values.hexToRgb(n).join(" ") + ")" : /^rgba?\(/i.test(n) || (i = s.black), o = (i || n).toString().match(S.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g, " ");
} return 8 >= d || 3 !== o.split(" ").length || (o += " 1"), o; case "inject":
return 8 >= d ? 4 === n.split(" ").length && (n = n.split(/\s+/).slice(0, 3).join(" ")) : 3 === n.split(" ").length && (n += " 1"), (8 >= d ? "rgb" : "rgba") + "(" + n.replace(/\s+/g, ",").replace(/\.(\d)+(?=,)/g, "") + ")";}
return 8 >= d ? 4 === n.split(" ").length && (n = n.split(/\s+/).slice(0, 3).join(" ")) : 3 === n.split(" ").length && (n += " 1"), (8 >= d ? "rgb" : "rgba") + "(" + n.replace(/\s+/g, ",").replace(/\.(\d)+(?=,)/g, "") + ")";
}
};
}();
}
} }, Names: { camelCase: function (e) {
}
}, Names: {
camelCase: function (e) {
return e.replace(/-(\w)/g, function (e, t) {
return t.toUpperCase();
});
@@ -545,7 +575,9 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
return e.toUpperCase();
}), m.isString(b.State.prefixElement.style[n])) return b.State.prefixMatches[e] = n, [n, !0];
} return [e, !1];
} }, Values: { hexToRgb: function (e) {
}
}, Values: {
hexToRgb: function (e) {
var t,
r = /^#?([a-f\d])([a-f\d])([a-f\d])$/i,
a = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i; return e = e.replace(r, function (e, t, r, a) {
@@ -563,7 +595,8 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
e.classList ? e.classList.add(t) : e.className += (e.className.length ? " " : "") + t;
}, removeClass: function (e, t) {
e.classList ? e.classList.remove(t) : e.className = e.className.toString().replace(new RegExp("(^|\\s)" + t.split(" ").join("|") + "(\\s|$)", "gi"), " ");
} }, getPropertyValue: function (e, r, n, o) {
}
}, getPropertyValue: function (e, r, n, o) {
function s(e, r) {
function n() {
u && S.setPropertyValue(e, "display", "none");
@@ -613,7 +646,8 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
return n = i(e).transformCache[t], "transformPerspective" === t ? (o = n, !0) : (9 === d && "rotateZ" === t && (t = "rotate"), void (r += t + n + " "));
}), o && (r = "perspective" + o + " " + r);
} S.setPropertyValue(e, "transform", r);
} };S.Hooks.register(), S.Normalizations.register(), b.hook = function (e, t, r) {
}
}; S.Hooks.register(), S.Normalizations.register(), b.hook = function (e, t, r) {
var n = a; return e = o(e), f.each(e, function (e, o) {
if (i(o) === a && b.init(o), r === a) n === a && (n = b.CSS.getPropertyValue(o, t)); else {
var s = b.CSS.setPropertyValue(o, t, r); "transform" === s[0] && b.CSS.flushTransformCache(o), n = s;
@@ -685,18 +719,24 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
D = !1; if (W = d(z, M), M = W[0], Y = W[1], W = d(z, q), q = W[0].replace(/^([+-\/*])=/, function (e, t) {
return D = t, "";
}), G = W[1], M = parseFloat(M) || 0, q = parseFloat(q) || 0, "%" === G && (/^(fontSize|lineHeight)$/.test(z) ? (q /= 100, G = "em") : /^scale/.test(z) ? (q /= 100, G = "") : /(Red|Green|Blue)$/i.test(z) && (q = q / 100 * 255, G = "")), /[\/*]/.test(D)) G = Y; else if (Y !== G && 0 !== M) if (0 === q) G = Y; else {
n = n || h();var Q = /margin|padding|left|right|width|text|word|letter/i.test(z) || /X$/.test(z) || "x" === z ? "x" : "y";switch (Y) {case "%":
n = n || h(); var Q = /margin|padding|left|right|width|text|word|letter/i.test(z) || /X$/.test(z) || "x" === z ? "x" : "y"; switch (Y) {
case "%":
M *= "x" === Q ? n.percentToPxWidth : n.percentToPxHeight; break; case "px":
break; default:
M *= n[Y + "ToPx"];}switch (G) {case "%":
M *= n[Y + "ToPx"];
}switch (G) {
case "%":
M *= 1 / ("x" === Q ? n.percentToPxWidth : n.percentToPxHeight); break; case "px":
break; default:
M *= 1 / n[G + "ToPx"];}
}switch (D) {case "+":
M *= 1 / n[G + "ToPx"];
}
} switch (D) {
case "+":
q = M + q; break; case "-":
q = M - q; break; case "*":
q = M * q; break; case "/":
q = M / q;}l[z] = { rootPropertyValue: B, startValue: M, currentValue: M, endValue: q, unitType: G, easing: $ }, b.debug && console.log("tweensContainer (" + z + "): " + JSON.stringify(l[z]), o);
q = M / q;
}l[z] = { rootPropertyValue: B, startValue: M, currentValue: M, endValue: q, unitType: G, easing: $ }, b.debug && console.log("tweensContainer (" + z + "): " + JSON.stringify(l[z]), o);
} else b.debug && console.log("Skipping [" + I + "] due to a lack of browser support.");
} l.element = o;
} l.element && (S.Values.addClass(o, "velocity-animating"), R.push(l), "" === s.queue && (i(o).tweensContainer = l, i(o).opts = s), i(o).isAnimating = !0, V === w - 1 ? (b.State.calls.push([R, g, s, null, k.resolver]), b.State.isTicking === !1 && (b.State.isTicking = !0, c())) : V++);
@@ -705,11 +745,13 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
s = f.extend({}, b.defaults, v),
l = {}; switch (i(o) === a && b.init(o), parseFloat(s.delay) && s.queue !== !1 && f.queue(o, s.queue, function (e) {
b.velocityQueueEntryFlag = !0, i(o).delayTimer = { setTimeout: setTimeout(e, parseFloat(s.delay)), next: e };
}), s.duration.toString().toLowerCase()) {case "fast":
}), s.duration.toString().toLowerCase()) {
case "fast":
s.duration = 200; break; case "normal":
s.duration = h; break; case "slow":
s.duration = 600; break; default:
s.duration = parseFloat(s.duration) || 1;}b.mock !== !1 && (b.mock === !0 ? s.duration = s.delay = 1 : (s.duration *= parseFloat(b.mock) || 1, s.delay *= parseFloat(b.mock) || 1)), s.easing = u(s.easing, s.duration), s.begin && !m.isFunction(s.begin) && (s.begin = null), s.progress && !m.isFunction(s.progress) && (s.progress = null), s.complete && !m.isFunction(s.complete) && (s.complete = null), s.display !== a && null !== s.display && (s.display = s.display.toString().toLowerCase(), "auto" === s.display && (s.display = b.CSS.Values.getDisplayType(o))), s.visibility !== a && null !== s.visibility && (s.visibility = s.visibility.toString().toLowerCase()), s.mobileHA = s.mobileHA && b.State.isMobile && !b.State.isGingerbread, s.queue === !1 ? s.delay ? setTimeout(e, s.delay) : e() : f.queue(o, s.queue, function (t, r) {
s.duration = parseFloat(s.duration) || 1;
}b.mock !== !1 && (b.mock === !0 ? s.duration = s.delay = 1 : (s.duration *= parseFloat(b.mock) || 1, s.delay *= parseFloat(b.mock) || 1)), s.easing = u(s.easing, s.duration), s.begin && !m.isFunction(s.begin) && (s.begin = null), s.progress && !m.isFunction(s.progress) && (s.progress = null), s.complete && !m.isFunction(s.complete) && (s.complete = null), s.display !== a && null !== s.display && (s.display = s.display.toString().toLowerCase(), "auto" === s.display && (s.display = b.CSS.Values.getDisplayType(o))), s.visibility !== a && null !== s.visibility && (s.visibility = s.visibility.toString().toLowerCase()), s.mobileHA = s.mobileHA && b.State.isMobile && !b.State.isGingerbread, s.queue === !1 ? s.delay ? setTimeout(e, s.delay) : e() : f.queue(o, s.queue, function (t, r) {
return r === !0 ? (k.promise && k.resolver(g), !0) : (b.velocityQueueEntryFlag = !0, void e(t));
}), "" !== s.queue && "fx" !== s.queue || "inprogress" === f.queue(o)[0] || f.dequeue(o);
} var s,
@@ -726,7 +768,8 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
}
} var k = { promise: null, resolver: null, rejecter: null }; s && b.Promise && (k.promise = new b.Promise(function (e, t) {
k.resolver = e, k.rejecter = t;
}));var A;switch (y) {case "scroll":
})); var A; switch (y) {
case "scroll":
A = "scroll"; break; case "reverse":
A = "reverse"; break; case "finish": case "stop":
f.each(g, function (e, t) {
@@ -752,7 +795,8 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
parseFloat(j.stagger) ? j.delay = H + parseFloat(j.stagger) * e : m.isFunction(j.stagger) && (j.delay = H + j.stagger.call(t, e, w)), j.drag && (j.duration = parseFloat(E) || (/^(callout|transition)/.test(y) ? 1e3 : h), j.duration = Math.max(j.duration * (j.backwards ? 1 - e / w : (e + 1) / w), .75 * j.duration, 200)), b.Redirects[y].call(t, t, j || {}, e, w, g, k.promise ? k : a);
}), e();
} var N = "Velocity: First argument (" + y + ") was not a property map, a known action, or a registered redirect. Aborting."; return k.promise ? k.rejecter(new Error(N)) : console.log(N), e();
}A = "start";}var L = { lastParent: null, lastPosition: null, lastFontSize: null, lastPercentToPxWidth: null, lastPercentToPxHeight: null, lastEmToPx: null, remToPx: null, vwToPx: null, vhToPx: null },
} A = "start";
}var L = { lastParent: null, lastPosition: null, lastFontSize: null, lastPercentToPxWidth: null, lastPercentToPxHeight: null, lastEmToPx: null, remToPx: null, vwToPx: null, vhToPx: null },
R = []; f.each(g, function (e, t) {
m.isNode(t) && n.call(t);
}); var z,
@@ -1009,18 +1053,23 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
Y = V | W,
Z = X | Y,
$ = ["x", "y"],
_ = ["clientX", "clientY"];ab.prototype = { handler: function () {}, init: function () {
_ = ["clientX", "clientY"]; ab.prototype = {
handler: function () { }, init: function () {
this.evEl && t(this.element, this.evEl, this.domHandler), this.evTarget && t(this.target, this.evTarget, this.domHandler), this.evWin && t(E(this.element), this.evWin, this.domHandler);
}, destroy: function () {
this.evEl && u(this.element, this.evEl, this.domHandler), this.evTarget && u(this.target, this.evTarget, this.domHandler), this.evWin && u(E(this.element), this.evWin, this.domHandler);
} };var ob = { mousedown: O, mousemove: P, mouseup: Q },
}
}; var ob = { mousedown: O, mousemove: P, mouseup: Q },
pb = "mousedown",
qb = "mousemove mouseup";p(rb, ab, { handler: function (a) {
qb = "mousemove mouseup"; p(rb, ab, {
handler: function (a) {
var b = ob[a.type]; b & O && 0 === a.button && (this.pressed = !0), b & P && 1 !== a.which && (b = Q), this.pressed && this.allow && (b & Q && (this.pressed = !1), this.callback(this.manager, b, { pointers: [a], changedPointers: [a], pointerType: L, srcEvent: a }));
} });var sb = { pointerdown: O, pointermove: P, pointerup: Q, pointercancel: R, pointerout: R },
}
}); var sb = { pointerdown: O, pointermove: P, pointerup: Q, pointercancel: R, pointerout: R },
tb = { 2: J, 3: K, 4: L, 5: M },
ub = "pointerdown",
vb = "pointermove pointerup pointercancel";a.MSPointerEvent && (ub = "MSPointerDown", vb = "MSPointerMove MSPointerUp MSPointerCancel"), p(wb, ab, { handler: function (a) {
vb = "pointermove pointerup pointercancel"; a.MSPointerEvent && (ub = "MSPointerDown", vb = "MSPointerMove MSPointerUp MSPointerCancel"), p(wb, ab, {
handler: function (a) {
var b = this.store,
c = !1,
d = a.type.toLowerCase().replace("ms", ""),
@@ -1028,29 +1077,37 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
f = tb[a.pointerType] || a.pointerType,
g = f == J,
h = y(b, a.pointerId, "pointerId"); e & O && (0 === a.button || g) ? 0 > h && (b.push(a), h = b.length - 1) : e & (Q | R) && (c = !0), 0 > h || (b[h] = a, this.callback(this.manager, e, { pointers: b, changedPointers: [a], pointerType: f, srcEvent: a }), c && b.splice(h, 1));
} });var xb = { touchstart: O, touchmove: P, touchend: Q, touchcancel: R },
}
}); var xb = { touchstart: O, touchmove: P, touchend: Q, touchcancel: R },
yb = "touchstart",
zb = "touchstart touchmove touchend touchcancel";p(Ab, ab, { handler: function (a) {
zb = "touchstart touchmove touchend touchcancel"; p(Ab, ab, {
handler: function (a) {
var b = xb[a.type]; if (b === O && (this.started = !0), this.started) {
var c = Bb.call(this, a, b); b & (Q | R) && 0 === c[0].length - c[1].length && (this.started = !1), this.callback(this.manager, b, { pointers: c[0], changedPointers: c[1], pointerType: J, srcEvent: a });
}
} });var Cb = { touchstart: O, touchmove: P, touchend: Q, touchcancel: R },
Db = "touchstart touchmove touchend touchcancel";p(Eb, ab, { handler: function (a) {
}
}); var Cb = { touchstart: O, touchmove: P, touchend: Q, touchcancel: R },
Db = "touchstart touchmove touchend touchcancel"; p(Eb, ab, {
handler: function (a) {
var b = Cb[a.type],
c = Fb.call(this, a, b); c && this.callback(this.manager, b, { pointers: c[0], changedPointers: c[1], pointerType: J, srcEvent: a });
} }), p(Gb, ab, { handler: function (a, b, c) {
}
}), p(Gb, ab, {
handler: function (a, b, c) {
var d = c.pointerType == J,
e = c.pointerType == L; if (d) this.mouse.allow = !1; else if (e && !this.mouse.allow) return; b & (Q | R) && (this.mouse.allow = !0), this.callback(a, b, c);
}, destroy: function () {
this.touch.destroy(), this.mouse.destroy();
} });var Hb = B(f.style, "touchAction"),
}
}); var Hb = B(f.style, "touchAction"),
Ib = Hb !== d,
Jb = "compute",
Kb = "auto",
Lb = "manipulation",
Mb = "none",
Nb = "pan-x",
Ob = "pan-y";Pb.prototype = { set: function (a) {
Ob = "pan-y"; Pb.prototype = {
set: function (a) {
a == Jb && (a = this.compute()), Ib && (this.manager.element.style[Hb] = a), this.actions = a.toLowerCase().trim();
}, update: function () {
this.set(this.manager.options.touchAction);
@@ -1068,13 +1125,15 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
}
}, preventSrc: function (a) {
this.manager.session.prevented = !0, a.preventDefault();
} };var Rb = 1,
}
}; var Rb = 1,
Sb = 2,
Tb = 4,
Ub = 8,
Vb = Ub,
Wb = 16,
Xb = 32;Yb.prototype = { defaults: {}, set: function (a) {
Xb = 32; Yb.prototype = {
defaults: {}, set: function (a) {
return n(this.options, a), this.manager && this.manager.touchAction.update(), this;
}, recognizeWith: function (a) {
if (l(a, "recognizeWith", this)) return this; var b = this.simultaneous; return a = _b(a, this), b[a.id] || (b[a.id] = a, a.recognizeWith(this)), this;
@@ -1101,14 +1160,18 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
} return !0;
}, recognize: function (a) {
var b = n({}, a); return r(this.options.enable, [this, b]) ? (this.state & (Vb | Wb | Xb) && (this.state = Rb), this.state = this.process(b), this.state & (Sb | Tb | Ub | Wb) && this.tryEmit(b), void 0) : (this.reset(), this.state = Xb, void 0);
}, process: function () {}, getTouchAction: function () {}, reset: function () {} }, p(ac, Yb, { defaults: { pointers: 1 }, attrTest: function (a) {
}, process: function () { }, getTouchAction: function () { }, reset: function () { }
}, p(ac, Yb, {
defaults: { pointers: 1 }, attrTest: function (a) {
var b = this.options.pointers; return 0 === b || a.pointers.length === b;
}, process: function (a) {
var b = this.state,
c = a.eventType,
d = b & (Sb | Tb),
e = this.attrTest(a); return d && (c & R || !e) ? b | Wb : d || e ? c & Q ? b | Ub : b & Sb ? b | Tb : Sb : Xb;
} }), p(bc, ac, { defaults: { event: "pan", threshold: 10, pointers: 1, direction: Z }, getTouchAction: function () {
}
}), p(bc, ac, {
defaults: { event: "pan", threshold: 10, pointers: 1, direction: Z }, getTouchAction: function () {
var a = this.options.direction,
b = []; return a & X && b.push(Ob), a & Y && b.push(Nb), b;
}, directionTest: function (a) {
@@ -1122,7 +1185,9 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
return ac.prototype.attrTest.call(this, a) && (this.state & Sb || !(this.state & Sb) && this.directionTest(a));
}, emit: function (a) {
this.pX = a.deltaX, this.pY = a.deltaY; var b = $b(a.direction); b && this.manager.emit(this.options.event + b, a), this._super.emit.call(this, a);
} }), p(cc, ac, { defaults: { event: "pinch", threshold: 0, pointers: 2 }, getTouchAction: function () {
}
}), p(cc, ac, {
defaults: { event: "pinch", threshold: 0, pointers: 2 }, getTouchAction: function () {
return [Mb];
}, attrTest: function (a) {
return this._super.attrTest.call(this, a) && (Math.abs(a.scale - 1) > this.options.threshold || this.state & Sb);
@@ -1130,7 +1195,9 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
if (this._super.emit.call(this, a), 1 !== a.scale) {
var b = a.scale < 1 ? "in" : "out"; this.manager.emit(this.options.event + b, a);
}
} }), p(dc, Yb, { defaults: { event: "press", pointers: 1, time: 500, threshold: 5 }, getTouchAction: function () {
}
}), p(dc, Yb, {
defaults: { event: "press", pointers: 1, time: 500, threshold: 5 }, getTouchAction: function () {
return [Kb];
}, process: function (a) {
var b = this.options,
@@ -1143,18 +1210,24 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
clearTimeout(this._timer);
}, emit: function (a) {
this.state === Vb && (a && a.eventType & Q ? this.manager.emit(this.options.event + "up", a) : (this._input.timeStamp = j(), this.manager.emit(this.options.event, this._input)));
} }), p(ec, ac, { defaults: { event: "rotate", threshold: 0, pointers: 2 }, getTouchAction: function () {
}
}), p(ec, ac, {
defaults: { event: "rotate", threshold: 0, pointers: 2 }, getTouchAction: function () {
return [Mb];
}, attrTest: function (a) {
return this._super.attrTest.call(this, a) && (Math.abs(a.rotation) > this.options.threshold || this.state & Sb);
} }), p(fc, ac, { defaults: { event: "swipe", threshold: 10, velocity: .65, direction: X | Y, pointers: 1 }, getTouchAction: function () {
}
}), p(fc, ac, {
defaults: { event: "swipe", threshold: 10, velocity: .65, direction: X | Y, pointers: 1 }, getTouchAction: function () {
return bc.prototype.getTouchAction.call(this);
}, attrTest: function (a) {
var c,
b = this.options.direction; return b & (X | Y) ? c = a.velocity : b & X ? c = a.velocityX : b & Y && (c = a.velocityY), this._super.attrTest.call(this, a) && b & a.direction && a.distance > this.options.threshold && i(c) > this.options.velocity && a.eventType & Q;
}, emit: function (a) {
var b = $b(a.direction); b && this.manager.emit(this.options.event + b, a), this.manager.emit(this.options.event, a);
} }), p(gc, Yb, { defaults: { event: "tap", pointers: 1, taps: 1, interval: 300, time: 250, threshold: 2, posThreshold: 10 }, getTouchAction: function () {
}
}), p(gc, Yb, {
defaults: { event: "tap", pointers: 1, taps: 1, interval: 300, time: 250, threshold: 2, posThreshold: 10 }, getTouchAction: function () {
return [Lb];
}, process: function (a) {
var b = this.options,
@@ -1174,8 +1247,10 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
clearTimeout(this._timer);
}, emit: function () {
this.state == Vb && (this._input.tapCount = this.count, this.manager.emit(this.options.event, this._input));
} }), hc.VERSION = "2.0.4", hc.defaults = { domEvents: !1, touchAction: Jb, enable: !0, inputTarget: null, inputClass: null, preset: [[ec, { enable: !1 }], [cc, { enable: !1 }, ["rotate"]], [fc, { direction: X }], [bc, { direction: X }, ["swipe"]], [gc], [gc, { event: "doubletap", taps: 2 }, ["tap"]], [dc]], cssProps: { userSelect: "default", touchSelect: "none", touchCallout: "none", contentZooming: "none", userDrag: "none", tapHighlightColor: "rgba(0,0,0,0)" } };var ic = 1,
jc = 2;kc.prototype = { set: function (a) {
}
}), hc.VERSION = "2.0.4", hc.defaults = { domEvents: !1, touchAction: Jb, enable: !0, inputTarget: null, inputClass: null, preset: [[ec, { enable: !1 }], [cc, { enable: !1 }, ["rotate"]], [fc, { direction: X }], [bc, { direction: X }, ["swipe"]], [gc], [gc, { event: "doubletap", taps: 2 }, ["tap"]], [dc]], cssProps: { userSelect: "default", touchSelect: "none", touchCallout: "none", contentZooming: "none", userDrag: "none", tapHighlightColor: "rgba(0,0,0,0)" } }; var ic = 1,
jc = 2; kc.prototype = {
set: function (a) {
return n(this.options, a), a.touchAction && this.touchAction.update(), a.inputTarget && (this.input.destroy(), this.input.target = a.inputTarget, this.input.init()), this;
}, stop: function (a) {
this.session.stopped = a ? jc : ic;
@@ -1213,7 +1288,8 @@ jQuery.Velocity ? console.log("Velocity is already loaded. You may be needlessly
}
}, destroy: function () {
this.element && lc(this, !1), this.handlers = {}, this.session = {}, this.input.destroy(), this.element = null;
} }, n(hc, { INPUT_START: O, INPUT_MOVE: P, INPUT_END: Q, INPUT_CANCEL: R, STATE_POSSIBLE: Rb, STATE_BEGAN: Sb, STATE_CHANGED: Tb, STATE_ENDED: Ub, STATE_RECOGNIZED: Vb, STATE_CANCELLED: Wb, STATE_FAILED: Xb, DIRECTION_NONE: S, DIRECTION_LEFT: T, DIRECTION_RIGHT: U, DIRECTION_UP: V, DIRECTION_DOWN: W, DIRECTION_HORIZONTAL: X, DIRECTION_VERTICAL: Y, DIRECTION_ALL: Z, Manager: kc, Input: ab, TouchAction: Pb, TouchInput: Eb, MouseInput: rb, PointerEventInput: wb, TouchMouseInput: Gb, SingleTouchInput: Ab, Recognizer: Yb, AttrRecognizer: ac, Tap: gc, Pan: bc, Swipe: fc, Pinch: cc, Rotate: ec, Press: dc, on: t, off: u, each: m, merge: o, extend: n, inherit: p, bindFn: q, prefixed: B }), typeof define == g && define.amd ? define(function () {
}
}, n(hc, { INPUT_START: O, INPUT_MOVE: P, INPUT_END: Q, INPUT_CANCEL: R, STATE_POSSIBLE: Rb, STATE_BEGAN: Sb, STATE_CHANGED: Tb, STATE_ENDED: Ub, STATE_RECOGNIZED: Vb, STATE_CANCELLED: Wb, STATE_FAILED: Xb, DIRECTION_NONE: S, DIRECTION_LEFT: T, DIRECTION_RIGHT: U, DIRECTION_UP: V, DIRECTION_DOWN: W, DIRECTION_HORIZONTAL: X, DIRECTION_VERTICAL: Y, DIRECTION_ALL: Z, Manager: kc, Input: ab, TouchAction: Pb, TouchInput: Eb, MouseInput: rb, PointerEventInput: wb, TouchMouseInput: Gb, SingleTouchInput: Ab, Recognizer: Yb, AttrRecognizer: ac, Tap: gc, Pan: bc, Swipe: fc, Pinch: cc, Rotate: ec, Press: dc, on: t, off: u, each: m, merge: o, extend: n, inherit: p, bindFn: q, prefixed: B }), typeof define == g && define.amd ? define(function () {
return hc;
}) : "undefined" != typeof module && module.exports ? module.exports = hc : a[c] = hc;
}(window, document, "Hammer");; (function (factory) {
@@ -1451,13 +1527,17 @@ if (Vel) {
object.parent().removeClass('active');
}
if (object.parent().hasClass('active')) {
object.siblings('.collapsible-body').stop(true, false).slideDown({ duration: 350, easing: "easeOutQuart", queue: false, complete: function () {
object.siblings('.collapsible-body').stop(true, false).slideDown({
duration: 350, easing: "easeOutQuart", queue: false, complete: function () {
$(this).css('height', '');
} });
}
});
} else {
object.siblings('.collapsible-body').stop(true, false).slideUp({ duration: 350, easing: "easeOutQuart", queue: false, complete: function () {
object.siblings('.collapsible-body').stop(true, false).slideUp({
duration: 350, easing: "easeOutQuart", queue: false, complete: function () {
$(this).css('height', '');
} });
}
});
}
$panel_headers.not(object).removeClass('active').parent().removeClass('active');
@@ -1486,13 +1566,17 @@ if (Vel) {
object.parent().removeClass('active');
}
if (object.parent().hasClass('active')) {
object.siblings('.collapsible-body').stop(true, false).slideDown({ duration: 350, easing: "easeOutQuart", queue: false, complete: function () {
object.siblings('.collapsible-body').stop(true, false).slideDown({
duration: 350, easing: "easeOutQuart", queue: false, complete: function () {
$(this).css('height', '');
} });
}
});
} else {
object.siblings('.collapsible-body').stop(true, false).slideUp({ duration: 350, easing: "easeOutQuart", queue: false, complete: function () {
object.siblings('.collapsible-body').stop(true, false).slideUp({
duration: 350, easing: "easeOutQuart", queue: false, complete: function () {
$(this).css('height', '');
} });
}
});
}
}
@@ -2376,7 +2460,8 @@ if (Vel) {
// Animate image + set z-index
if (origin.hasClass('responsive-img')) {
origin.velocity({ 'max-width': newWidth, 'width': originalWidth }, { duration: 0, queue: false,
origin.velocity({ 'max-width': newWidth, 'width': originalWidth }, {
duration: 0, queue: false,
complete: function () {
origin.css({ left: 0, top: 0 }).velocity({
height: newHeight,
@@ -2881,7 +2966,8 @@ if (Vel) {
// Mouse In
var started = false,
timeoutRef;
origin.on({ 'mouseenter.tooltip': function (e) {
origin.on({
'mouseenter.tooltip': function (e) {
var showTooltip = function () {
setAttributes();
started = true;
@@ -2994,7 +3080,8 @@ if (Vel) {
setTimeout(function () {
if (started !== true) {
tooltipEl.velocity({
opacity: 0, translateY: 0, translateX: 0 }, { duration: 225, queue: false });
opacity: 0, translateY: 0, translateX: 0
}, { duration: 225, queue: false });
backdrop.velocity({ opacity: 0, scaleX: 1, scaleY: 1 }, {
duration: 225,
queue: false,
@@ -3811,15 +3898,18 @@ if (Vel) {
width: ''
});
$('#sidenav-overlay').velocity({ opacity: 0 }, { duration: 200,
$('#sidenav-overlay').velocity({ opacity: 0 }, {
duration: 200,
queue: false, easing: 'easeOutQuad',
complete: function () {
$(this).remove();
} });
}
});
if (options.edge === 'left') {
// Reset phantom div
$dragTarget.css({ width: '', right: '', left: '0' });
menu.velocity({ 'translateX': '-100%' }, { duration: 200,
menu.velocity({ 'translateX': '-100%' }, {
duration: 200,
queue: false,
easing: 'easeOutCubic',
complete: function () {
@@ -3834,7 +3924,8 @@ if (Vel) {
} else {
// Reset phantom div
$dragTarget.css({ width: '', right: '0', left: '' });
menu.velocity({ 'translateX': '100%' }, { duration: 200,
menu.velocity({ 'translateX': '100%' }, {
duration: 200,
queue: false,
easing: 'easeOutCubic',
complete: function () {
@@ -3983,7 +4074,8 @@ if (Vel) {
});
// Slide menu closed
menu.velocity({ 'translateX': [-1 * options.menuWidth - 10, leftPos] }, { duration: 200, queue: false, easing: 'easeOutQuad' });
$overlay.velocity({ opacity: 0 }, { duration: 200, queue: false, easing: 'easeOutQuad',
$overlay.velocity({ opacity: 0 }, {
duration: 200, queue: false, easing: 'easeOutQuad',
complete: function () {
// Run 'onClose' when sidenav is closed via touch/swipe if applicable
if (typeof options.onClose === 'function') {
@@ -3991,7 +4083,8 @@ if (Vel) {
}
$(this).remove();
} });
}
});
$dragTarget.css({ width: '10px', right: '', left: 0 });
}
} else {
@@ -4013,7 +4106,8 @@ if (Vel) {
// Slide menu closed
menu.velocity({ 'translateX': [options.menuWidth + 10, rightPos] }, { duration: 200, queue: false, easing: 'easeOutQuad' });
$overlay.velocity({ opacity: 0 }, { duration: 200, queue: false, easing: 'easeOutQuad',
$overlay.velocity({ opacity: 0 }, {
duration: 200, queue: false, easing: 'easeOutQuad',
complete: function () {
// Run 'onClose' when sidenav is closed via touch/swipe if applicable
if (typeof options.onClose === 'function') {
@@ -4021,7 +4115,8 @@ if (Vel) {
}
$(this).remove();
} });
}
});
$dragTarget.css({ width: '10px', right: 0, left: '' });
}
}
@@ -4059,7 +4154,8 @@ if (Vel) {
menuOut = false;
panning = false;
removeMenu();
$overlay.velocity({ opacity: 0 }, { duration: 300, queue: false, easing: 'easeOutQuad',
$overlay.velocity({ opacity: 0 }, {
duration: 300, queue: false, easing: 'easeOutQuad',
complete: function () {
$(this).remove();
}
@@ -4068,7 +4164,8 @@ if (Vel) {
// Append body
$('body').append($overlay);
$overlay.velocity({ opacity: 1 }, { duration: 300, queue: false, easing: 'easeOutQuad',
$overlay.velocity({ opacity: 1 }, {
duration: 300, queue: false, easing: 'easeOutQuad',
complete: function () {
menuOut = true;
panning = false;
@@ -5198,10 +5295,12 @@ if (Vel) {
$caption = $active.find('.caption');
$active.removeClass('active');
$active.velocity({ opacity: 0 }, { duration: options.transition, queue: false, easing: 'easeOutQuad',
$active.velocity({ opacity: 0 }, {
duration: options.transition, queue: false, easing: 'easeOutQuad',
complete: function () {
$slides.not('.active').velocity({ opacity: 0, translateX: 0, translateY: 0 }, { duration: 0, queue: false });
} });
}
});
captionTransition($caption, options.transition);
// Update indicators
@@ -5321,7 +5420,8 @@ if (Vel) {
$curr_slide = $slider.find('.active');
if (Math.abs(velocityX) > Math.abs(velocityY)) {
$curr_slide.velocity({ translateX: x
$curr_slide.velocity({
translateX: x
}, { duration: 50, queue: false, easing: 'easeOutQuad' });
}
@@ -5341,7 +5441,8 @@ if (Vel) {
if (next_slide.length === 0) {
next_slide = $slides.first();
}
next_slide.velocity({ opacity: 1
next_slide.velocity({
opacity: 1
}, { duration: 300, queue: false, easing: 'easeOutQuad' });
}
if (swipeRight) {
@@ -5349,7 +5450,8 @@ if (Vel) {
if (next_slide.length === 0) {
next_slide = $slides.last();
}
next_slide.velocity({ opacity: 1
next_slide.velocity({
opacity: 1
}, { duration: 300, queue: false, easing: 'easeOutQuad' });
}
}
@@ -5362,20 +5464,25 @@ if (Vel) {
if (!swipeRight && !swipeLeft || $slides.length <= 1) {
// Return to original spot
$curr_slide.velocity({ translateX: 0
$curr_slide.velocity({
translateX: 0
}, { duration: 300, queue: false, easing: 'easeOutQuad' });
} else if (swipeLeft) {
moveToSlide(curr_index + 1);
$curr_slide.velocity({ translateX: -1 * $this.innerWidth() }, { duration: 300, queue: false, easing: 'easeOutQuad',
$curr_slide.velocity({ translateX: -1 * $this.innerWidth() }, {
duration: 300, queue: false, easing: 'easeOutQuad',
complete: function () {
$curr_slide.velocity({ opacity: 0, translateX: 0 }, { duration: 0, queue: false });
} });
}
});
} else if (swipeRight) {
moveToSlide(curr_index - 1);
$curr_slide.velocity({ translateX: $this.innerWidth() }, { duration: 300, queue: false, easing: 'easeOutQuad',
$curr_slide.velocity({ translateX: $this.innerWidth() }, {
duration: 300, queue: false, easing: 'easeOutQuad',
complete: function () {
$curr_slide.velocity({ opacity: 0, translateX: 0 }, { duration: 0, queue: false });
} });
}
});
}
swipeLeft = false;
swipeRight = false;
@@ -6195,7 +6302,8 @@ if (Vel) {
var x = e.gesture.deltaX;
var velocityX = e.gesture.velocityX;
$this.velocity({ translateX: x
$this.velocity({
translateX: x
}, { duration: 50, queue: false, easing: 'easeOutQuad' });
// Swipe Left
@@ -6225,18 +6333,23 @@ if (Vel) {
fullWidth = -1 * $this.innerWidth();
}
$this.velocity({ translateX: fullWidth
}, { duration: 100, queue: false, easing: 'easeOutQuad', complete: function () {
$this.velocity({
translateX: fullWidth
}, {
duration: 100, queue: false, easing: 'easeOutQuad', complete: function () {
$this.css('border', 'none');
$this.velocity({ height: 0, padding: 0
}, { duration: 200, queue: false, easing: 'easeOutQuad', complete: function () {
$this.velocity({
height: 0, padding: 0
}, {
duration: 200, queue: false, easing: 'easeOutQuad', complete: function () {
$this.remove();
}
});
}
});
} else {
$this.velocity({ translateX: 0
$this.velocity({
translateX: 0
}, { duration: 100, queue: false, easing: 'easeOutQuad' });
}
swipeLeft = false;

View File

@@ -1,33 +1,96 @@
/*
A JavaScript implementation of the SHA family of hashes, as
defined in FIPS PUB 180-4 and FIPS PUB 202, as well as the corresponding
HMAC implementation as defined in FIPS PUB 198a
var sha256 = function sha256(ascii) {
function rightRotate(value, amount) {
return (value >>> amount) | (value << (32 - amount));
};
Copyright 2008-2018 Brian Turek, 1998-2009 Paul Johnston & Contributors
Distributed under the BSD License
See http://caligatio.github.com/jsSHA/ for more information
*/
'use strict';(function(I){function w(c,a,d){var l=0,b=[],g=0,f,n,k,e,h,q,y,p,m=!1,t=[],r=[],u,z=!1;d=d||{};f=d.encoding||"UTF8";u=d.numRounds||1;if(u!==parseInt(u,10)||1>u)throw Error("numRounds must a integer >= 1");if(0===c.lastIndexOf("SHA-",0))if(q=function(b,a){return A(b,a,c)},y=function(b,a,l,f){var g,e;if("SHA-224"===c||"SHA-256"===c)g=(a+65>>>9<<4)+15,e=16;else throw Error("Unexpected error in SHA-2 implementation");for(;b.length<=g;)b.push(0);b[a>>>5]|=128<<24-a%32;a=a+l;b[g]=a&4294967295;
b[g-1]=a/4294967296|0;l=b.length;for(a=0;a<l;a+=e)f=A(b.slice(a,a+e),f,c);if("SHA-224"===c)b=[f[0],f[1],f[2],f[3],f[4],f[5],f[6]];else if("SHA-256"===c)b=f;else throw Error("Unexpected error in SHA-2 implementation");return b},p=function(b){return b.slice()},"SHA-224"===c)h=512,e=224;else if("SHA-256"===c)h=512,e=256;else throw Error("Chosen SHA variant is not supported");else throw Error("Chosen SHA variant is not supported");k=B(a,f);n=x(c);this.setHMACKey=function(b,a,g){var e;if(!0===m)throw Error("HMAC key already set");
if(!0===z)throw Error("Cannot set HMAC key after calling update");f=(g||{}).encoding||"UTF8";a=B(a,f)(b);b=a.binLen;a=a.value;e=h>>>3;g=e/4-1;if(e<b/8){for(a=y(a,b,0,x(c));a.length<=g;)a.push(0);a[g]&=4294967040}else if(e>b/8){for(;a.length<=g;)a.push(0);a[g]&=4294967040}for(b=0;b<=g;b+=1)t[b]=a[b]^909522486,r[b]=a[b]^1549556828;n=q(t,n);l=h;m=!0};this.update=function(a){var c,f,e,d=0,p=h>>>5;c=k(a,b,g);a=c.binLen;f=c.value;c=a>>>5;for(e=0;e<c;e+=p)d+h<=a&&(n=q(f.slice(e,e+p),n),d+=h);l+=d;b=f.slice(d>>>
5);g=a%h;z=!0};this.getHash=function(a,f){var d,h,k,q;if(!0===m)throw Error("Cannot call getHash after setting HMAC key");k=C(f);switch(a){case "HEX":d=function(a){return D(a,e,k)};break;case "B64":d=function(a){return E(a,e,k)};break;case "BYTES":d=function(a){return F(a,e)};break;case "ARRAYBUFFER":try{h=new ArrayBuffer(0)}catch(v){throw Error("ARRAYBUFFER not supported by this environment");}d=function(a){return G(a,e)};break;default:throw Error("format must be HEX, B64, BYTES, or ARRAYBUFFER");
}q=y(b.slice(),g,l,p(n));for(h=1;h<u;h+=1)q=y(q,e,0,x(c));return d(q)};this.getHMAC=function(a,f){var d,k,t,u;if(!1===m)throw Error("Cannot call getHMAC without first setting HMAC key");t=C(f);switch(a){case "HEX":d=function(a){return D(a,e,t)};break;case "B64":d=function(a){return E(a,e,t)};break;case "BYTES":d=function(a){return F(a,e)};break;case "ARRAYBUFFER":try{d=new ArrayBuffer(0)}catch(v){throw Error("ARRAYBUFFER not supported by this environment");}d=function(a){return G(a,e)};break;default:throw Error("outputFormat must be HEX, B64, BYTES, or ARRAYBUFFER");
}k=y(b.slice(),g,l,p(n));u=q(r,x(c));u=y(k,e,h,u);return d(u)}}function m(){}function D(c,a,d){var l="";a/=8;var b,g;for(b=0;b<a;b+=1)g=c[b>>>2]>>>8*(3+b%4*-1),l+="0123456789abcdef".charAt(g>>>4&15)+"0123456789abcdef".charAt(g&15);return d.outputUpper?l.toUpperCase():l}function E(c,a,d){var l="",b=a/8,g,f,n;for(g=0;g<b;g+=3)for(f=g+1<b?c[g+1>>>2]:0,n=g+2<b?c[g+2>>>2]:0,n=(c[g>>>2]>>>8*(3+g%4*-1)&255)<<16|(f>>>8*(3+(g+1)%4*-1)&255)<<8|n>>>8*(3+(g+2)%4*-1)&255,f=0;4>f;f+=1)8*g+6*f<=a?l+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>>
6*(3-f)&63):l+=d.b64Pad;return l}function F(c,a){var d="",l=a/8,b,g;for(b=0;b<l;b+=1)g=c[b>>>2]>>>8*(3+b%4*-1)&255,d+=String.fromCharCode(g);return d}function G(c,a){var d=a/8,l,b=new ArrayBuffer(d),g;g=new Uint8Array(b);for(l=0;l<d;l+=1)g[l]=c[l>>>2]>>>8*(3+l%4*-1)&255;return b}function C(c){var a={outputUpper:!1,b64Pad:"=",shakeLen:-1};c=c||{};a.outputUpper=c.outputUpper||!1;!0===c.hasOwnProperty("b64Pad")&&(a.b64Pad=c.b64Pad);if("boolean"!==typeof a.outputUpper)throw Error("Invalid outputUpper formatting option");
if("string"!==typeof a.b64Pad)throw Error("Invalid b64Pad formatting option");return a}function B(c,a){var d;switch(a){case "UTF8":case "UTF16BE":case "UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE");}switch(c){case "HEX":d=function(a,b,c){var f=a.length,d,k,e,h,q;if(0!==f%2)throw Error("String of HEX type must be in byte increments");b=b||[0];c=c||0;q=c>>>3;for(d=0;d<f;d+=2){k=parseInt(a.substr(d,2),16);if(isNaN(k))throw Error("String of HEX type contains invalid characters");
h=(d>>>1)+q;for(e=h>>>2;b.length<=e;)b.push(0);b[e]|=k<<8*(3+h%4*-1)}return{value:b,binLen:4*f+c}};break;case "TEXT":d=function(c,b,d){var f,n,k=0,e,h,q,m,p,r;b=b||[0];d=d||0;q=d>>>3;if("UTF8"===a)for(r=3,e=0;e<c.length;e+=1)for(f=c.charCodeAt(e),n=[],128>f?n.push(f):2048>f?(n.push(192|f>>>6),n.push(128|f&63)):55296>f||57344<=f?n.push(224|f>>>12,128|f>>>6&63,128|f&63):(e+=1,f=65536+((f&1023)<<10|c.charCodeAt(e)&1023),n.push(240|f>>>18,128|f>>>12&63,128|f>>>6&63,128|f&63)),h=0;h<n.length;h+=1){p=k+
q;for(m=p>>>2;b.length<=m;)b.push(0);b[m]|=n[h]<<8*(r+p%4*-1);k+=1}else if("UTF16BE"===a||"UTF16LE"===a)for(r=2,n="UTF16LE"===a&&!0||"UTF16LE"!==a&&!1,e=0;e<c.length;e+=1){f=c.charCodeAt(e);!0===n&&(h=f&255,f=h<<8|f>>>8);p=k+q;for(m=p>>>2;b.length<=m;)b.push(0);b[m]|=f<<8*(r+p%4*-1);k+=2}return{value:b,binLen:8*k+d}};break;case "B64":d=function(a,b,c){var f=0,d,k,e,h,q,m,p;if(-1===a.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");k=a.indexOf("=");a=a.replace(/\=/g,
"");if(-1!==k&&k<a.length)throw Error("Invalid '=' found in base-64 string");b=b||[0];c=c||0;m=c>>>3;for(k=0;k<a.length;k+=4){q=a.substr(k,4);for(e=h=0;e<q.length;e+=1)d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(q[e]),h|=d<<18-6*e;for(e=0;e<q.length-1;e+=1){p=f+m;for(d=p>>>2;b.length<=d;)b.push(0);b[d]|=(h>>>16-8*e&255)<<8*(3+p%4*-1);f+=1}}return{value:b,binLen:8*f+c}};break;case "BYTES":d=function(a,b,c){var d,n,k,e,h;b=b||[0];c=c||0;k=c>>>3;for(n=0;n<a.length;n+=
1)d=a.charCodeAt(n),h=n+k,e=h>>>2,b.length<=e&&b.push(0),b[e]|=d<<8*(3+h%4*-1);return{value:b,binLen:8*a.length+c}};break;case "ARRAYBUFFER":try{d=new ArrayBuffer(0)}catch(l){throw Error("ARRAYBUFFER not supported by this environment");}d=function(a,b,c){var d,n,k,e,h;b=b||[0];c=c||0;n=c>>>3;h=new Uint8Array(a);for(d=0;d<a.byteLength;d+=1)e=d+n,k=e>>>2,b.length<=k&&b.push(0),b[k]|=h[d]<<8*(3+e%4*-1);return{value:b,binLen:8*a.byteLength+c}};break;default:throw Error("format must be HEX, TEXT, B64, BYTES, or ARRAYBUFFER");
}return d}function r(c,a){return c>>>a|c<<32-a}function J(c,a,d){return c&a^~c&d}function K(c,a,d){return c&a^c&d^a&d}function L(c){return r(c,2)^r(c,13)^r(c,22)}function M(c){return r(c,6)^r(c,11)^r(c,25)}function N(c){return r(c,7)^r(c,18)^c>>>3}function O(c){return r(c,17)^r(c,19)^c>>>10}function P(c,a){var d=(c&65535)+(a&65535);return((c>>>16)+(a>>>16)+(d>>>16)&65535)<<16|d&65535}function Q(c,a,d,l){var b=(c&65535)+(a&65535)+(d&65535)+(l&65535);return((c>>>16)+(a>>>16)+(d>>>16)+(l>>>16)+(b>>>
16)&65535)<<16|b&65535}function R(c,a,d,l,b){var g=(c&65535)+(a&65535)+(d&65535)+(l&65535)+(b&65535);return((c>>>16)+(a>>>16)+(d>>>16)+(l>>>16)+(b>>>16)+(g>>>16)&65535)<<16|g&65535}function x(c){var a=[],d;if(0===c.lastIndexOf("SHA-",0))switch(a=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],d=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],c){case "SHA-224":break;case "SHA-256":a=d;break;case "SHA-384":a=[new m,new m,
new m,new m,new m,new m,new m,new m];break;case "SHA-512":a=[new m,new m,new m,new m,new m,new m,new m,new m];break;default:throw Error("Unknown SHA variant");}else throw Error("No SHA variants supported");return a}function A(c,a,d){var l,b,g,f,n,k,e,h,m,r,p,w,t,x,u,z,A,B,C,D,E,F,v=[],G;if("SHA-224"===d||"SHA-256"===d)r=64,w=1,F=Number,t=P,x=Q,u=R,z=N,A=O,B=L,C=M,E=K,D=J,G=H;else throw Error("Unexpected error in SHA-2 implementation");d=a[0];l=a[1];b=a[2];g=a[3];f=a[4];n=a[5];k=a[6];e=a[7];for(p=
0;p<r;p+=1)16>p?(m=p*w,h=c.length<=m?0:c[m],m=c.length<=m+1?0:c[m+1],v[p]=new F(h,m)):v[p]=x(A(v[p-2]),v[p-7],z(v[p-15]),v[p-16]),h=u(e,C(f),D(f,n,k),G[p],v[p]),m=t(B(d),E(d,l,b)),e=k,k=n,n=f,f=t(g,h),g=b,b=l,l=d,d=t(h,m);a[0]=t(d,a[0]);a[1]=t(l,a[1]);a[2]=t(b,a[2]);a[3]=t(g,a[3]);a[4]=t(f,a[4]);a[5]=t(n,a[5]);a[6]=t(k,a[6]);a[7]=t(e,a[7]);return a}var H;H=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,
2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,
2756734187,3204031479,3329325298];"function"===typeof define&&define.amd?define(function(){return w}):"undefined"!==typeof exports?("undefined"!==typeof module&&module.exports&&(module.exports=w),exports=w):I.jsSHA=w})(this);
function sha256(token){
var shaObj = new jsSHA("SHA-256", "TEXT");
shaObj.update(token);
var hash = shaObj.getHash("HEX");
return hash;
var mathPow = Math.pow;
var maxWord = mathPow(2, 32);
var lengthProperty = 'length'
var i, j; // Used as a counter across the whole file
var result = ''
var words = [];
var asciiBitLength = ascii[lengthProperty] * 8;
//* caching results is optional - remove/add slash from front of this line to toggle
// Initial hash value: first 32 bits of the fractional parts of the square roots of the first 8 primes
// (we actually calculate the first 64, but extra values are just ignored)
var hash = sha256.h = sha256.h || [];
// Round constants: first 32 bits of the fractional parts of the cube roots of the first 64 primes
var k = sha256.k = sha256.k || [];
var primeCounter = k[lengthProperty];
/*/
var hash = [], k = [];
var primeCounter = 0;
//*/
var isComposite = {};
for (var candidate = 2; primeCounter < 64; candidate++) {
if (!isComposite[candidate]) {
for (i = 0; i < 313; i += candidate) {
isComposite[i] = candidate;
}
hash[primeCounter] = (mathPow(candidate, .5) * maxWord) | 0;
k[primeCounter++] = (mathPow(candidate, 1 / 3) * maxWord) | 0;
}
}
ascii += '\x80' // Append Ƈ' bit (plus zero padding)
while (ascii[lengthProperty] % 64 - 56) ascii += '\x00' // More zero padding
for (i = 0; i < ascii[lengthProperty]; i++) {
j = ascii.charCodeAt(i);
if (j >> 8) return; // ASCII check: only accept characters in range 0-255
words[i >> 2] |= j << ((3 - i) % 4) * 8;
}
words[words[lengthProperty]] = ((asciiBitLength / maxWord) | 0);
words[words[lengthProperty]] = (asciiBitLength)
// process each chunk
for (j = 0; j < words[lengthProperty];) {
var w = words.slice(j, j += 16); // The message is expanded into 64 words as part of the iteration
var oldHash = hash;
// This is now the undefinedworking hash", often labelled as variables a...g
// (we have to truncate as well, otherwise extra entries at the end accumulate
hash = hash.slice(0, 8);
for (i = 0; i < 64; i++) {
var i2 = i + j;
// Expand the message into 64 words
// Used below if
var w15 = w[i - 15], w2 = w[i - 2];
// Iterate
var a = hash[0], e = hash[4];
var temp1 = hash[7]
+ (rightRotate(e, 6) ^ rightRotate(e, 11) ^ rightRotate(e, 25)) // S1
+ ((e & hash[5]) ^ ((~e) & hash[6])) // ch
+ k[i]
// Expand the message schedule if needed
+ (w[i] = (i < 16) ? w[i] : (
w[i - 16]
+ (rightRotate(w15, 7) ^ rightRotate(w15, 18) ^ (w15 >>> 3)) // s0
+ w[i - 7]
+ (rightRotate(w2, 17) ^ rightRotate(w2, 19) ^ (w2 >>> 10)) // s1
) | 0
);
// This is only used once, so *could* be moved below, but it only saves 4 bytes and makes things unreadble
var temp2 = (rightRotate(a, 2) ^ rightRotate(a, 13) ^ rightRotate(a, 22)) // S0
+ ((a & hash[1]) ^ (a & hash[2]) ^ (hash[1] & hash[2])); // maj
hash = [(temp1 + temp2) | 0].concat(hash); // We don't bother trimming off the extra ones, they're harmless as long as we're truncating when we do the slice()
hash[4] = (hash[4] + temp1) | 0;
}
for (i = 0; i < 8; i++) {
hash[i] = (hash[i] + oldHash[i]) | 0;
}
}
for (i = 0; i < 8; i++) {
for (j = 3; j + 1; j--) {
var b = (hash[i] >> (j * 8)) & 255;
result += ((b < 16) ? 0 : '') + b.toString(16);
}
}
return result;
};

View File

@@ -1,9 +1,9 @@
//バージョンチェッカー
function verck(ver) {
console.log("Welcome")
console.log("%c Welcome😊", "color: red;font-size:200%;")
if (localStorage.getItem("ver") != ver) {
localStorage.setItem("ver", ver);
console.log("Thank you for your update");
console.log("%c Thank you for your update🎉", "color: red;font-size:200%;");
$(document).ready(function () {
$('#releasenote').modal('open');
verp = ver.replace('(', '');
@@ -13,7 +13,7 @@ function verck(ver) {
verp = verp.replace(']', '');
verp = verp.replace(')', '');
verp = verp.replace(' ', '_');
console.log(verp);
console.log("%c " + verp, "color: red;font-size:200%;");
if (lang.language == "ja") {
$("#release-" + verp).show();
} else {
@@ -26,6 +26,7 @@ function verck(ver) {
var remote = electron.remote;
var dialog = remote.dialog;
var platform = remote.process.platform;
console.log("Your platform:"+remote.process.platform)
if (platform == "win32") {
const options = {
type: 'info',
@@ -106,7 +107,7 @@ function verck(ver) {
todo(error);
console.error(error);
}).then(function (mess) {
console.log(mess);
console.table(mess);
if (mess) {
var electron = require("electron");
var remote = electron.remote;
@@ -128,7 +129,7 @@ function verck(ver) {
var ipc = electron.ipcRenderer;
ipc.send('update', "true");
} else {
console.log(lang.lang_version_skipver);
console.warn(lang.lang_version_skipver);
todo(lang.lang_version_skipver);
}
} else {
@@ -141,9 +142,7 @@ function verck(ver) {
if (!localStorage.getItem("last-notice-id")) {
localStorage.setItem("last-notice-id", 0)
}
console.log(localStorage.getItem("last-notice-id"))
var start = "https://thedesk.top/notice?since_id=" + localStorage.getItem("last-notice-id");
console.log(start);
fetch(start, {
method: 'GET'
}).then(function (response) {
@@ -152,7 +151,6 @@ function verck(ver) {
todo(error);
console.error(error);
}).then(function (mess) {
console.log(mess.length);
if (mess.length < 1) {
return false;
} else {
@@ -164,8 +162,8 @@ function verck(ver) {
break;
} else {
var show = true;
if(obj.Toot!=""){
var toot='<button class="btn-flat toast-action" onclick="detEx(\''+obj.Toot+'\',\'main\')">Show</button>';
if (obj.toot != "") {
var toot = '<button class="btn-flat toast-action" onclick="detEx(\'' + obj.toot + '\',\'main\')">Show</button>';
} else {
var toot = "";
}
@@ -190,7 +188,7 @@ function verck(ver) {
}
}
if (show) {
Materialize.toast(obj.Text+toot+'<span class="sml grey-text">(スライドして消去)</span>', 86400);
Materialize.toast(escapeHTML(obj.Text) + toot + '<span class="sml grey-text">(スライドして消去)</span>', 86400);
}
}
@@ -202,18 +200,13 @@ var infostreaming=false;
function infowebsocket() {
infows = new WebSocket("wss://thedesk.top/ws/");
infows.onopen = function (mess) {
console.log(tlid + ":Connect Streaming Info:");
console.log(mess);
console.log([tlid, ":Connect Streaming Info:", mess]);
infostreaming = true;
}
infows.onmessage = function (mess) {
console.log(":Receive Streaming:");
console.log(JSON.parse(mess.data));
console.log([tlid, ":Receive Streaming:", JSON.parse(mess.data)]);
var obj = JSON.parse(mess.data);
if (obj.type != "counter") {
if(obj.id*1<=localStorage.getItem("last-notice-id")){
}else{
localStorage.setItem("last-notice-id", obj.id)
var show = true;
if (obj.toot != "") {
@@ -242,8 +235,7 @@ function infowebsocket(){
}
}
if (show) {
Materialize.toast(obj.text+toot+'<span class="sml grey-text">(スライドして消去)</span>', 86400);
}
Materialize.toast(escapeHTML(obj.text) + toot + '<span class="sml grey-text">(スライドして消去)</span>', 86400);
}
} else {
$("#persons").text(obj.text);
@@ -262,7 +254,22 @@ function infowebsocket(){
}
setInterval(function () {
if (!infostreaming) {
console.log("try to connect")
console.log("try to connect to base-streaming")
infowebsocket();
}
}, 10000);
function openRN() {
$('#releasenote').modal('open');
if (lang.language == "ja") {
verp = ver.replace('(', '');
verp = verp.replace('.', '-');
verp = verp.replace('.', '-');
verp = verp.replace('[', '-');
verp = verp.replace(']', '');
verp = verp.replace(')', '');
verp = verp.replace(' ', '_');
$("#release-" + verp).show();
} else {
$("#release-en").show();
}
}

View File

@@ -42,7 +42,6 @@ function defaultEmoji(target){
});
$("#emoji-list").html(emojis);
$("#now-emoji").text(lang.lang_defaultemojis_text.replace("{{cat}}", defaultemojiname[target]));
console.log(target);
$(".emoji-control").addClass("hide");
}
function customEmoji() {
@@ -54,7 +53,12 @@ function defEmoji(target){
var emojiraw = newpack.filter(function (item, index) {
if (item.short_name == target) return true;
});
emoji=twemoji.convert.fromCodePoint(emojiraw[0].unified);
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 now = $("#textarea").val();
var selin = localStorage.getItem("cursor");
var now = $("#textarea").val();
@@ -65,7 +69,6 @@ function defEmoji(target){
} else {
newt = emoji + now;
}
console.log(emoji);
$("#textarea").val(newt);
$("#textarea").focus();
var selin = $("#textarea").prop('selectionStart');
@@ -76,7 +79,6 @@ function defEmoji(target){
}
function faicon() {
var json = faicons;
console.log(json);
var emojis = "";
Object.keys(json).forEach(function (key) {
var emoji = json[key];

View File

@@ -91,6 +91,7 @@ var lang={
"lang_list_users": "Users list",
"lang_list_nouser": "No users in this list.",
"lang_list_add": "Add to the list",
"lang_list_add_misskey": "(perhaps this user has been listed)",
"lang_list_remove": "Remove from the list",
//tl/notification.js
"lang_notf_new": " new notifications",
@@ -140,6 +141,7 @@ var lang={
"lang_hisdata_frcwarn": "Unfollow accounts will be shown.",
"lang_hisdata_taketime": "It will take 30s ~ several minutes",
"lang_hisdata_notonmisskey": "Misskey is unable to request.",
"lang_hisdata_key": "This user is proofed by {{set}}",
//userdata/showOnTL.js
"lang_showontl_movetxt": "This account was moved",
"lang_showontl_movebtn": "Continue on the new account",
@@ -148,6 +150,7 @@ var lang={
"lang_showontl_notf": "Notification ",
"lang_showontl_domain": "Domain ",
"lang_showontl_listwarn": "Follow to add this user to lists.",
"lang_showontl_verified": "This website is verified by owner at ",
//parse
"lang_parse_mentioned": " replied to you",
"lang_parse_faved": " favourited your toot",
@@ -186,10 +189,13 @@ var lang={
"lang_parse_clientmute": "muted",
"lang_parse_mute": " will be muted. You can remove on preferences.",
"lang_parse_voted": "Voted",
"lang_parse_vote":"Voted",
"lang_parse_vote": "Vote",
"lang_parse_unvoted": "Show the result without voting",
"lang_parse_endedvote": "Expired",
"lang_parse_thread": "Show thread",
"lang_parse_unknown": "Attached file",
"lang_parse_nsfw": "NSFW media",
"lang_parse_notffilter":"Show this user's notifications",
//misskey
"lang_misskeyparse_renote": "Repost",
"lang_misskeyparse_renoteqt": "Renote",

View File

@@ -91,6 +91,7 @@ var lang={
"lang_list_users": "ユーザー一覧",
"lang_list_nouser": "ユーザーはいません",
"lang_list_add": "リストに追加",
"lang_list_add_misskey": "(重複追加の可能性があります)",
"lang_list_remove": "リストから削除",
//tl/notification.js
"lang_notf_new": "件の新しい通知",
@@ -142,6 +143,7 @@ var lang={
"lang_hisdata_frcwarn": "非フォローだけど絡みがある時に表示されます。",
"lang_hisdata_taketime": "30秒から数分かかります",
"lang_hisdata_notonmisskey": "このシステムはMisskeyにはありません。",
"lang_hisdata_key": "このユーザーの信頼性は{{set}}によって示されています",
//userdata/showOnTL.js
"lang_showontl_movetxt": "このアカウントは移行しています",
"lang_showontl_movebtn": "移行先を見る",
@@ -150,6 +152,7 @@ var lang={
"lang_showontl_notf": "通知",
"lang_showontl_domain": "ドメイン",
"lang_showontl_listwarn": "リストに追加するためにはフォローが必要です。",
"lang_showontl_verified": "このユーザーの所持するWebサイトであると証明されています。",
//parse
"lang_parse_mentioned": "が返信しました",
"lang_parse_faved": "がお気に入り登録しました",
@@ -192,6 +195,9 @@ var lang={
"lang_parse_unvoted": "結果だけ見る",
"lang_parse_endedvote": "終了済み",
"lang_parse_thread": "会話を表示",
"lang_parse_unknown": "添付ファイル",
"lang_parse_nsfw": "閲覧注意",
"lang_parse_notffilter":"このユーザーの通知のみを表示",
//misskey
"lang_misskeyparse_renote": "再投稿",
"lang_misskeyparse_renoteqt": "引用",

View File

@@ -8,17 +8,17 @@ var idata={
"kirishima.cloud_glitch": "enabled",
"kirishima.cloud_public": "パブリックタイムライン",
"minohdon.jp": "instance",
"minohdon.jp_name":"箕面",
"minohdon.jp_name": "箕面どん",
"minohdon.jp_letters": "500",
"minohdon.jp_bbcode": "disabled",
"minohdon.jp_markdown": "disabled",
"minohdon.jp_glitch": "disabled",
"knzk.me": "instance",
"knzk.me_name":"神崎丼",
"knzk.me_name": "Knzk",
"knzk.me_letters": "5000",
"knzk.me_bbcode": "disabled",
"knzk.me_markdown": "disabled",
"knzk.me_glitch":"enabled",
"knzk.me_glitch": "disabled",
"mastodos.com": "instance",
"mastodos.com_name": "マストどす",
"mastodos.com_letters": "500",
@@ -32,7 +32,7 @@ var idata={
"dev.kirishima.cloud_markdown": "enabled",
"dev.kirishima.cloud_glitch": "enabled",
"mstdn.y-zu.org": "instance",
"mstdn.y-zu.org_name":"Yづドン!(502 BadGateway)",
"mstdn.y-zu.org_name": "Yづドン(Y-zuDon)",
"mstdn.y-zu.org_letters": "500",
"mstdn.y-zu.org_bbcode": "disabled",
"mstdn.y-zu.org_markdown": "enabled",
@@ -84,20 +84,14 @@ var idata={
"itabashi.0j0.jp_bbcode": "disabled",
"itabashi.0j0.jp_markdown": "disabled",
"itabashi.0j0.jp_glitch": "disabled",
"theboss.tech":"instance",
"theboss.tech_name":"theboss.tech",
"theboss.tech_letters":"1000",
"theboss.tech_bbcode":"disabled",
"theboss.tech_markdown":"disabled",
"theboss.tech_glitch":"disabled",
"dtp-mstdn.jp": "instance",
"dtp-mstdn.jp_name": "DTP鯖",
"dtp-mstdn.jp_letters": "500",
"dtp-mstdn.jp_bbcode": "disabled",
"dtp-mstdn.jp_markdown": "disabled",
"dtp-mstdn.jp_glitch": "disabled",
"misskey.xyz":"instance",
"misskey.xyz_name":"Misskey",
"misskey.xyz": "misskey",
"misskey.xyz_name": "misskey.xyz",
"misskey.xyz_letters": "1000",
"misskey.xyz_bbcode": "disabled",
"misskey.xyz_markdown": "enabled",
@@ -105,6 +99,28 @@ var idata={
"misskey.xyz_post": "Post",
"misskey.xyz_fav": " reacted your post.",
"misskey.xyz_bt": " reposted your post.",
"misskey.dev": "misskey",
"misskey.dev_name": "misskey.dev",
"misskey.dev_letters": "1024",
"misskey.dev_bbcode": "disabled",
"misskey.dev_markdown": "enabled",
"misskey.dev_public": "Global",
"misskey.dev_post": "Post",
"misskey.dev_fav": " reacted your post.",
"misskey.dev_bt": " reposted your post.",
"precure.ml": "instance",
"precure.ml_name": "キュアスタ!",
"precure.ml_letters": "1024",
"precure.ml_bbcode": "disabled",
"precure.ml_markdown": "disabled",
"precure.ml_post": "キュア!",
"precure.ml_glitch": "disabled",
"best-friends.chat": "instance",
"best-friends.chat_name": "Best Friends",
"best-friends.chat_letters": "500",
"best-friends.chat_bbcode": "disabled",
"best-friends.chat_markdown": "disabled",
"best-friends.chat_glitch": "disabled",
};
localStorage.setItem("instance", JSON.stringify(idata));

View File

@@ -14,23 +14,6 @@ function ck() {
}
var domainz = localStorage.getItem("domain_0");
var at = localStorage.getItem("acct_0_at");
var oldat = localStorage.getItem(domainz + "_at");
if(oldat){
console.log("Move to New Account Management System")
var multi = localStorage.getItem("multi");
if (!multi) {
var acctlen=1;
} else {
var obj = JSON.parse(multi);
var acctlen=obj.length;
}
for(i=0;acctlen>i;i++){
var domain = localStorage.getItem("domain_"+i);
var oldat = localStorage.getItem(domain + "_at");
var newat = localStorage.setItem("acct_"+ i + "_at",oldat);
localStorage.removeItem(domain + "_at");
}
}
//コード受信
if (location.search) {
var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/);
@@ -42,30 +25,28 @@ function ck() {
}
}
var multi = localStorage.getItem("multi");
if (!multi) {
var obj = [];
var json = JSON.stringify(obj);
localStorage.setItem("multi", json);
if (!multi || multi == "[]") {
location.href = "acct.html?mode=first&code=true"
} else {
var obj = JSON.parse(multi);
}
Object.keys(obj).forEach(function (key) {
var acct = obj[key];
if (acct.domain) {
refresh(key, true)
}
});
console.log(obj);
if (obj[0].domain) {
$("#tl").show();
ticker();
multiSelector();
} else {
$("#tl").show();
$("#post-box").hide();
verck(ver);
$("#something-wrong img").attr("src", "../../img/thinkingdesk.png")
}
}
}
ck();
//ログインポップアップ
function login(url) {
if ($('#linux:checked').val() == "on") {
@@ -88,7 +69,6 @@ function login(url) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
var auth = "https://" + url + "/oauth/authorize?client_id=" + json[
"client_id"] + "&client_secret=" + json["client_secret"] +
"&response_type=code&redirect_uri=" + red + "&scope=read+write+follow";
@@ -182,7 +162,6 @@ function getdata() {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (json.error) {
console.error("Error:" + json.error);
Materialize.toast(lang.lang_fatalerroroccured + "Error:" + json.error,
@@ -204,7 +183,6 @@ function getdata() {
vis: json["source"]["privacy"]
}];
var json = JSON.stringify(obj);
console.log(obj);
localStorage.setItem("multi", json);
localStorage.setItem("name_" + acct_id, json["display_name"]);
localStorage.setItem("user_" + acct_id, json["acct"]);
@@ -232,7 +210,6 @@ function getdataAdv(domain, at) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (json.error) {
console.error("Error:" + json.error);
Materialize.toast(lang.lang_fatalerroroccured + "Error:" + json.error,
@@ -266,7 +243,6 @@ function getdataAdv(domain, at) {
localStorage.setItem("user_" + target, json["acct"]);
localStorage.setItem("user-id_" + target, json["id"]);
localStorage.setItem("prof_" + target, avatar);
console.log(obj);
var json = JSON.stringify(obj);
localStorage.setItem("multi", json);
location.href = "index.html";
@@ -281,7 +257,6 @@ function refresh(target,loadskip) {
}
var start = "https://" + obj[target].domain +
"/api/v1/accounts/verify_credentials";
console.log(start);
fetch(start, {
method: 'GET',
headers: {
@@ -294,7 +269,6 @@ function refresh(target,loadskip) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (json.error) {
console.error("Error:" + json.error);
Materialize.toast(lang.lang_fatalerroroccured + "Error:" + json.error,
@@ -318,8 +292,6 @@ function refresh(target,loadskip) {
localStorage.setItem("name_" + target, json["display_name"]);
localStorage.setItem("user_" + target, json["acct"]);
localStorage.setItem("user-id_" + target, json["id"]);
console.log("user-id_" + target+":"+json["id"])
console.log(localStorage.getItem("user-id_"+target));
localStorage.setItem("prof_" + target, avatar);
localStorage.setItem("follow_" + target, json["following_count"]);
obj[target] = ref;
@@ -379,7 +351,6 @@ function ckdb(acct_id) {
localStorage.removeItem("bb_" + acct_id);
}
if (json[domain + "_home"]) {
console.log("unique name:"+json[domain + "_home"]);
localStorage.setItem("home_" + acct_id, json[domain + "_home"]);
}
if (json[domain + "_local"]) {
@@ -416,8 +387,8 @@ function ckdb(acct_id) {
}).catch(function (error) {
console.error(error);
}).then(function (json) {
console.log(json);
if (json.error) {
console.error(json.error);
return;
}
if (json) {
@@ -451,9 +422,13 @@ function multiSelector() {
var last = localStorage.getItem("main");
} else if (localStorage.getItem("last-use")) {
var last = localStorage.getItem("last-use");
}else{
var last=0;
if (last == "webview" || last == "noauth") {
last = "0";
}
} else {
var last = "0";
}
last = last + "";
var sel;
if (obj.length < 1) {
$("#src-acct-sel").html('<option value="tootsearch">Tootsearch</option>');
@@ -462,7 +437,7 @@ function multiSelector() {
Object.keys(obj).forEach(function (key) {
var acct = obj[key];
var list = key * 1 + 1;
if (key == last) {
if (key+"" === last) {
sel = "selected";
var domain = acct.domain;
localStorage.setItem("domain_" + key, domain);
@@ -481,12 +456,10 @@ function multiSelector() {
}
var profimg = acct.prof;
localStorage.setItem("prof_" + key, profimg);
console.log(profimg);
if (!profimg) {
profimg = "../../img/missing.svg";
}
$("#acct-sel-prof").attr("src", profimg);
console.log(domain);
if (domain) {
var cc = "(" + domain + ")";
} else {
@@ -522,7 +495,7 @@ function multiSelector() {
$("#add-acct-sel").append('<option value="noauth">' + lang.lang_login_noauth + '</option><option value="webview">Twitter</option>');
}
$('select').material_select('update');
parseColumn();
parseColumn(true);
}
//バージョンエンコ

View File

@@ -2,6 +2,15 @@
//最初に読むやつ
function load() {
$("#acct-list").html("");
if (location.search) {
var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/);
var mode = m[1];
var codex = m[2];
if (mode == "first" && codex == "true") {
$("body").addClass("first")
} else {
}
}
var prof = localStorage.getItem("prof");
$(".my-prof").attr("src", prof);
var name = localStorage.getItem("name");
@@ -23,7 +32,7 @@ function load() {
}
}
console.log(obj);
console.table(obj);
var templete;
Object.keys(obj).forEach(function (key) {
var acct = obj[key];
@@ -57,14 +66,8 @@ function load() {
localStorage.setItem("acct", 0);
var acctN = 0;
}
var electron = require("electron");
var remote=electron.remote;
var platform=remote.process.platform;
if(localStorage.getItem("winstore")!="localinstall"){
$("#linux").prop("checked", false);
}else{
//全部チェックアリでいいと思うの
$("#linux").prop("checked", true);
}
}
//最初に読む
@@ -96,7 +99,6 @@ function data(domain) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (!json.error) {
$("#ins-name").text(json.name);
$("#ins-upd").text(date(json.checked_at, 'full'));
@@ -107,6 +109,8 @@ function data(domain) {
$("#ins-per").text(json.uptime * 100);
$("#ins-user").text(json.users);
$("#ins-ver").text(json.version);
} else {
console.error(json.error);
}
});
var start = "https://" + domain + "/api/v1/instance";
@@ -121,7 +125,6 @@ function data(domain) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (!json.error) {
$("#ins-title").text(json.title);
$("#ins-desc").html(json.description);
@@ -132,6 +135,8 @@ function data(domain) {
$("#ins-prof").attr('src', json.thumbnail);
$("#ins-admin").text(escapeHTML(json.contact_account.display_name) + "(" + json.contact_account.acct + ")");
$("#ins-admin").attr("href", "index.html?mode=user&code=" + json.contact_account.username + "@" + domain);
} else {
console.error(json.error);
}
});
}
@@ -147,7 +152,6 @@ function multiDel(target) {
//公開範囲(差分のみ)
if (key >= target) {
var oldvis = localStorage.getItem("vis-memory-" + key);
console.log(oldvis);
if (oldvis) {
localStorage.setItem("vis-memory-" + nk, oldvis);
}
@@ -172,7 +176,6 @@ function multiDel(target) {
});
//とりあえず消す
obj.splice(target, 1);
console.log(obj);
var json = JSON.stringify(obj);
localStorage.setItem("multi", json);
load();
@@ -213,7 +216,6 @@ function multiDel2(target) {
Object.keys(obj).forEach(function (key) {
if (key >= target) {
var oldvis = localStorage.getItem("vis-memory-" + key);
console.log(oldvis);
if (oldvis) {
var nk = key - 1;
localStorage.setItem("vis-memory-" + nk, oldvis);
@@ -262,6 +264,10 @@ function support() {
templete = '<a onclick="login(\'' + key +
'\')" class="collection-item pointer transparent">' + idata[key + "_name"] + '(' + key + ')</a>';
$("#support").append(templete);
} else if (instance == "misskey") {
templete = '<a onclick="misskeyLogin(\'' + key +
'\')" class="collection-item pointer transparent">' + idata[key + "_name"] + '(' + key + ')</a>';
$("#support").append(templete);
}
});
}
@@ -270,7 +276,7 @@ function support() {
function login(url) {
var multi = localStorage.getItem("multi");
var obj = JSON.parse(multi);
if($('#misskey:checked').val()=="on" || url=="misskey.xyz"){
if ($('#misskey:checked').val() == "on") {
$("#misskey").prop("checked", true);
misskeyLogin(url);
return;
@@ -280,7 +286,6 @@ function login(url) {
} else {
var red = 'thedesk://manager';
}
console.log(red);
localStorage.setItem("redirect", red);
var start = "https://" + url + "/api/v1/apps";
var httpreq = new XMLHttpRequest();
@@ -296,7 +301,6 @@ function login(url) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
localStorage.setItem("msky", "false");
var auth = "https://" + url + "/oauth/authorize?client_id=" + json[
"client_id"] + "&client_secret=" + json["client_secret"] +
@@ -356,13 +360,32 @@ function misskeyLogin(url) {
"reaction-read",
"reaction-write",
"vote-read",
"vote-write"
"vote-write",
"read:account",
"write:account",
"read:drive",
"write:drive",
"read:blocks",
"write:blocks",
"read:favorites",
"write:favorites",
"read:following",
"write:following",
"read:messaging",
"write:messaging",
"read:mutes",
"write:mutes",
"write:notes",
"read:notifications",
"write:notifications",
"read:reactions",
"write:reactions",
"write:votes"
]
}));
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
misskeyAuth(url, json.secret)
}
}
@@ -384,7 +407,6 @@ function misskeyAuth(url, mkc){
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
const {
shell
} = require('electron');
@@ -418,7 +440,6 @@ function code(code) {
}
var url = localStorage.getItem("domain_tmp");
localStorage.removeItem("domain_tmp");
console.log(localStorage.getItem("msky"));
if (localStorage.getItem("msky") == "true") {
var start = "https://" + url + "/api/auth/session/userkey";
var httpreq = new XMLHttpRequest();
@@ -433,7 +454,6 @@ function code(code) {
if (httpreq.readyState === 4) {
var json = httpreq.response;
var i = sha256(json.accessToken + localStorage.getItem("mkc"));
console.log(json);
var avatar = json["user"]["avatarUrl"];
var priv = "public";
var add = {
@@ -455,10 +475,11 @@ function code(code) {
localStorage.setItem("user_" + target, json["user"]["username"]);
localStorage.setItem("user-id_" + target, json["user"]["id"]);
localStorage.setItem("prof_" + target, avatar);
console.log(obj);
var json = JSON.stringify(obj);
localStorage.setItem("multi", json);
if ($("body").hasClass("first")) {
location.href = "index.html"
}
load();
return;
}
@@ -482,7 +503,6 @@ function code(code) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
if (json["access_token"]) {
$("#auth").hide();
$("#add").show();
@@ -508,10 +528,9 @@ function getdata(domain, at) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (json.error) {
console.error("Error:" + json.error);
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error,
Materialize.toast(lang.lang_fatalerroroccured + "Error:" + escapeHTML(json.error),
5000);
return;
}
@@ -543,9 +562,11 @@ function getdata(domain, at) {
localStorage.setItem("user_" + target, json["acct"]);
localStorage.setItem("user-id_" + target, json["id"]);
localStorage.setItem("prof_" + target, avatar);
console.log(obj);
var json = JSON.stringify(obj);
localStorage.setItem("multi", json);
if ($("body").hasClass("first")) {
location.href = "index.html"
}
load();
});
}
@@ -560,7 +581,6 @@ function refresh(target) {
}
var start = "https://" + obj[target].domain +
"/api/v1/accounts/verify_credentials";
console.log(start);
fetch(start, {
method: 'GET',
headers: {
@@ -573,7 +593,6 @@ function refresh(target) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (json.error) {
console.error("Error:" + json.error);
Materialize.toast(lang.lang_fatalerroroccured + "Error:" + json.error,
@@ -597,8 +616,6 @@ function refresh(target) {
localStorage.setItem("name_" + target, json["display_name"]);
localStorage.setItem("user_" + target, json["acct"]);
localStorage.setItem("user-id_" + target, json["id"]);
console.log("user-id_" + target+":"+json["id"])
console.log(localStorage.getItem("user-id_"+target));
localStorage.setItem("prof_" + target, avatar);
obj[target] = ref;
var json = JSON.stringify(obj);
@@ -620,7 +637,6 @@ function misskeyRefresh(obj,target,url){
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
return;
var avatar = json["user"]["avatarURL"];
var priv = "public";
@@ -641,7 +657,6 @@ function misskeyRefresh(obj,target,url){
localStorage.setItem("user_" + target, json["user"]["username"]);
localStorage.setItem("user-id_" + target, json["user"]["id"]);
localStorage.setItem("prof_" + target, avatar);
console.log(obj);
var json = JSON.stringify(obj);
localStorage.setItem("multi", json);
load();
@@ -662,7 +677,6 @@ function multisel() {
var templete;
var last = localStorage.getItem("main");
var sel;
console.log(obj.length)
if (obj.length < 1) {
$("#src-acct-sel").html('<option value="tootsearch">Tootsearch</option>');
$("#add-acct-sel").html('<option value="noauth">' + lang.lang_login_noauth + '</option>');
@@ -776,16 +790,16 @@ input.addEventListener("focus", function() {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (!json.error) {
var urls = "Suggest:";
Object.keys(json.instances).forEach(function (key) {
var url = json.instances[key];
urls = urls + ' <a onclick="login(\'' + url.name +
'\')" class="pointer">' + url.name + '</a> ';
'\')" class="pointer">' + escapeHTML(url.name) + '</a> ';
});
$("#ins-suggest").html(urls);
} else {
console.error(json.error);
}
});
}

View File

@@ -19,9 +19,8 @@
//メンションっぽかったら
var ats = [];
ats = url.match(
/https:\/\/([-a-zA-Z0-9@.]+)\/@([-_.!~*\'()a-zA-Z0-9;\/?:\&=+\$,%#]+)/
/https:\/\/([-a-zA-Z0-9.]+)\/@([-_.!~*\'()a-zA-Z0-9;\/?:\&=+\$,%#@]+)/
);
console.log(toot);
if (toot) {
if (toot[1]) {
var acct_id = $a.parent().attr("data-acct");
@@ -35,13 +34,16 @@
} else if (tags) {
if (tags[2]) {
tagShow(tags[2]);
Materialize.toast('<a class="btn-flat toast-action" href="detEx(\''+url+'\')">Open in browser</a>', 86400);
var acct_id = $a.parent().attr("data-acct");
if (!acct_id) {
acct_id = 0;
}
tl('tag', decodeURI(tags[2]), acct_id, 'add')
}
} else if (ats) {
console.log(ats);
if (ats[2]) {
if(ats[1]!="quesdon.rinsuki.net"){
//Quesdon判定
if (!~ats[2].indexOf("@")) {
udgEx(ats[2] + "@" + ats[1], "main");
return false
} else {
@@ -77,39 +79,6 @@
});
//よく使うライブラリ
/*マルチバイト用切り出し*/
$.isSurrogatePear = function(upper, lower) {
return 0xD800 <= upper && upper <= 0xDBFF && 0xDC00 <= lower && lower <= 0xDFFF;
};
$.mb_strlen = function(str) {
var ret = 0;
for (var i = 0; i < str.length; i++, ret++) {
var upper = str.charCodeAt(i);
var lower = str.length > (i + 1) ? str.charCodeAt(i + 1) : 0;
if ($.isSurrogatePear(upper, lower)) {
i++;
}
}
return ret;
};
$.mb_substr = function(str, begin, end) {
var ret = '';
for (var i = 0, len = 0; i < str.length; i++, len++) {
var upper = str.charCodeAt(i);
var lower = str.length > (i + 1) ? str.charCodeAt(i + 1) : 0;
var s = '';
if ($.isSurrogatePear(upper, lower)) {
i++;
s = String.fromCharCode(upper, lower);
} else {
s = String.fromCharCode(upper);
}
if (begin <= len && len < end) {
ret += s;
}
}
return ret;
};
//コピー
function execCopy(string) {
@@ -128,7 +97,7 @@ function nano(){
function progshow(e) {
if (e.lengthComputable) {
var percent = e.loaded / e.total;
console.log(percent * 100);
console.log("Progress: " + percent * 100);
$("#imgsel").hide();
if (percent < 1) {
$("#imgup").text(Math.floor(percent * 100) + "%");
@@ -178,3 +147,19 @@ const {
webviewDom.addEventListener('new-window', function (e) {
shell.openExternal(e.url);
});
function playSound() {
window.AudioContext = window.AudioContext || window.webkitAudioContext;
context = new AudioContext();
context.createBufferSource().start(0);
context.decodeAudioData(request.response, function (buf) {
console.log("Playing:" + source)
source.buffer = buf;
source.loop = false;
});
source = context.createBufferSource();
volumeControl = context.createGain();
source.connect(volumeControl);
volumeControl.connect(context.destination);
volumeControl.gain.value = 0.8
source.start(0);
}

View File

@@ -32,6 +32,13 @@ function nl2br(str) {
str = str.replace(/(\n|\r)/g, "<br />");
return str;
}
function br2nl(str) {
if (!str) {
return "";
}
str = str.replace(/<br \/>/g, "\r\n");
return str;
}
function formattime(date) {
var str = date.getFullYear() + "-";
if (date.getMonth() + 1 < 10) {
@@ -55,7 +62,7 @@ function formattime(date){
} else {
str = str + date.getMinutes()
}
return str;
return escapeHTML(str);
}
function formattimeutc(date) {
var str = date.getUTCFullYear() + "-";
@@ -80,7 +87,7 @@ function formattimeutc(date){
} else {
str = str + date.getUTCMinutes()
}
return str;
return escapeHTML(str);
}
var electron = require("electron");
var ipc = electron.ipcRenderer;
@@ -116,15 +123,13 @@ function randomStr(l){
}
return r;
}
function rgbToHex(color)
{
function rgbToHex(color) {
// HEXに変換したものを代入する変数
var hex = '';
// 第1引数がHEXのとき変換処理は必要ないのでそのままreturn
// IE8の場合はjQueryのcss()関数でHEXを返すので除外
if (color.match(/^#[a-f\d]{3}$|^#[a-f\d]{6}$/i))
{
if (color.match(/^#[a-f\d]{3}$|^#[a-f\d]{6}$/i)) {
return color;
}
@@ -132,8 +137,7 @@ function rgbToHex(color)
var regex = color.match(/^rgb\(([0-9.]+),\s*([0-9.]+),\s*([0-9.]+)\)$/);
// 正規表現でマッチしたとき
if (regex)
{
if (regex) {
var rgb =
[
// RGBからHEXへ変換
@@ -142,12 +146,10 @@ function rgbToHex(color)
parseInt(regex[3]).toString(16)
];
for (var i = 0; i < rgb.length; ++i)
{
for (var i = 0; i < rgb.length; ++i) {
// rgb(1,1,1)のようなときHEXに変換すると1桁になる
// 1桁のときは前に0を足す
if (rgb[i].length == 1)
{
if (rgb[i].length == 1) {
rgb[i] = '0' + rgb[i];
}
hex += rgb[i];
@@ -158,3 +160,37 @@ function rgbToHex(color)
console.error(color + ':第1引数はRGB形式で入力');
}
/*マルチバイト用切り出し*/
$.isSurrogatePear = function (upper, lower) {
return 0xD800 <= upper && upper <= 0xDBFF && 0xDC00 <= lower && lower <= 0xDFFF;
};
$.mb_strlen = function (str) {
var ret = 0;
for (var i = 0; i < str.length; i++ , ret++) {
var upper = str.charCodeAt(i);
var lower = str.length > (i + 1) ? str.charCodeAt(i + 1) : 0;
if ($.isSurrogatePear(upper, lower)) {
i++;
}
}
return ret;
};
$.mb_substr = function (str, begin, end) {
var ret = '';
for (var i = 0, len = 0; i < str.length; i++ , len++) {
var upper = str.charCodeAt(i);
var lower = str.length > (i + 1) ? str.charCodeAt(i + 1) : 0;
var s = '';
if ($.isSurrogatePear(upper, lower)) {
i++;
s = String.fromCharCode(upper, lower);
} else {
s = String.fromCharCode(upper);
}
if (begin <= len && len < end) {
ret += s;
}
}
return ret;
};
localStorage.removeItem("errors");

View File

@@ -14,7 +14,6 @@ function tl(data) {
$("#notice_nano").text(cap(type, data) + " TL(" + localStorage.getItem(
"user_" + acct_id) + "@" + domain + ")");
var start = "https://" + domain + "/api/v1/timelines/" + com(type, data);
console.log(start);
fetch(start, {
method: 'GET',
headers: {
@@ -46,17 +45,12 @@ var websocket=[];
var start = "wss://" + domain +
"/api/v1/streaming/?stream=hashtag&tag=" + data + "&access_token=" + at;
}
console.log(start);
var wsid = websocket.length;
websocket[wsid] = new WebSocket(start);
websocket[wsid].onopen = function (mess) {
console.log(tlid + ":Connect Streaming API:" + type);
console.log(mess);
$("#notice_icon_" + tlid).removeClass("red-text");
}
websocket[wsid].onmessage = function (mess) {
console.log(tlid + ":Receive Streaming API:");
console.log(websocket[wsid]);
var typeA = JSON.parse(mess.data).event;
if (typeA == "delete") {
var obj = JSON.parse(mess.data).payload;
@@ -64,12 +58,11 @@ var websocket=[];
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove();
} else if (typeA == "update") {
var obj = JSON.parse(JSON.parse(mess.data).payload);
console.log(obj);
var templete = parse([obj], '', acct_id, tlid);
$("#timeline_nano").html(templete);
}
websocket[wsid].onclose = function (mess) {
console.log("Close Streaming API:" + type);
console.error("Close Streaming API:" + type);
}
}
websocket[wsid].onerror = function (error) {

View File

@@ -4,7 +4,7 @@ $("#emoji-before").addClass("disabled");
$("#emoji-next").addClass("disabled");
//絵文字ボタンのトグル
function emojiToggle() {
function emojiToggle(reaction) {
var acct_id = $("#post-acct-sel").val();
var selin = $("#textarea").prop('selectionStart');
if (!selin) {
@@ -21,7 +21,7 @@ function emojiToggle() {
'<button class="btn waves-effect green" style="width:100%; padding:0; margin-top:0;" onclick="emojiGet(\'true\');">' + lang.lang_emoji_get + '</button>';
$("#emoji-list").html(html);
} else {
emojiList('home');
emojiList('home', reaction);
}
} else {
$("#poll").addClass("hide")
@@ -34,10 +34,11 @@ function emojiToggle() {
}
//絵文字リスト挿入
function emojiGet(parse) {
$('#emoji-list').html('Loading...');
function emojiGet(parse, started) {
$('#emoji-list').text('Loading...');
var acct_id = $("#post-acct-sel").val();
var domain = localStorage.getItem("domain_" + acct_id);
if (localStorage.getItem("mode_" + domain) != "misskey") {
var start = "https://" + domain + "/api/v1/custom_emojis";
fetch(start, {
method: 'GET',
@@ -51,7 +52,7 @@ function emojiGet(parse) {
console.error(error);
}).then(function (json) {
if (parse == "true") {
$('#emoji-list').html('Parsing...');
$('#emoji-list').text('Parsing...');
//絵文字をマストドン公式と同順にソート
json.sort(function (a, b) {
if (a.shortcode < b.shortcode) return -1;
@@ -63,14 +64,67 @@ function emojiGet(parse) {
localStorage.setItem("emoji_" + acct_id, JSON.stringify(json));
}
localStorage.setItem("emojiseek", 0);
if (!started) {
emojiList('home')
}
});
} else {
var start = "https://" + domain + "/api/meta";
fetch(start, {
method: 'POST',
headers: {
'content-type': 'application/json'
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json.enableEmojiReaction) {
localStorage.setItem("emojiReaction_" + acct_id, "true");
} else {
localStorage.setItem("emojiReaction_" + acct_id, "disabled");
}
var emojis = json.emojis;
var md = [];
Object.keys(emojis).forEach(function (key) {
var emoji = emojis[key];
md.push({
"shortcode": emoji.name,
"url": emoji.url
})
});
if (parse == "true") {
$('#emoji-list').text('Parsing...');
//絵文字をマストドン公式と同順にソート
md.sort(function (a, b) {
if (a.shortcode < b.shortcode) return -1;
if (a.shortcode > b.shortcode) return 1;
return 0;
});
localStorage.setItem("emoji_" + acct_id, JSON.stringify(md));
} else {
localStorage.setItem("emoji_" + acct_id, JSON.stringify(md));
}
localStorage.setItem("emojiseek", 0);
if (!started) {
emojiList('home')
}
});
}
}
//リストの描画
function emojiList(target) {
function emojiList(target, reaction) {
$("#now-emoji").text(lang.lang_emoji_custom);
var acct_id = $("#post-acct-sel").val();
if (reaction && localStorage.getItem("emojiReaction_" + acct_id) != "true") {
console.error("Disabled")
clear()
hide();
return false;
}
var start = localStorage.getItem("emojiseek");
if (target == "next") {
var start = start * 1 + 127;
@@ -103,9 +157,15 @@ function emojiList(target) {
for (i = start; i < start + 126; i++) {
var emoji = obj[i];
if (emoji) {
if (reaction) {
html = html + '<a onclick="emojiReaction(\':' + emoji.shortcode +
':\')" class="pointer"><img src="' + emoji.url + '" width="20"></a>';
} else {
html = html + '<a onclick="emojiInsert(\':' + emoji.shortcode +
':\')" class="pointer"><img src="' + emoji.url + '" width="20"></a>';
}
}
}
$("#emoji-list").html(html);
}
@@ -114,14 +174,18 @@ function emojiList(target) {
function emojiInsert(code, del) {
var now = $("#textarea").val();
var selin = localStorage.getItem("cursor");
console.log(selin);
if (localStorage.getItem("emoji-zero-width") == "yes") {
var brank = "";
} else {
var brank = " ";
}
var now = $("#textarea").val();
if (selin > 0) {
var before = now.substr(0, selin);
var after = now.substr(selin, now.length);
newt = before + " "+ code+" " + after;
newt = before + brank + code + brank + after;
} else {
newt = code+" ";
newt = code + brank;
}
if (!del) {
$("#textarea").val(newt);
@@ -129,7 +193,7 @@ function emojiInsert(code, del) {
} else {
var regExp = new RegExp(del, "g");
var now = now.replace(regExp, "");
$("#textarea").val(now + " " + code);
$("#textarea").val(now + brank + code);
}
$("#textarea").focus();

View File

@@ -36,7 +36,7 @@ $("#drag").on('dragleave', function(e) {
//複数アップ
function pimg(files) {
console.log(files);
console.table(files);
for (i = 0; i < files.length; i++) {
var dot = files[i].path.match(/\.(.+)$/)[1];
if (dot == "bmp" || dot == "BMP") {
@@ -95,7 +95,6 @@ function media(b64, type, no) {
localStorage.setItem("image", "busy");
todo("Image Upload...");
var media = toBlob(b64, type);
console.log(media);
var fd = new FormData();
fd.append('file', media);
var acct_id = $("#post-acct-sel").val();
@@ -128,7 +127,6 @@ function media(b64, type, no) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
var img = localStorage.getItem("img");
if (json.type.indexOf("image") != -1) {
var html = '<img src="' + json[previewer] + '" class="preview-img pointer" data-media="' + json["id"] + '" onclick="deleteImage(\'' + json["id"] + '\')" title="' + lang.lang_postimg_delete + '">';
@@ -182,14 +180,13 @@ function toBlob(base64, type) {
//画像を貼り付けたら…
var element = document.querySelector("#textarea");
element.addEventListener("paste", function (e) {
console.log(e)
if (!e.clipboardData || !e.clipboardData.items) {
return true;
}
// DataTransferItemList に画像が含まれいない場合は終了する
var imageItems = [...e.clipboardData.items].filter(i => i.type.startsWith('image'));
if (imageItems.length == 0) {
console.log("not image")
console.warn("it is not image")
return true;
}
@@ -223,7 +220,6 @@ ipc.on('adobeagree', function (event, arg) {
localStorage.setItem("adobeagree", arg);
});
function deleteImage(key) {
console.log(key);
if (!confirm(lang.lang_postimg_delete)) {
return false;
}

View File

@@ -17,7 +17,7 @@ function renote(id, acct_id, remote) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
console.log(["Success: renote", json]);
$("[toot-id=" + id + "]").addClass("rted");
$(".rt_" + id).toggleClass("teal-text");
}
@@ -63,12 +63,12 @@ function reactiontoggle(id,acct_id,tlid){
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
if(json.reactionCounts){
var reactions=["like","love","laugh","hmm","surprise","congrats","angry","confused","pudding"];
console.log(["Success: reaction", json]);
if (json.reactions) {
var reactions = ["like", "love", "laugh", "hmm", "surprise", "congrats", "angry", "confused", "pudding", "rip"];
for (var i = 0; i < reactions.length; i++) {
if(json.reactionCounts[reactions[i]]){
$("#pub_" + id +" .re-"+reactions[i]+"ct").text(json.reactionCounts[reactions[i]])
if (json.reactions[reactions[i]]) {
$("#pub_" + id + " .re-" + reactions[i] + "ct").text(json.reactions[reactions[i]])
$("#pub_" + id + " .re-" + reactions[i]).removeClass("hide")
} else {
$("#pub_" + id + " .re-" + reactions[i] + "ct").text(0)
@@ -77,7 +77,7 @@ function reactiontoggle(id,acct_id,tlid){
} else {
$("#pub_" + id + " .re-" + reactions[i]).removeClass("hide")
}
$("#pub_" + id +" .re-"+reactions[i]+"ct").text(json.reactionCounts[reactions[i]])
$("#pub_" + id + " .re-" + reactions[i] + "ct").text(json.reactions[reactions[i]])
}
}
$("#pub_" + id + " .reactions").removeClass("hide");
@@ -94,6 +94,20 @@ function reactiontoggle(id,acct_id,tlid){
}
}
}
$("#pub_" + id + " .freeReact").toggleClass("hide");
}
//reactioncustom
function reactioncustom(acct_id, id) {
$("#reply").val(id);
$("#unreact").hide();
$("#addreact").removeClass("hide");
$("#post-acct-sel").val(acct_id);
$('select').material_select();
localStorage.setItem("nohide", true);
show()
emojiToggle(true)
$("#left-side").hide();
$("#default-emoji").hide();
}
function reactRefresh(acct_id, id) {
var domain = localStorage.getItem("domain_" + acct_id);
@@ -107,7 +121,6 @@ function reactRefresh(acct_id,id){
method: "POST",
body: JSON.stringify(req),
}
console.log(req)
fetch(start, i,
).then(function (response) {
return response.json();
@@ -119,29 +132,40 @@ function reactRefresh(acct_id,id){
return false;
}
var poll = "";
console.log(json);
if (json.error) {
$("[toot-id=" + id + "]").hide();
$("[toot-id=" + id + "]").remove();
} else {
reactRefreshCore(json)
}
});
}
function reactRefreshCore(json) {
var id = json.id;
if(json.reactionCounts){
var reactions=["like","love","laugh","hmm","surprise","congrats","angry","confused","pudding"];
if (json.reactions) {
$("#pub_" + id + " .reactions").removeClass("hide")
for(var i=0;i<reactions.length;i++){
if(json.reactionCounts[reactions[i]]){
console.log(json.reactionCounts[reactions[i]])
$("#pub_" + id +" .re-"+reactions[i]+"ct").text(json.reactionCounts[reactions[i]])
$("#pub_" + id +" .re-"+reactions[i]).removeClass("hide")
var regExp = new RegExp(":", "g");
Object.keys(json.reactions).forEach(function (keye) {
keyeClass = keye.replace(regExp, '');
if (json.reactions[keye]) {
$("#pub_" + id + " .re-" + keyeClass + "ct").text(json.reactions[keye])
$("#pub_" + id + " .re-" + keyeClass).removeClass("hide")
} else {
$("#pub_" + id +" .re-"+reactions[i]+"ct").text(0)
$("#pub_" + id + " .re-" + keyeClass + "ct").text(0)
if ($("#pub_" + id + " .reactions").hasClass("fullreact")) {
$("#pub_" + id +" .re-"+reactions[i]).addClass("hide")
}
$("#pub_" + id +" .re-"+reactions[i]+"ct").text(json.reactionCounts[reactions[i]])
$("#pub_" + id + " .re-" + keyeClass).addClass("hide")
}
$("#pub_" + id + " .re-" + keyeClass + "ct").text(json.reactions[keye])
}
});
}
}
function emojiReaction(emoji) {
var acct_id = $("#post-acct-sel").val();
var id = $("#reply").val();
reaction(emoji, id, acct_id, null)
clear();
hide();
}
function reaction(mode, id, acct_id, tlid) {
var domain = localStorage.getItem("domain_" + acct_id);
@@ -208,7 +232,7 @@ function voterefresh(acct_id,id){
} else {
var myvote = "";
}
poll=poll+'<div class="pointer vote" onclick="vote(\''+acct_id+'\',\''+json.id+'\','+choice.id+')">'+choice.text+'('+choice.votes+''+myvote+')</div>';
poll = poll + '<div class="pointer vote" onclick="vote(\'' + acct_id + '\',\'' + json.id + '\',' + choice.id + ')">' + escapeHTML(choice.text) + '(' + choice.votes + '' + myvote + ')</div>';
});
$(".vote_" + json.id).html(poll)
}

View File

@@ -129,7 +129,7 @@ function post(mode,postvis) {
}
if ($("#sch-box").hasClass("sch-avail")) {
var scheduled = formattimeutc(new Date(Date.parse($("#sch-date").val())))
console.log(scheduled)
console.log("This toot will be posted at:" + scheduled)
schedule();
toot.scheduled_at = scheduled;
} else {
@@ -164,7 +164,7 @@ function post(mode,postvis) {
hide_totals: htt
}
}
console.log(toot);
console.table(toot);
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
@@ -245,7 +245,7 @@ function misskeyPost(){
localStorage.removeItem("stable")
}
var json = httpreq.response;
console.log(json);
console.log(["Success: toot", json]);
var box = localStorage.getItem("box");
if (box == "yes") {
hide();
@@ -298,7 +298,7 @@ function clear() {
$("#post-acct-sel").prop("disabled", false);
$("#days_poll").val(0);
$("#hours_poll").val(0);
$("#mins_poll").val(0);
$("#mins_poll").val(6);
$(".mastodon-choice").map(function () {
$(this).val("");
});
@@ -307,4 +307,8 @@ function clear() {
$("#post-acct-sel").val(localStorage.getItem("main"));
}
$('select').material_select();
$("#left-side").show();
$("#default-emoji").show();
$("#unreact").show();
$("#addreact").addClass("hide");
}

View File

@@ -49,7 +49,6 @@ function vis(set){
}
function loadVis() {
var vist = localStorage.getItem("vis");
console.log(vist);
if (!vist) {
vis("public");
} else {
@@ -123,7 +122,6 @@ function schedule(){
$("#sch-box").show();
$("#sch-date").val(formattime(date));
console.log(formattime(date));
$("#sch-box").addClass("sch-avail");
}
}

View File

@@ -68,7 +68,7 @@ function rt(id, acct_id, remote) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
console.log(["Success: boost", json]);
if (remote != "remote") {
$("[toot-id=" + id + "] .fav_ct").text(json.favourites_count);
if (!json.reblog) {
@@ -128,7 +128,6 @@ function follow(acct_id,remote) {
var start = "https://" + domain + "/api/v1/accounts/" + id + "/" + flag;
var ent = {}
}
console.log(ent);
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
@@ -138,7 +137,7 @@ function follow(acct_id,remote) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
console.log(["Success: folllow", json]);
if ($("#his-data").hasClass("following")) {
$("#his-data").removeClass("following");
$("#his-follow-btn").text(lang.lang_status_follow);
@@ -236,6 +235,8 @@ function del(id, acct_id) {
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.responseType = "json";
httpreq.send(JSON.stringify({ i: at, noteId: id }));
$("[toot-id=" + id + "]").hide();
$("[toot-id=" + id + "]").remove();
} else {
var start = "https://" + domain + "/api/v1/statuses/" + id;
var httpreq = new XMLHttpRequest();
@@ -264,7 +265,7 @@ function redraft(id, acct_id){
$("[toot-id=" + id + "] img.toot-img").each(function (i, elem) {
if (i < ct) {
var url = $(elem).attr("src");
console.log(url);
console.log("Play back image data:" + url);
$('#preview').append('<img src="' + url + '" style="width:50px; max-height:100px;">');
}
});
@@ -305,7 +306,7 @@ function pin(id, acct_id) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
console.log(["Success: pinned", json]);
if ($("[toot-id=" + id + "]").hasClass("pined")) {
$("[toot-id=" + id + "]").removeClass("pined");
$(".pin_" + id).removeClass("blue-text");
@@ -331,7 +332,7 @@ function request(id, flag, acct_id) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
console.log(["Success: request", "type:" + flag, json]);
showReq();
}
}
@@ -354,7 +355,7 @@ function domainblock(add, flag, acct_id) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
console.log(["Success: domain block", json]);
showDom();
}
}
@@ -369,7 +370,6 @@ function empUser(){
var usr = localStorage.getItem("user_emp");
var obj = JSON.parse(usr);
var id = $("#his-acct").attr("fullname");
console.log(id);
if (!obj) {
var obj = [];
obj.push(id);
@@ -411,7 +411,6 @@ function pinUser(){
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
if ($("#his-end-btn").hasClass("endorsed")) {
$("#his-end-btn").removeClass("endorsed")
$("#his-end-btn").text(lang.lang_status_endorse)

View File

@@ -53,16 +53,7 @@ input.addEventListener("focus", function() {
var tag = new_val.match(/#(\S{3,})/);
var acct = new_val.match(/@(\S{3,})/);
if(localStorage.getItem("imas")){
//セルフNP
var cpnp = new_val.match(/^(?!.*http)\/\/(\S{1,})/);
}else{
var cpnp=[];
}
if (cpnp && cpnp[1]) {
var q = cpnp[1];
cgNPs(q);
} else if (tag && tag[1]) {
if (tag && tag[1]) {
var q = tag[1];
} else if (acct && acct[1]) {
var q = acct[1];
@@ -77,7 +68,7 @@ input.addEventListener("focus", function() {
var at = localStorage.getItem("acct_" + acct_id + "_at");
suggest = "https://" + domain + "/api/v1/search?q=" + q
if (suggest != oldSuggest) {
console.log(suggest)
console.log("Try to get suggest at " + suggest)
fetch(suggest, {
method: 'GET',
headers: {
@@ -161,7 +152,7 @@ function tagInsert(code, del) {
function cgNPs(q) {
suggest = "https://cg.toot.app/api/v1/search/light?q=" + q
if (suggest != oldSuggest) {
console.log(suggest)
console.log("Try to get suggest at " + suggest)
fetch(suggest, {
method: 'GET',
headers: {
@@ -173,12 +164,11 @@ function cgNPs(q){
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (json[0]) {
var tags = "";
Object.keys(json).forEach(function (key4) {
var tag = json[key4];
tags = tags + '<a onclick="cgNP(\''+json[key4]+'\')" class="pointer">' + json[key4] + '</a> ';
tags = tags + '<a onclick="cgNP(\'' + json[key4] + '\')" class="pointer">' + escapeHTML(json[key4]) + '</a> ';
});
$("#suggest").html("Cinderella NowPlaying:" + tags);
} else {

View File

@@ -4,9 +4,9 @@ function additional(acct_id, tlid) {
//メンション系
//$(".mention").attr("href", "");
$(".mention").addClass("parsed");
$("#timeline-container .mention").addClass("parsed");
$(".hashtag").each(function(i, elem) {
$("#timeline-container .hashtag").each(function (i, elem) {
var tags = $(this).attr("href").match(
/https?:\/\/([-a-zA-Z0-9@.]+)\/tags\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
);
@@ -17,8 +17,6 @@ function additional(acct_id, tlid) {
}
}
});
//トゥートサムネ
@@ -34,6 +32,7 @@ function additional(acct_id, tlid) {
);
}
} else {
text = ""
var urls = []
}
@@ -64,8 +63,8 @@ function additional(acct_id, tlid) {
}).then(function (json) {
if (json.title) {
$("[toot-id=" + id + "] .additional").html(
"<span class=\"gray\">URL"+lang.lang_cards_check+":<br>Title:" + json.title + "<br>" +
json.description + "</span>");
"<span class=\"gray\">URL" + lang.lang_cards_check + ":<br>Title:" + escapeHTML(json.title) + "<br>" +
escapeHTML(json.description) + "</span>");
$("[toot-id=" + id + "] a:not(.parsed)").addClass("parsed");
$("[toot-id=" + id + "]").addClass("parsed");
}
@@ -81,8 +80,7 @@ function additional(acct_id, tlid) {
var dom = $(this);
var start = "./js/emoji/emoji-map.json";
var xmlHttpRequest = new XMLHttpRequest();
xmlHttpRequest.onreadystatechange = function()
{
xmlHttpRequest.onreadystatechange = function () {
if (this.readyState === 4 && this.status === 200) {
if (this.response) {
var json = this.response;
@@ -149,8 +147,8 @@ function additionalIndv(tlid, acct_id, id) {
}).then(function (json) {
if (json.title) {
$("[toot-id=" + id + "] .additional").html(
"<span class=\"gray\">URL"+lang.lang_cards_check+":<br>Title:" + json.title + "<br>" +
json.description + "</span>");
"<span class=\"gray\">URL" + lang.lang_cards_check + ":<br>Title:" + escapeHTML(json.title) + "<br>" +
escapeHTML(json.description) + "</span>");
$("[toot-id=" + id + "] a:not(.parsed)").addClass("parsed");
$("[toot-id=" + id + "]").addClass("parsed");
}
@@ -171,9 +169,7 @@ function additionalIndv(tlid, acct_id, id) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
//このリンク鳥やんけ、ってとき
console.log(json.provider_name);
if (json.provider_name == "Twitter") {
if (json.image) {
var twiImg = '<br><img src="' + json.image + '" style="max-width:100%" onclick="imgv(\'twi_' + id + '\', 0, \'twitter\');" id="twi_' + id + '-image-0" data-url="' + json.image + '" data-type="image">';
@@ -244,7 +240,6 @@ function mov(id,tlid,type){
} else {
var tlide = "[tlid=" + tlid + "]";
}
console.log(tlid)
var mouseover = localStorage.getItem("mouseover");
if (!mouseover) {
mouseover = "";

View File

@@ -40,7 +40,7 @@ function details(id, acct_id, tlid, mode) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
console.log(["Toot data:", json]);
if (!$("#timeline_" + tlid + " #pub_" + id).length) {
var html = parse([json], '', acct_id);
$("#toot-this").html(html);
@@ -91,6 +91,9 @@ function details(id, acct_id, tlid, mode) {
}
beforeToot(id, acct_id, dom);
userToot(id, acct_id, uid);
afterToot(id, acct_id, dom);
afterUserToot(id, acct_id, uid);
afterFTLToot(id, acct_id, dom);
faved(id, acct_id);
rted(id, acct_id);
if ($("#toot-this div").hasClass("cvo")) {
@@ -99,7 +102,7 @@ function details(id, acct_id, tlid, mode) {
$("#toot-this").addClass("cvo");
}
if (!$("#activator").hasClass("active")) {
$('#det-col').collapsible('open', 1);
$('#det-col').collapsible('open', 4);
}
});
@@ -205,7 +208,6 @@ function context(id, acct_id) {
}).then(function (json) {
if (localStorage.getItem("mode_" + domain) == "misskey") {
json.reverse();
console.log(json);
var templete = misskeyParse(json, '', acct_id, "", "", []);
$("#toot-reply").html(templete);
$("#toot-reply .hide").html(lang.lang_details_filtered);
@@ -332,6 +334,81 @@ function userToot(id, acct_id, user) {
}
}
//後のLTL
function afterToot(id, acct_id, domain) {
//var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain +
"/api/v1/timelines/public?local=true&min_id=" + id;
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
var templete = parse(json, 'noauth', acct_id);
if (templete != "") {
$("#ltl-after .no-data").hide();
}
$("#ltl-after").html(templete);
jQuery("time.timeago").timeago();
});
}
//後のUTL
function afterUserToot(id, acct_id, user) {
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain + "/api/v1/accounts/" + user + "/statuses?min_id=" + id;
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
'Authorization': 'Bearer ' + at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
var templete = parse(json, '', acct_id);
if (templete != "") {
$("#user-after .no-data").hide();
}
$("#user-after").html(templete);
jQuery("time.timeago").timeago();
});
}
//後のFTL
function afterFTLToot(id, acct_id, domain) {
//var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain +
"/api/v1/timelines/public?min_id=" + id;
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
var templete = parse(json, 'noauth', acct_id);
if (templete != "") {
$("#ftl-after .no-data").hide();
}
$("#ftl-after").html(templete);
jQuery("time.timeago").timeago();
});
}
//ふぁぼ一覧
function faved(id, acct_id) {
@@ -404,7 +481,7 @@ function staCopy(id){
html = html.replace(/<br\s?\/?>/, "\n");
html = html.replace(/<p>/, "\n");
html = html.replace(/<\/p>/, "\n");
console.log(html);
console.log("Copy it:\n" + html);
html = html.replace(/<img[\s\S]*alt="(.+?)"[\s\S]*?>/g, "$1");
html = $.strip_tags(html);
if (execCopy(html)) {
@@ -427,7 +504,7 @@ function trans(tar,to){
}
$("#toot-this .additional").text("Loading...(Powered by Google Translate)");
var exec = 'https://script.google.com/macros/s/AKfycbxhwW5tjjop9Irg-y1zr_WsXlCKEzwWG6KuoOt_vVRDfEbRv0c/exec?format=json&text=' + encodeURIComponent(html) + '&source=' + tar + '&target=' + to
console.log(exec);
console.log("Try to translate from " + tar + " to " + to + " at " + exec);
fetch(exec, {
method: 'GET',
}).then(function (response) {

View File

@@ -57,7 +57,6 @@ function dmmore(tlid){
}
//DMオブジェクトパーサー(トゥート)
function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
console.log(obj);
var templete = '';
if (obj[0]) {
localStorage.setItem("lastunix_" + tlid, date(obj[0].created_at, 'unix'));
@@ -243,7 +242,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
var id = toot.id;
var home = "";
if (toot.account.locked) {
var locked = ' <i class="fa fa-lock red-text"></i>';
var locked = ' <i class="fas fa-lock red-text"></i>';
} else {
var locked = "";
}
@@ -251,7 +250,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
var via = '';
viashow = "hide";
} else {
var via = toot.application.name;
var via = escapeHTML(toot.application.name);
//強調チェック
Object.keys(emp).forEach(function (key6) {
var cli = emp[key6];
@@ -432,7 +431,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
if (word) {
var word = word.tag;
var regExp = new RegExp(word, "g");
content=content.replace(regExp,'<span class="emp">'+word+"</span>");
content = content.replace(regExp, '<span class="emp">' + escapeHTML(word) + "</span>");
}
});
}
@@ -483,7 +482,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
for (var i = 0; i < tickerdata.length; i++) {
var value = tickerdata[i];
if (value.domain == thisdomain) {
var tickerdom='<div style="background:linear-gradient(to left,transparent, '+value.bg+' 96%) !important; color:'+value.text+';width:100%; height:0.9rem; font-size:0.8rem;"><img src="'+value.image+'" style="height:100%;"><span style="position:relative; top:-0.2rem;"> '+value.name+'</span></div>';
var tickerdom = '<div style="background:linear-gradient(to left,transparent, ' + value.bg + ' 96%) !important; color:' + value.text + ';width:100%; height:0.9rem; font-size:0.8rem;"><img src="' + value.image + '" style="height:100%;"><span style="position:relative; top:-0.2rem;"> ' + escapeHTML(value.name) + '</span></div>';
break;
}
}
@@ -506,7 +505,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
toot.account.acct + locked + '</span></div>' +
'<div class="flex-time"><span class="cbadge cbadge-hover pointer waves-effect" onclick="tootUriCopy(\'' +
toot.url + '\');" title="' + date(toot.created_at, 'absolute') +
'('+lang.lang_parse_clickcopyurl+')"><i class="fa fa-clock-o"></i>' +
'(' + lang.lang_parse_clickcopyurl + ')"><i class="far fa-clock-o"></i>' +
date(toot.created_at, datetype) + '</span>' +
'</div></div>' +
'<div class="area-toot">' + tickerdom + '<span class="' +

View File

@@ -114,7 +114,6 @@ function filter(){
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain + "/api/v1/filters"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -127,7 +126,6 @@ function filter(){
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (json) {
var filters = "";
Object.keys(json).forEach(function (key) {
@@ -146,6 +144,11 @@ function filter(){
}
});
}
function filterTime(day, hour, min) {
$("#days_filter").val(day)
$("#hours_filter").val(hour)
$("#mins_filter").val(min)
}
function makeNewFilter() {
var acct_id = $("#filter-acct-sel").val();
var phr = $("#filter-add-word").val();
@@ -162,7 +165,6 @@ function makeNewFilter(){
if ($("#conv_filter:checked").val()) {
cont.push("thread");
}
console.log(cont);
if (!cont.length) {
$("#filtered-words").html('Error:' + lang.lang_filter_errordegree);
}
@@ -230,7 +232,6 @@ function filterEdit(id,acct_id){
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain + "/api/v1/filters/" + id
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -243,7 +244,6 @@ function filterEdit(id,acct_id){
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (json) {
var now = new Date();
now = now.getTime();
@@ -292,7 +292,6 @@ function getFilter(acct_id){
var at = localStorage.getItem("acct_" + acct_id + "_at");
if (localStorage.getItem("mode_" + domain) != "misskey") {
var start = "https://" + domain + "/api/v1/filters"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -336,7 +335,6 @@ function filterUpdate(acct_id){
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain + "/api/v1/filters"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -388,45 +386,33 @@ function filterUpdateInternal(json,type){
*/
//通知フィルター
function exclude(key) {
var excludetxt="";
var excludetxt = localStorage.getItem("exclude-" + key);
if ($('#exc-reply-' + key + ':checked').val()) {
excludetxt = "?exclude_types[]=mention"
var reply=true
}else{
var reply=false;
}
if ($('#exc-fav-' + key + ':checked').val()) {
if(reply){
if (!excludetxt || excludetxt !="") {
excludetxt = excludetxt + "&exclude_types[]=favourite"
} else {
excludetxt = "?exclude_types[]=favourite"
}
var fav=true
}else{
var fav=false;
}
if ($('#exc-bt-' + key + ':checked').val()) {
if(reply || fav){
if (!excludetxt || excludetxt !="") {
excludetxt = excludetxt + "&exclude_types[]=reblog"
} else {
excludetxt = "?exclude_types[]=reblog"
}
var bt=true
}else{
var bt=false;
}
if ($('#exc-follow-' + key + ':checked').val()) {
if(reply || bt || fav){
if (!excludetxt || excludetxt !="") {
excludetxt = excludetxt + "&exclude_types[]=follow"
} else {
excludetxt = "?exclude_types[]=follow"
}
var follow=true;
}else{
var follow=false;
}
if ($('#exc-poll-' + key + ':checked').val()) {
if(reply || bt || fav || follow){
if (!excludetxt || excludetxt !="") {
excludetxt = excludetxt + "&exclude_types[]=poll"
} else {
excludetxt = "?exclude_types[]=poll"
@@ -447,3 +433,25 @@ function excludeCk(key,target){
return "";
}
}
function checkNotfFilter(tlid){
var excludetxt = localStorage.getItem("exclude-" + tlid);
if(!excludetxt || excludetxt != ""){
return true;
}else{
return false;
}
}
function resetNotfFilter(tlid){
localStorage.setItem("exclude-" + tlid, "")
parseColumn();
}
function notfFilter(id,tlid){
var excludetxt = localStorage.getItem("exclude-" + tlid);
if (!excludetxt || excludetxt !="") {
excludetxt = excludetxt + "&account_id="+id
} else {
excludetxt = "?account_id="+id
}
localStorage.setItem("exclude-" + tlid, excludetxt)
parseColumn();
}

View File

@@ -13,8 +13,33 @@ function list(){
var acct_id = $("#list-acct-sel").val();
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
if (localStorage.getItem("mode_" + domain) == "misskey") {
var start = "https://" + domain + "/api/users/lists/list"
fetch(start, {
method: 'POST',
body: JSON.stringify({
i: at
}),
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json) {
var lists = "";
Object.keys(json).forEach(function (key) {
var list = json[key];
lists = lists + escapeHTML(list.title) + ':<a onclick="listShow(\'' + list.id + '\',\'' + escapeHTML(list.title) + '\',\'' + acct_id +
'\')" class="pointer">' + lang.lang_list_show + '</a><br>';
});
$("#lists").html(lists);
} else {
$("#lists").html(lang.lang_list_nodata);
}
});
} else {
var start = "https://" + domain + "/api/v1/lists"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -31,8 +56,8 @@ function list(){
var lists = "";
Object.keys(json).forEach(function (key) {
var list = json[key];
lists = lists + list.title+':<a onclick="listShow(' + list.id + ',\'' + list.title + '\',\'' + acct_id +
'\')" class="pointer">'+lang.lang_list_show+'</a>/<a onclick="listUser(' + list.id + ',' + acct_id +
lists = lists + escapeHTML(list.title) + ':<a onclick="listShow(\'' + list.id + '\',\'' + escapeHTML(list.title) + '\',\'' + acct_id +
'\')" class="pointer">' + lang.lang_list_show + '</a>/<a onclick="listUser(\'' + list.id + '\',' + acct_id +
')" class="pointer">' + lang.lang_list_users + '</a><br>';
});
$("#lists").html(lists);
@@ -41,13 +66,14 @@ function list(){
}
});
}
}
function makeNewList() {
var acct_id = $("#list-acct-sel").val();
var text = $("#list-add").val();
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
if (localStorage.getItem("mode_" + domain) != "misskey") {
var start = "https://" + domain + "/api/v1/lists"
console.log(start)
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
@@ -63,6 +89,24 @@ function makeNewList(){
$("#list-add").val("")
}
}
} else {
var start = "https://" + domain + "/api/users/lists/create"
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.responseType = "json";
httpreq.send(JSON.stringify({
i: at,
title: text
}));
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
list();
$("#list-add").val("")
}
}
}
}
function listShow(id, title, acct_id) {
localStorage.setItem("list_" + id + "_" + acct_id, title);
@@ -72,7 +116,6 @@ function listUser(id,acct_id){
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain + "/api/v1/lists/" + id + "/accounts"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -100,8 +143,8 @@ function listUser(id,acct_id){
function hisList(user, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
if (localStorage.getItem("mode_" + domain) != "misskey") {
var start = "https://" + domain + "/api/v1/lists"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -118,7 +161,7 @@ function hisList(user,acct_id){
var lists = lang.lang_list_add + "<br>";
Object.keys(json).forEach(function (key) {
var list = json[key];
lists = lists + '<a onclick="listAdd(' + list.id + ',\'' + user + '\',\'' + acct_id +
lists = lists + '<a onclick="listAdd(\'' + list.id + '\',\'' + user + '\',\'' + acct_id +
'\')" class="pointer">' + escapeHTML(list.title) + '</a><br> ';
});
$("#his-lists-a").html(lists);
@@ -127,7 +170,6 @@ function hisList(user,acct_id){
}
});
var start = "https://" + domain + "/api/v1/accounts/" + user + "/lists"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -144,28 +186,65 @@ function hisList(user,acct_id){
var lists = lang.lang_list_remove + "<br>";
Object.keys(json).forEach(function (key) {
var list = json[key];
lists = lists + '<a onclick="listRemove(' + list.id + ',\'' + user + '\',\'' + acct_id +
'\')" class="pointer">'+list.title+'</a><br> ';
lists = lists + '<a onclick="listRemove(\'' + list.id + '\',\'' + user + '\',\'' + acct_id +
'\')" class="pointer">' + escapeHTML(list.title) + '</a><br> ';
});
$("#his-lists-b").html(lists);
} else {
$("#his-lists-b").html(lang.lang_list_nodata);
}
});
} else {
var start = "https://" + domain + "/api/users/lists/list"
fetch(start, {
method: 'POST',
body: JSON.stringify({
i: at
}),
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json) {
var lists = "";
Object.keys(json).forEach(function (key) {
var list = json[key];
lists = lists + list.title + ':<a onclick="listShow(\'' + list.id + '\',\'' + escapeHTML(list.title) + '\',\'' + acct_id +
'\')" class="pointer">' + lang.lang_list_show + '</a>/<a onclick="listAdd(\'' + list.id + '\',\'' + user + '\',\'' + acct_id +
'\')" class="pointer">' + lang.lang_list_add + lang.lang_list_add_misskey + '</a><br>';
});
$("#his-lists-a").html(lists);
} else {
$("#his-lists-a").html(lang.lang_list_nodata);
}
});
$("#his-lists-b").html("");
}
}
function listAdd(id, user, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
if (localStorage.getItem("mode_" + domain) == "misskey") {
var start = "https://" + domain + "/api/users/lists/push"
var i = {
i: at,
listId: id,
userId: user
}
} else {
var start = "https://" + domain + "/api/v1/lists/" + id + "/accounts"
console.log(start)
var i = {
account_ids: [user]
}
}
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
httpreq.responseType = "json";
httpreq.send(JSON.stringify({
account_ids: [user]
}));
httpreq.send(JSON.stringify(i));
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
@@ -176,16 +255,27 @@ function listAdd(id,user,acct_id){
function listRemove(id, user, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
if (localStorage.getItem("mode_" + domain) == "misskey") {
var start = "https://" + domain + "/api/users/lists/push"
var method = 'POST'
var i = {
i: at,
listId: id,
userId: user
}
} else {
var start = "https://" + domain + "/api/v1/lists/" + id + "/accounts"
console.log(start)
var method = 'DELETE'
var i = {
account_ids: [user]
}
}
var httpreq = new XMLHttpRequest();
httpreq.open('DELETE', start, true);
httpreq.open(method, start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
httpreq.responseType = "json";
httpreq.send(JSON.stringify({
account_ids: [user]
}));
httpreq.send(JSON.stringify(i));
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;

View File

@@ -160,6 +160,17 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
} else {
disname = "";
}
//絵文字があれば
if (toot.user.emojis) {
Object.keys(toot.user.emojis).forEach(function (key5) {
var emoji = toot.user.emojis[key5];
var shortcode = emoji.name;
var emoji_url = '<img draggable="false" src="' + emoji.url +
'" class="emoji-img" data-emoji="' + shortcode + '" alt=" :' + shortcode + ': ">';
var regExp = new RegExp(":" + shortcode + ":", "g");
dis_name = dis_name.replace(regExp, emoji_url);
});
}
if (mix == "notf") {
if (gif == "yes") {
noticeavatar = toot.user.avatarUrl;
@@ -173,14 +184,14 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
'"></a>';
if (toot.type == "reply") {
var what = lang.lang_parse_mentioned;
var icon = '<i class="big-text fa fa-share teal-text"></i>';
var icon = '<i class="big-text fas fa-share teal-text"></i>';
noticeavatar = "";
} else if (toot.type == "renote") {
var what = lang.lang_misskeyparse_renoted;
var icon = '<i class="big-text fa fa-retweet light-blue-text"></i>';
var icon = '<i class="big-text fas fa-retweet light-blue-text"></i>';
} else if (toot.type == "quote") {
var what = lang.lang_misskeyparse_quoted;
var icon = '<i class="big-text fa fa-quote-right orange-text"></i>';
var icon = '<i class="big-text fas fa-quote-right orange-text"></i>';
} else if (toot.type == "reaction") {
var what = lang.lang_misskeyparse_reacted;
var reactions = {
@@ -192,29 +203,29 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
"congrats": "🎉",
"amgry": "💢",
"confused": "😥",
"pudding":"🍮"
"rip": "😇"
}
var icon = reactions[toot.reaction];
var reactions=["like","love","laugh","hmm","surprise","congrats","angry","confused","pudding"];
for(var i=0;i<reactions.length;i++){
if(toot.note.reactionCounts[reactions[i]]){
$("#pub_" + id +" .re-"+reactions[i]+"ct").text(toot.note.reactionCounts[reactions[i]])
$("#pub_" + id +" .re-"+reactions[i]).removeClass("hide")
}else{
$("#pub_" + id +" .re-"+reactions[i]+"ct").text(0)
if($("#pub_" + id +" .reactions").hasClass("fullreact")){
$("#pub_" + id +" .re-"+reactions[i]).addClass("hide")
}else{
$("#pub_" + id +" .re-"+reactions[i]).removeClass("hide")
var emojisData = JSON.parse(localStorage.getItem("emoji_" + acct_id));
if (!icon) {
if (emojisData) {
var num = emojisData.length;
var ehtml = "";
for (i = 0; i < num; i++) {
var emoji = emojisData[i];
if (":" + emoji.shortcode + ":" == toot.reaction) {
if (emoji) {
icon = '<img src="' + emoji.url + '" style="width:1rem">';
}
}
}
$("#pub_" + id +" .re-"+reactions[i]+"ct").text(toot.note.reactionCounts[reactions[i]])
}
}
} else {
var icon = '<i class="big-text material-icons indigo-text" style="font-size:17px">info</i>';
}
var noticetext = '<span class="cbadge cbadge-hover"title="' + date(toot.createdAt,
'absolute') + '('+lang.lang_parse_notftime+')"><i class="fa fa-clock-o"></i>' + date(toot.createdAt,
'absolute') + '(' + lang.lang_parse_notftime + ')"><i class="far fa-clock"></i>' + date(toot.createdAt,
datetype) +
'</span>' + icon + '<a onclick="udg(\'' + toot.user.username +
'\',\'' + acct_id + '\')" class="pointer grey-text">' + dis_name +
@@ -250,19 +261,19 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
var ipc = electron.ipcRenderer;
var os = electron.remote.process.platform;
var options = {
body: toot.account.display_name+"(" + toot.account.acct +")"+what+"\n\n"+$.strip_tagstemp(toot.status.content),
icon: toot.account.avatar
body: toot.user.name + "(" + toot.user.username + ")" + what + "\n\n" + $.strip_tagstemp(toot.note.text),
icon: toot.user.avatarUrl
};
if (os == "darwin") {
var n = new Notification('TheDesk:' + domain, options);
} else {
ipc.send('native-notf', [
'TheDesk:' + domain,
toot.account.display_name+"(" + toot.account.acct +")"+what+"\n\n"+$.strip_tagstemp(toot.status.content),
toot.account.avatar,
toot.user.name + "(" + toot.user.username + ")" + what + "\n\n" + $.strip_tagstemp(toot.note.text),
toot.user.avatarUrl,
"toot",
acct_id,
toot.status.id
toot.note.id
]);
}
}
@@ -274,18 +285,20 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
}
var if_notf = 'data-notfIndv="' + acct_id + "_" + toot.id + '"';
var toot = toot.note;
var dis_name=escapeHTMLtemp(toot.user.name);
var dis_name = escapeHTML(toot.user.name);
} else {
var if_notf = "";
if (toot.renote) {
var rebtxt = lang.lang_parse_btedsimple;
var rticon = "fa-retweet light-blue-text";
var notice = '<i class="big-text fa '+rticon+'"></i>'+ dis_name + "(@" + toot.user.username +
var notice = '<i class="big-text fas ' + rticon + '"></i>' + dis_name + "(@" + toot.user.username +
")<br>";
var boostback = "shared";
var uniqueid = toot.id;
if (!toot.text) {
var toot = toot.renote;
var dis_name=escapeHTMLtemp(toot.user.name);
}
var dis_name = escapeHTML(toot.user.name);
var uniqueid = toot.id;
var actemojick = false
} else {
@@ -328,10 +341,14 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
if (toot.viaMobile) {
var via = '<span style="font-style: italic;">Mobile</span>';
} else {
var via = '<span style="font-style: italic;">Unknown</span>';
var via = '';
viashow = "via-hide";
}
} else {
var via = toot.app.name;
var via = escapeHTML(toot.app.name);
if (!toot.app.name) {
viashow = "via-hide";
}
//強調チェック
Object.keys(emp).forEach(function (key6) {
var cli = emp[key6];
@@ -348,7 +365,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
});
}
if ((toot.cw || toot.cw == "") && cw) {
var content = toot.text;
var content = escapeHTML(toot.text);
var spoil = escapeHTMLtemp(toot.cw);
var spoiler = "cw cw_hide_" + toot.id;
var api_spoil = "gray";
@@ -403,17 +420,35 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
content = content.replace(/`(.+)`/gi, '<code>$1</code>')
content = content.replace(/(http(s)?:\/\/[\x21-\x7e]+)/gi, '<a href="$1" target="_blank">$1</a>')
content = content.replace(/\(\(\((.+)\)\)\)/gi, '<span class="shake">$1</span>')
content=content.replace(/<motion>(.+)<\/motion>/gi, '<span class="shake">$1</span>')
content = content.replace(/&lt;motion&gt;(.+)&lt;\/motion&gt;/gi, '<span class="shake">$1</span>')
content = content.replace(/\*\*\*([^*]+)\*\*\*/gi, '<span class="shake" style="font-size:200%">$1</span>')
content = content.replace(/\*\*([^*]+)\*\*/gi, '<b>$1</b>')
content = content.replace(/^(.+)\s(検索|search)$/gmi, '<div class="input-field"><i class="material-icons prefix">search</i><input type="text" style="width:calc( 60% - 80px);" name="q" value="$1" id="srcbox_' + toot.id + '"><label for="src" data-trans="src" class="">検索</label><button class="btn waves-effect indigo" style="width:40%;" data-trans-i="src" onclick="goGoogle(\'' + toot.id + '\')">検索</button></div>')
content = content.replace(/\[(.+)\]\(<a href="(http(s)?:\/\/[\x21-\x7e]+)".+\)/gi, '<a href="$2" target="_blank">$1</a>');
content = content.replace(/&lt;center&gt;/gi, '<div class="center">')
content = content.replace(/&lt;\/center&gt;/gi, '</div>')
content = content.replace(/&lt;flip&gt;(.+)&lt;\/flip&gt;/gi, '<span class="fa fa-flip-horizontal">$1</span>')
content = content.replace(/&lt;small&gt;(.+)&lt;\/small&gt;/gi, '<small>$1</small>')
content = content.replace(/&lt;i&gt;(.+)&lt;\/i&gt;/gi, '<i>$1</i>')
content = content.replace(/&lt;spin&gt;(.+)&lt;\/spin&gt;/gi, '<span class="fa fa-spin">$1</span>')
content = content.replace(/\*\*(.+)\*\*/gi, '<b>$1</b>')
content = content.replace(/&lt;jump&gt;(.+)&lt;\/jump&gt;/gi, '<span class="jump">$1</jump>')
content = twemoji.parse(content);
} else {
content = "";
}
//絵文字があれば
if (emojick) {
Object.keys(toot.emojis).forEach(function (key5) {
var emoji = toot.emojis[key5];
var shortcode = emoji.name;
var emoji_url = '<img draggable="false" src="' + emoji.url +
'" class="emoji-img" data-emoji="' + shortcode + '" alt=" :' + shortcode + ': ">';
var regExp = new RegExp(":" + shortcode + ":", "g");
content = content.replace(regExp, emoji_url);
spoil = spoil.replace(regExp, emoji_url);
});
}
if (dis_name) {
dis_name = twemoji.parse(dis_name);
} else {
@@ -482,7 +517,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
mentions = '<div style="float:right"><a onclick="udg(\'' + menck.user.id + '\',' +
acct_id + ')" class="pointer">@' + menck.user.username + '</a></div>';
}
var tagck = toot.tags[0];
var tagck = toot.tags;
var tags = "";
//タグであれば
if (tagck) {
@@ -586,7 +621,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
for (var i = 0; i < tickerdata.length; i++) {
var value = tickerdata[i];
if (value.domain == thisdomain) {
var tickerdom='<div style="background:linear-gradient(to left,transparent, '+value.bg+' 96%) !important; color:'+value.text+';width:100%; height:0.9rem; font-size:0.8rem;"><img src="'+value.image+'" style="height:100%;"><span style="position:relative; top:-0.2rem;"> '+value.name+'</span></div>';
var tickerdom = '<div style="background:linear-gradient(to left,transparent, ' + value.bg + ' 96%) !important; color:' + value.text + ';width:100%; height:0.9rem; font-size:0.8rem;"><img src="' + value.image + '" style="height:100%;"><span style="position:relative; top:-0.2rem;"> ' + escapeHTML(value.name) + '</span></div>';
break;
}
}
@@ -602,79 +637,122 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
} else {
var myvote = "";
}
poll=poll+'<div class="pointer vote" onclick="vote(\''+acct_id+'\',\''+toot.id+'\','+choice.id+')">'+choice.text+'('+choice.votes+''+myvote+')</div>';
poll = poll + '<div class="pointer vote" onclick="vote(\'' + acct_id + '\',\'' + toot.id + '\',' + choice.id + ')">' + escapeHTML(choice.text) + '(' + choice.votes + '' + myvote + ')</div>';
});
poll = '<div class="vote_' + toot.id + '">' + poll + '</div>';
}
//引用Renote
if (toot.renote) {
poll = poll + '<div class="quote-renote"><div class="renote-icon"><a onclick="udg(\'' + toot.renote.user.id +
'\',' + acct_id + ');" user="' + toot.renote.user.username + '" class="udg"><img src="' + toot.renote.user.avatarUrl + '"></a></div><div class="renote-user">' + escapeHTML(toot.renote.user.name) + '</div><div class="renote-text">' + escapeHTML(toot.renote.text) + '</div></div>'
}
if (localStorage.getItem("emojiReaction_" + acct_id) == "disabled") {
var freeReact = "hide";
} else {
var freeReact = "";
}
//Reactions
if(toot.reactionCounts){
if(toot.reactionCounts.like){
var like=toot.reactionCounts.like;
var addReact = "";
if (toot.reactions) {
Object.keys(toot.reactions).forEach(function (keye) {
var thisReact = toot.reactions[keye];
if (keye == "like") { var defaultEmoji = true; }
else if (keye == "love") { var defaultEmoji = true; }
else if (keye == "laugh") { var defaultEmoji = true; }
else if (keye == "hmm") { var defaultEmoji = true; }
else if (keye == "surprise") { var defaultEmoji = true; }
else if (keye == "congrats") { var defaultEmoji = true; }
else if (keye == "angry") { var defaultEmoji = true; }
else if (keye == "confused") { var defaultEmoji = true; }
else if (keye == "star") { var defaultEmoji = true; }
else {
var obj = JSON.parse(localStorage.getItem("emoji_" + acct_id));
if (obj) {
var num = obj.length;
var ehtml = "";
for (i = 0; i < num; i++) {
var emoji = obj[i];
if (":" + emoji.shortcode + ":" == keye) {
if (emoji) {
addReact = addReact + '<span class="reaction"><a onclick="reaction(\'' + keye + '\',\'' + toot.id + '\',' + acct_id +
',\'' + tlid + '\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0;margin-left:3px;"><img src="' + emoji.url + '" style="width:13px;"></a><span class="re-' + emoji.shortcode + 'ct">' + thisReact +
'</span></span>';
}
}
}
}
}
});
if (toot.reactions.like) {
var like = toot.reactions.like;
var likehide = "";
} else {
var like = 0;
var likehide = "hide";
}
if(toot.reactionCounts.love){
var love=toot.reactionCounts.love;
if (toot.reactions.love) {
var love = toot.reactions.love;
var lovehide = "";
} else {
var love = 0;
var lovehide = "hide";
}
if(toot.reactionCounts.laugh){
var laugh=toot.reactionCounts.laugh;
if (toot.reactions.laugh) {
var laugh = toot.reactions.laugh;
var laughhide = "";
} else {
var laugh = 0;
var laughhide = "hide";
}
if(toot.reactionCounts.hmm){
var hmm=toot.reactionCounts.hmm;
if (toot.reactions.hmm) {
var hmm = toot.reactions.hmm;
var hmmhide = "";
} else {
var hmm = 0;
var hmmhide = "hide";
}
if(toot.reactionCounts.surprise){
var surprise=toot.reactionCounts.surprise;
if (toot.reactions.surprise) {
var surprise = toot.reactions.surprise;
var suphide = "";
} else {
var suphide = "hide";
var surprise = 0;
}
if(toot.reactionCounts.congrats){
var congrats=toot.reactionCounts.congrats;
if (toot.reactions.congrats) {
var congrats = toot.reactions.congrats;
var conghide = "";
} else {
var congrats = 0;
var conghide = "hide";
}
if(toot.reactionCounts.angry){
var angry=toot.reactionCounts.angry;
if (toot.reactions.angry) {
var angry = toot.reactions.angry;
var anghide = "";
} else {
var angry = 0;
var anghide = "hide";
}
if(toot.reactionCounts.confused){
if (toot.reactions.confused) {
var confhide = "";
var confused=toot.reactionCounts.confused;
var confused = toot.reactions.confused;
} else {
var confused = 0;
var confhide = "hide";
}
if(toot.reactionCounts.pudding){
var pudding=toot.reactionCounts.pudding;
var pudhide="";
if (toot.reactions.rip) {
var riphide = "";
var rip = toot.reactions.rip;
} else {
var pudding=0;
var pudhide="hide";
var rip = 0;
var riphide = "hide";
}
var fullhide = "";
} else {
var like = 0; var love = 0; var laugh = 0; var hmm = 0; var surprise = 0; var congrats = 0; var angry = 0; var confused = 0; var pudding = 0;
var likehide="hide";var lovehide="hide";var laughhide="hide";var hmmhide="hide";var suphide="hide";var conghide="hide";var anghide="hide";var confhide="hide";var pudhide="hide";
var likehide = "hide"; var lovehide = "hide"; var laughhide = "hide"; var hmmhide = "hide"; var suphide = "hide"; var conghide = "hide"; var anghide = "hide"; var confhide = "hide"; var riphide = "hide"
var fullhide = "hide";
}
if (!addReact && likehide == "hide" && lovehide == "hide" && laughhide == "hide" && hmmhide == "hide" && suphide == "hide" && conghide == "hide" && anghide == "hide" && confhide == "hide" && riphide == "hide") {
var fullhide = "hide";
}
if (toot.myReaction) {
@@ -687,6 +765,11 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
content = '<span class="gray">This post has no content. It may be media-only, private or deleted.</span>';
}
var trans = "";
if (toot.user.emojis) {
var actemojick = toot.user.emojis[0];
} else {
var actemojick = false;
}
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' +
boostback + ' ' + fav_app + ' ' + rt_app + ' ' + hasmedia + '" toot-id="' + id + '" unique-id="' + uniqueid + '" data-medias="' + media_ids + ' " unixtime="' + date(obj[
key].created_at, 'unix') + '" ' + if_notf + ' onmouseover="mov(\'' + toot.id + '\',\'' + tlid + '\',\'mv\')" onclick="mov(\'' + toot.id + '\',\'' + tlid + '\',\'cl\')" onmouseout="resetmv(\'mv\')" reacted="' + reacted + '">' +
@@ -703,7 +786,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
toot.user.username + '</span></div>' +
'<div class="flex-time"><span class="cbadge cbadge-hover pointer waves-effect" onclick="tootUriCopy(\'https://' + domain + "/notes/" +
toot.id + '\');" title="' + date(toot.createdAt, 'absolute') +
'('+lang.lang_parse_clickcopyurl+')"><i class="fa fa-clock-o"></i>' +
'(' + lang.lang_parse_clickcopyurl + ')"><i class="far fa-clock"></i>' +
date(toot.createdAt, datetype) + '</span>' +
'</div></div>' +
'<div class="area-toot">' + tickerdom + '<span class="toot ' + spoiler + '">' + content +
@@ -728,9 +811,11 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
',\'' + tlid + '\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0;margin-left:3px;">' + twemoji.parse("💢") + '</a><span class="re-angryct">' + angry +
'</span></span><span class="' + confhide + ' reaction re-confused"><a onclick="reaction(\'confused\',\'' + toot.id + '\',' + acct_id +
',\'' + tlid + '\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0;margin-left:3px;">' + twemoji.parse("😥") + '</a><span class="re-confusedct">' + confused +
'</span></span><span class="'+pudhide+' reaction re-pudding"><a onclick="reaction(\'pudding\',\'' + toot.id + '\',' + acct_id +
',\'' + tlid +'\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0;margin-left:3px;">'+twemoji.parse("🍮")+'</a><span class="re-puddingct">'+pudding+
'</span></div>'+poll + mentions + tags + '</div>' +
'</span></span><span class="' + riphide + ' reaction re-confused"><a onclick="reaction(\'confused\',\'' + toot.id + '\',' + acct_id +
',\'' + tlid + '\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0;margin-left:3px;">' + twemoji.parse("😇") + '</a><span class="re-confusedct">' + rip +
'</span></span>' + addReact +
'<i class="material-icons pointer hide freeReact ' + freeReact + '" style="font-size:1.0rem; padding-left:5px;position: relative;top: 3px;" onclick="reactioncustom(\'' + acct_id + '\',\'' + id + '\')">add_box</i></div>'
+ poll + mentions + tags + '</div>' +
'<div class="area-vis"></div>' +
'<div class="area-actions ' + mouseover + '">' +
'<div class="action">' + vis + '</div>' +
@@ -738,23 +823,23 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
'<div class="action ' + disp["re"] + ' ' + noauth + '"><a onclick="misskeyreply(\'' + toot.id +
'\',\'' + acct_id + '\',' +
acct_id + ',\'' + visen +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_replyto+'"><i class="fa fa-share"></i></a></div>' +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_parse_replyto + '"><i class="fas fa-share"></i></a></div>' +
'<div class="action ' + can_rt + ' ' + disp["rt"] + ' ' + noauth + '"><a onclick="renote(\'' + toot.id + '\',' + acct_id +
',\'' + tlid +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_renote+'"><i class="text-darken-3 fa fa-retweet ' +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_misskeyparse_renote + '"><i class="text-darken-3 fas fa-retweet ' +
if_rt + ' rt_' + toot.id + '"></i><span class="rt_ct"></span></a></div>' +
'<div class="action ' + can_rt + ' ' + disp["qt"] + ' ' + noauth + '"><a onclick="renoteqt(\'' + toot.id + '\',' + acct_id +
',\'misskey.xyz\',\'misskey.xyz\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_renoteqt+'"><i class="text-darken-3 fa fa-quote-right"></i></a></div>' +
',\'misskey.xyz\',\'misskey.xyz\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_misskeyparse_renoteqt + '"><i class="text-darken-3 fas fa-quote-right"></i></a></div>' +
'<div class="action ' + disp["fav"] + ' ' + noauth + '"><a onclick="reactiontoggle(\'' + toot.id + '\',' + acct_id +
',\'' + tlid +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_reaction+'"><i class="fa text-darken-3 fa-plus' +
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_misskeyparse_reaction + '"><i class="fas text-darken-3 fa-plus' +
if_fav + ' fav_' + toot.id + '"></i></div>' +
'<div class="' + if_mine + ' action ' + disp["del"] + ' ' + noauth + '"><a onclick="del(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_del+'"><i class="fa fa-trash-o"></i></a></div>' +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_parse_del + '"><i class="fas fa-trash"></i></a></div>' +
'<div class="' + if_mine + ' action pin ' + disp["pin"] + ' ' + noauth + '"><a onclick="pin(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_pin+'"><i class="fa fa-map-pin pin_' + toot.id + '"></i></a></div>'
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_parse_pin + '"><i class="fas fa-map-pin pin_' + toot.id + '"></i></a></div>'
+ '<div class="' + if_mine + ' action ' + disp["red"] + ' ' + noauth + '"><a onclick="redraft(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_parse_redraft + '"><i class="material-icons">redo</i></a></div>' + trans +
@@ -772,15 +857,23 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
//オブジェクトパーサー(ユーザーデータ)
function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
console.log(["Parse them ", obj])
if (popup > 0 || popup == -1) {
} else {
if (obj.users) {
var obj = obj.users;
}
}
var templete = '';
var datetype = localStorage.getItem("datetype");
Object.keys(obj).forEach(function (key) {
var toot = obj[key];
if (toot.followee) {
toot = toot.followee
} else if (toot.follower) {
toot = toot.follower
}
var locked = "";
if (auth) {
var auth = '<i class="material-icons gray pointer" onclick="misskeyRequest(\'' +
@@ -791,7 +884,7 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
var ftxt = lang.lang_parse_followed;
if (popup > 0 || popup == -1) {
var notftext = '<span class="cbadge"title="' + date(toot.createdAt,
'absolute') + '('+lang.lang_parse_notftime+')"><i class="fa fa-clock-o"></i>' + date(toot.createdAt,
'absolute') + '(' + lang.lang_parse_notftime + ')"><i class="far fa-clock"></i>' + date(toot.createdAt,
datetype) +
'</span>' + ftxt + '<br>';
var toot = toot.user;
@@ -835,7 +928,17 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
var dis_name = escapeHTMLtemp(toot.name);
dis_name = twemoji.parse(dis_name);
} else {
var dis_name=toot.name;
var dis_name = toot.username;
}
if (toot.followersCount) {
var ferct = toot.followersCount
} else {
var ferct = "unknown"
}
if (toot.followingCount) {
var fingct = toot.followingCount
} else {
var fingct = "unknown"
}
templete = templete +
'<div class="cvo" style="padding-top:5px;" user-id="' + toot.id + '"><div class="area-notice">' +
@@ -851,8 +954,8 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
'</div>' +
'</div>' +
'<div style="justify-content:space-around" class="area-toot"> <div class="cbadge" style="width:100px;">Follows:' +
toot.followingCount +
'</div><div class="cbadge" style="width:100px;">Followers:' + toot.followersCount +
fingct +
'</div><div class="cbadge" style="width:100px;">Followers:' + ferct +
'</div>' +
'</div>' +
'</div>' +
@@ -870,3 +973,100 @@ function goGoogle(id){
shell.openExternal(url);
}
var misskeyws = []
var misskeywsstate = []
function connectMisskey(acct_id) {
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "wss://" + domain +
"/streaming?i=" + at;
var wsid = misskeyws.length;
localStorage.setItem("misskey_wss_" + acct_id, wsid);
misskeyws[wsid] = new WebSocket(start);
misskeyws[wsid].onopen = function (mess) {
console.table({ "tlid": tlid, "type": "Connect Streaming API", "domain": domain, "message": [mess] })
misskeywsstate[wsid] = true
//$("#notice_icon_" + tlid).removeClass("red-text");
var send = '{"type":"connect","body":{"channel":"main","id":"notf:' + acct_id + '"}}'
misskeyws[wsid].send(send)
}
misskeyws[wsid].onmessage = function (mess) {
console.log([domain + ":Receive Streaming API:", data]);
var data = JSON.parse(mess.data)
var obj = data.body.body
if (data.body.id.indexOf("notf:") !== -1) {
var obj = JSON.parse(mess.data).body;
console.log(obj);
var popup = localStorage.getItem("popup");
if (!popup) {
popup = 0;
}
if (JSON.parse(mess.data).body.type != "follow") {
templete = misskeyParse([obj.body], 'notf', acct_id, 'notf', popup);
} else {
templete = misskeyUserparse([obj.body], 'notf', acct_id, 'notf', popup);
}
if (JSON.parse(mess.data).body.type == "reaction") {
console.log("reaction refresh")
reactRefresh(acct_id, obj.body.note.id)
}
if (!$("div[data-notfIndv=" + acct_id + "_" + obj.body.id + "]").length) {
$("div[data-notf=" + acct_id + "]").prepend(templete);
$("div[data-const=notf_" + acct_id + "]").prepend(templete);
}
jQuery("time.timeago").timeago();
} else if (data.body.type == "note") {
var tlid = data.body.id * 1
var multi = localStorage.getItem("column");
var col = JSON.parse(multi)[tlid];
if (localStorage.getItem("voice_" + tlid)) {
var voice = true;
} else {
var voice = false;
}
if (voice) {
say(obj.text)
}
var templete = misskeyParse([obj], col.type, acct_id, tlid, "", mute);
misskeyws[wsid].send(JSON.stringify({
type: 'sn',
body: {
id: obj.id
}
}))
var pool = localStorage.getItem("pool_" + tlid);
if (pool) {
pool = templete + pool;
} else {
pool = templete
}
localStorage.setItem("pool_" + tlid, pool);
scrollck();
jQuery("time.timeago").timeago();
} else if (data.type == "noteUpdated") {
if (data.body.type == "reacted") {
reactRefresh(acct_id, data.body.id)
} else if (data.body.type == "deleted") {
$("#pub_" + data.body.id).hide();
$("#pub_" + data.body.id).remove();
}
}
}
misskeyws[wsid].onerror = function (error) {
console.error("Error closing " + tlid);
console.error(error);
misskeywsstate[wsid] = false
connectMisskey(acct_id)
return false;
};
misskeyws[wsid].onclose = function () {
console.warn("Closing " + tlid);
misskeywsstate[wsid] = false
connectMisskey(acct_id)
return false;
};
}

View File

@@ -1,6 +1,5 @@
//Integrated TL
function mixtl(acct_id, tlid, type, delc, voice) {
console.log(delc);
localStorage.removeItem("morelock")
localStorage.setItem("now", type);
todo("Integrated TL Loading...(Local)");
@@ -94,19 +93,18 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
websocketLocal[wslid] = new WebSocket(startLocal);
websocketHome[wshid].onopen = function (mess) {
localStorage.setItem("wssH_" + tlid, wshid);
console.log("Connect Streaming API(Integrated:Home)");
console.table({ "tlid": tlid, "type": "Connect Streaming API(Integrated:Home)", "domain": domain, "message": mess })
$("#notice_icon_" + tlid).removeClass("red-text");
}
websocketLocal[wslid].onopen = function (mess) {
localStorage.setItem("wssL_" + tlid, wslid);
console.log("Connect Streaming API(Integrated:Local)");
console.table({ "tlid": tlid, "type": "Connect Streaming API(Integrated:Local)", "domain": domain, "message": mess })
$("#notice_icon_" + tlid).removeClass("red-text");
}
websocketLocal[wslid].onmessage = function (mess) {
console.log("Receive Streaming API:(Integrated:Local)");
console.log(["Receive Streaming API:(Integrated:Local)", obj]);
var obj = JSON.parse(JSON.parse(mess.data).payload);
console.log(obj);
var type = JSON.parse(mess.data).event;
if (type == "delete") {
if (delc == "true") {
@@ -143,10 +141,8 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
}
}
websocketHome[wshid].onmessage = function (mess) {
console.log("Receive Streaming API:(Integrated:Home)");
console.log(["Receive Streaming API:(Integrated:Home)", obj]);
var obj = JSON.parse(JSON.parse(mess.data).payload);
console.log(obj);
var type = JSON.parse(mess.data).event;
if (type == "delete") {
if (del > 10) {
@@ -195,40 +191,57 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
}
}
websocketLocal[wslid].onerror = function (error) {
console.error('WebSocket Error ' + error);
console.error('WebSocketLocal Error')
console.error(error);
if (mode == "error") {
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Error ' + error);
} else {
var errorct = localStorage.getItem("wserror_" + tlid) * 1 + 1;
localStorage.setItem("wserror_" + tlid, errorct);
if (errorct < 3) {
reconnector(tlid, TLtype, acct_id, "", "error");
}
}
};
websocketLocal[wslid].onclose = function () {
console.error('WebSocketLocal Closing by error:' + tlid);
console.warn('WebSocketLocal Closing:' + tlid);
if (mode == "error") {
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed');
} else {
var errorct = localStorage.getItem("wserror_" + tlid) * 1 + 1;
localStorage.setItem("wserror_" + tlid, errorct);
if (errorct < 3) {
reconnector(tlid, TLtype, acct_id, "", "error");
}
}
};
websocketHome[wshid].onerror = function (error) {
console.error('WebSocket Error ' + error);
console.error(['WebSocketHome Error', error])
if (mode == "error") {
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Error ' + error);
} else {
var errorct = localStorage.getItem("wserror_" + tlid) * 1 + 1;
localStorage.setItem("wserror_" + tlid, errorct);
if (errorct < 3) {
reconnector(tlid, TLtype, acct_id, "", "error");
}
}
};
websocketHome[wshid].onclose = function () {
console.error('WebSocketHome Closing by error:' + tlid);
console.warn('WebSocketHome Closing:' + tlid);
if (mode == "error") {
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed');
} else {
var errorct = localStorage.getItem("wserror_" + tlid) * 1 + 1;
localStorage.setItem("wserror_" + tlid, errorct);
if (errorct < 3) {
reconnector(tlid, TLtype, acct_id, "", "error");
}
}
};

View File

@@ -15,12 +15,11 @@ function notfColumn(acct_id, tlid, sys){
native = "yes";
}
var domain = localStorage.getItem("domain_" + acct_id);
console.log(start)
var httpreq = new XMLHttpRequest();
if (localStorage.getItem("mode_" + domain) == "misskey") {
var misskey = true;
var start = "https://" + domain + "/api/i/notifications";
httpreq.open(POST, start, true);
httpreq.open("POST", start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
var body = JSON.stringify({
i: at
@@ -44,7 +43,10 @@ function notfColumn(acct_id, tlid, sys){
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
var max_id = httpreq.getResponseHeader("link").match(/[?&]{1}max_id=([0-9]+)/)[1];
var max_id = httpreq.getResponseHeader("link");
if (max_id) {
max_id = max_id.match(/[?&]{1}max_id=([0-9]+)/)[1]
}
if (json[0]) {
var templete = "";
var lastnotf = localStorage.getItem("lastnotf_" + acct_id);
@@ -60,13 +62,13 @@ function notfColumn(acct_id, tlid, sys){
var ipc = electron.ipcRenderer;
var os = electron.remote.process.platform;
var options = {
body: ct+lang_notf_new[lang],
body: ct + lang.lang_notf_new,
icon: localStorage.getItem("prof_" + acct_id)
};
if (os == "darwin") {
var n = new Notification('TheDesk:' + domain, options);
} else {
ipc.send('native-notf', ['TheDesk:'+domain,ct+lang_notf_new[lang],localStorage.getItem("prof_"+acct_id)]);
ipc.send('native-notf', ['TheDesk:' + domain, ct + lang.lang_notf_new, localStorage.getItem("prof_" + acct_id)]);
}
}
@@ -77,15 +79,15 @@ function notfColumn(acct_id, tlid, sys){
}
if (obj.type != "follow") {
if (misskey) {
templete = templete+misskeyParse([obj], 'notf', acct_id, 'notf', -1, mute);
templete = templete + misskeyParse([obj], 'notf', acct_id, tlid, -1, mute);
} else {
templete = templete+parse([obj], 'notf', acct_id, 'notf', -1, mute);
templete = templete + parse([obj], 'notf', acct_id, tlid, -1, mute);
}
} else {
if (misskey) {
templete = templete+misskeyUserparse([obj], 'notf', acct_id, 'notf', -1, mute);
templete = templete + misskeyUserparse([obj], 'notf', acct_id, tlid, -1, mute);
} else {
templete = templete+userparse([obj.account], 'notf', acct_id, 'notf', -1);
templete = templete + userparse([obj.account], 'notf', acct_id, tlid, -1);
}
}
@@ -112,73 +114,6 @@ function notfColumn(acct_id, tlid, sys){
at;
}
console.log(start);
var wsid = websocketNotf.length;
websocketNotf[acct_id] = new WebSocket(start);
console.log(websocketNotf);
websocketNotf[acct_id].onopen = function(mess) {
console.log("Connect Streaming API(Notf):");
console.log(mess);
$("i[data-notf=" + acct_id +"]").removeClass("red-text");
}
websocketNotf[acct_id].onmessage = function(mess) {
console.log("Receive Streaming API(Notf):"+acct_id);
var popup = localStorage.getItem("popup");
if (!popup) {
popup = 0;
}
console.log(domain)
if(misskey){
console.log("misskey")
console.log(JSON.parse(mess.data));
if (JSON.parse(mess.data).type == "notification") {
var obj = JSON.parse(mess.data).body;
console.log(obj);
if(obj.type!="follow"){
templete = misskeyParse([obj], 'notf', acct_id, 'notf', popup);
}else{
templete = misskeyUserparse([obj], 'notf', acct_id, 'notf', popup);
}
if(obj.type=="reaction"){
console.log("refresh")
reactRefresh(acct_id,obj.note.id)
}
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
$("div[data-notf=" + acct_id +"]").prepend(templete);
}
jQuery("time.timeago").timeago();
}else if(JSON.parse(mess.data).type == "note-updated"){
var obj = JSON.parse(mess.data).body.note;
reactRefreshCore(obj)
}
}else{
var obj = JSON.parse(JSON.parse(mess.data).payload);
console.log(obj);
var type = JSON.parse(mess.data).event;
if (type == "notification") {
var templete="";
localStorage.setItem("lastnotf_" + acct_id,obj.id);
if(obj.type!="follow"){
templete = parse([obj], 'notf', acct_id, 'notf', popup);
}else{
templete = userparse([obj], 'notf', acct_id, 'notf', popup);
}
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
$(".tl[data-notf=" + acct_id +"]").prepend(templete);
}
$(".notf-timeline[data-acct=" + acct_id +"]").prepend(templete);
jQuery("time.timeago").timeago();
} else if (type == "delete") {
$("[toot-id=" + obj + "]").hide();
$("[toot-id=" + obj + "]").remove();
}
}
}
websocketNotf[acct_id].onerror = function(error) {
console.error('WebSocket Error ' + error);
};
}
function notfCommon(acct_id, tlid, sys) {
todo("Notifications Loading...");
@@ -212,7 +147,7 @@ function notfCommon(acct_id, tlid, sys) {
}
}
fetch(start, i).then(function (response) {
console.log(response.headers.get('link'));
console.log("header to get param:" + response.headers.get('link'));
return response.json();
}).catch(function (error) {
todo(error);
@@ -233,13 +168,13 @@ function notfCommon(acct_id, tlid, sys) {
var ipc = electron.ipcRenderer;
var os = electron.remote.process.platform;
var options = {
body: ct+lang_notf_new[lang],
body: ct + lang.lang_notf_new,
icon: localStorage.getItem("prof_" + acct_id)
};
if (os == "darwin") {
var n = new Notification('TheDesk:' + domain, options);
} else {
ipc.send('native-notf', ['TheDesk:'+domain,ct+lang_notf_new[lang],localStorage.getItem("prof_"+acct_id)]);
ipc.send('native-notf', ['TheDesk:' + domain, ct + lang.lang_notf_new, localStorage.getItem("prof_" + acct_id)]);
}
}
@@ -269,7 +204,11 @@ function notfCommon(acct_id, tlid, sys) {
}
$("#notf-box").addClass("fetched");
todc();
notfWS(misskey, acct_id, tlid, domain, at)
});
}
function notfWS(misskey, acct_id, tlid, domain, at) {
if (!misskey) {
if (localStorage.getItem("streaming_" + acct_id)) {
var wss = localStorage.getItem("streaming_" + acct_id)
@@ -278,55 +217,21 @@ function notfCommon(acct_id, tlid, sys) {
}
var start = wss + "/api/v1/streaming/?stream=user&access_token=" +
at;
}else{
var start = "wss://" + domain + "/?i=" +
at;
}
console.log(start);
var wsid = websocketNotf.length;
websocketNotf[acct_id] = new WebSocket(start);
console.log(websocketNotf);
websocketNotf[acct_id].onopen = function (mess) {
console.log("Connect Streaming API(Notf):");
console.log(mess);
console.table({ "acct_id": acct_id, "type": "Connect Streaming API(Notf)", "domain": domain, "message": [mess] })
$("i[data-notf=" + acct_id + "]").removeClass("red-text");
}
websocketNotf[acct_id].onmessage = function (mess) {
console.log("Receive Streaming API(Notf):"+acct_id);
console.log(["Receive Streaming API(Notf):" + acct_id + "(" + domain + ")", JSON.parse(JSON.parse(mess.data).payload)]);
var popup = localStorage.getItem("popup");
if (!popup) {
popup = 0;
}
console.log(domain)
if(misskey){
console.log("misskey")
console.log(JSON.parse(mess.data));
if (JSON.parse(mess.data).type == "notification") {
var obj = JSON.parse(mess.data).body;
console.log(obj);
if(obj.type!="follow"){
templete = misskeyParse([obj], 'notf', acct_id, 'notf', popup);
}else{
templete = misskeyUserparse([obj], 'notf', acct_id, 'notf', popup);
}
if(obj.type=="reaction"){
console.log("refresh")
reactRefresh(acct_id,obj.note.id)
}
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.id+"]").length){
$("div[data-notf=" + acct_id +"]").prepend(templete);
}
jQuery("time.timeago").timeago();
}else if(JSON.parse(mess.data).type == "note-updated"){
var obj = JSON.parse(mess.data).body.note;
reactRefreshCore(obj)
}
}else{
var obj = JSON.parse(JSON.parse(mess.data).payload);
console.log(obj);
var type = JSON.parse(mess.data).event;
if (type == "notification") {
var templete = "";
@@ -338,6 +243,7 @@ function notfCommon(acct_id, tlid, sys) {
}
if (!$("div[data-notfIndv=" + acct_id + "_" + obj.id + "]").length) {
$("div[data-notf=" + acct_id + "]").prepend(templete);
$("div[data-const=notf_" + acct_id + "]").prepend(templete);
}
jQuery("time.timeago").timeago();
} else if (type == "delete") {
@@ -345,15 +251,15 @@ function notfCommon(acct_id, tlid, sys) {
$("[toot-id=" + obj + "]").remove();
}
}
}
websocketNotf[acct_id].onerror = function (error) {
console.error('WebSocket Error ' + error);
notfWS(misskey, acct_id, tlid, domain, at)
};
}
}
//一定のスクロールで発火
function notfmore(tlid) {
console.log(moreloading);
console.log("kicked");
console.log({ "status": "kicked", "status": moreloading });
var multi = localStorage.getItem("column");
var obj = JSON.parse(multi);
var acct_id = obj[tlid].domain;
@@ -396,7 +302,7 @@ function notfmore(tlid) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
console.log(["More notifications on " + tlid, json]);
var max_id = httpreq.getResponseHeader("link").match(/[?&]{1}max_id=([0-9]+)/)[1];
if (json[0]) {
var templete = "";
@@ -480,25 +386,12 @@ function notfCanceler(acct){
$(".notf-icon_" + acct).removeClass("red-text");
}
function allNotfRead() {
console.log(localStorage.getItem("notf-fav_2"));
var multi = localStorage.getItem("multi");
if (!multi) {
var obj = [{
at: localStorage.getItem("acct_0_at"),
name: localStorage.getItem("name_0"),
domain: localStorage.getItem("domain_0"),
user: localStorage.getItem("user_0"),
prof: localStorage.getItem("prof_0"),
id: localStorage.getItem("user-id_0")
}];
var json = JSON.stringify(obj);
localStorage.setItem("multi", json);
} else {
if (multi) {
var obj = JSON.parse(multi);
}
Object.keys(obj).forEach(function (key) {
console.log(key);
notfCanceler(key)
});
}
}
allNotfRead()

View File

@@ -3,7 +3,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var templete = '';
if (obj[0]) {
if (tlid === 1) {
console.log("testalive:"+"lastunix_"+ tlid+":"+date(obj[0].created_at, 'unix'))
}
localStorage.setItem("lastunix_" + tlid, date(obj[0].created_at, 'unix'));
}
@@ -33,6 +33,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var ltr = localStorage.getItem("letters");
var gif = localStorage.getItem("gif");
var imh = localStorage.getItem("img-height");
if (!imh) {
imh = 200;
}
if (imh == "full") {
imh = "auto";
} else {
@@ -232,10 +235,11 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var what = lang.lang_parse_polled;
var icon = "fa-tasks purple-text";
}
var noticetext = '<span class="cbadge cbadge-hover"title="' + date(toot.created_at,
'absolute') + '('+lang.lang_parse_notftime+')"><i class="fa fa-clock-o"></i>' + date(toot.created_at,
var noticetext = '<i class="fas fa-filter pointer big-text" onclick="notfFilter(\'' + toot.account.id +
'\',\'' + tlid + '\');" title="' + lang.lang_parse_notffilter + '"></i><span class="cbadge cbadge-hover"title="' + date(toot.created_at,
'absolute') + '(' + lang.lang_parse_notftime + ')"><i class="far fa-clock"></i>' + date(toot.created_at,
datetype) +
'</span><i class="big-text fa '+icon+'"></i><a onclick="udg(\'' + toot.account.id +
'</span><i class="big-text fas ' + icon + '"></i><a onclick="udg(\'' + toot.account.id +
'\',\'' + acct_id + '\')" class="pointer grey-text">' + dis_name +
"(@" + toot.account.acct +
")</a>";
@@ -248,16 +252,28 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
$(".notf-reply_" + acct_id).text(replyct * 1 - (-1));
localStorage.setItem("notf-reply_" + acct_id, replyct * 1 - (-1))
$(".notf-reply_" + acct_id).removeClass("hide")
var sound = localStorage.getItem("replySound");
if (sound == "default") {
var file = "../../source/notif3.wav"
}
} else if (toot.type == "reblog") {
var btct = localStorage.getItem("notf-bt_" + acct_id)
$(".notf-bt_" + acct_id).text(btct * 1 - (-1));
localStorage.setItem("notf-bt_" + acct_id, btct * 1 - (-1))
$(".notf-bt_" + acct_id).removeClass("hide")
var sound = localStorage.getItem("btSound");
if (sound == "default") {
var file = "../../source/notif2.wav"
}
} else if (toot.type == "favourite") {
var favct = localStorage.getItem("notf-fav_" + acct_id)
$(".notf-fav_" + acct_id).text(favct * 1 - (-1));
localStorage.setItem("notf-fav_" + acct_id, favct * 1 - (-1))
$(".notf-fav_" + acct_id).removeClass("hide")
var sound = localStorage.getItem("favSound");
if (sound == "default") {
var file = "../../source/notif.wav"
}
}
}
@@ -265,6 +281,23 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
if (popup > 0) {
Materialize.toast("[" + domain + "]" + escapeHTML(toot.account.display_name) + what, popup * 1000);
}
//通知音
if (sound == "c1") {
var file = localStorage.getItem("custom1");
} else if (sound == "c2") {
var file = localStorage.getItem("custom2");
} else if (sound == "c3") {
var file = localStorage.getItem("custom3");
} else if (sound == "c4") {
var file = localStorage.getItem("custom4");
}
if (file) {
request = new XMLHttpRequest();
request.open("GET", file, true);
request.responseType = "arraybuffer";
request.onload = playSound;
request.send();
}
if (native == "yes") {
var electron = require("electron");
var ipc = electron.ipcRenderer;
@@ -331,7 +364,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} else if (localStorage.getItem("domain_" + acct_id) == "mstdn.osaka" && !locale) {
rebtxt = "がしばいた";
}
var notice = '<i class="big-text fa '+rticon+'"></i>'+ dis_name + "(@" + toot.account.acct +
var notice = '<i class="big-text fas ' + rticon + '"></i>' + dis_name + "(@" + toot.account.acct +
")<br>";
var boostback = "shared";
var uniqueid = toot.id;
@@ -384,7 +417,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var divider = '<div class="divider"></div>';
}
if (toot.account.locked) {
var locked = ' <i class="fa fa-lock red-text"></i>';
var locked = ' <i class="fas fa-lock red-text"></i>';
} else {
var locked = "";
}
@@ -392,7 +425,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var via = '';
viashow = "hide";
} else {
var via = toot.application.name;
var via = escapeHTML(toot.application.name);
//強調チェック
Object.keys(emp).forEach(function (key6) {
var cli = emp[key6];
@@ -449,6 +482,40 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var viewer = "";
var hasmedia = "";
var youtube = "";
//Poll
var poll = "";
if (toot.poll) {
var choices = toot.poll.options;
if (toot.poll.voted) {
var myvote = lang.lang_parse_voted;
var result_hide = "";
} else {
var myvote = '<a onclick="voteMastodon(\'' + acct_id + '\',\'' + toot.poll.id + '\')" class="votebtn">' + lang.lang_parse_vote + '</a><br>';
if (choices[0].votes_count === 0 || choices[0].votes_count > 0) {
myvote = myvote + '<a onclick="showResult(\'' + acct_id + '\',\'' + toot.poll.id + '\')" class="pointer">' + lang.lang_parse_unvoted + "</a>";
}
var result_hide = "hide";
}
if (toot.poll.expired) {
var ended = lang.lang_parse_endedvote;
} else {
var ended = date(toot.poll.expires_at, datetype);
}
Object.keys(choices).forEach(function (keyc) {
var choice = choices[keyc];
if (!toot.poll.voted && !toot.poll.expired) {
var votesel = 'voteSelMastodon(\'' + acct_id + '\',\'' + toot.poll.id + '\',' + keyc + ',' + toot.poll.multiple + ')';
var voteclass = "pointer waves-effect waves-light";
} else {
var votesel = "";
var voteclass = "";
}
poll = poll + '<div class="' + voteclass + ' vote vote_' + acct_id + '_' + toot.poll.id + '_' + keyc + '" onclick="' + votesel + '">' + escapeHTML(choice.title) + '<span class="vote_' + acct_id + '_' + toot.poll.id + '_result ' + result_hide + '">(' + choice.votes_count + ')</span></div>';
});
poll = '<div class="vote_' + acct_id + '_' + toot.poll.id + '">' + poll + myvote + '<span class="cbadge cbadge-hover" title="' + date(toot.poll.expires_at, 'absolute') +
'"><i class="far fa-calendar-times"></i>' +
ended + '</span></div>';
}
if (toot.emojis) {
var emojick = toot.emojis[0];
} else {
@@ -464,6 +531,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var regExp = new RegExp(":" + shortcode + ":", "g");
content = content.replace(regExp, emoji_url);
spoil = spoil.replace(regExp, emoji_url);
poll = poll.replace(regExp, emoji_url);
});
}
//ニコフレ絵文字
@@ -472,7 +540,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
} else {
var nicoemojick = false;
}
//絵文字があれば
//絵文字があれば(nico)
if (nicoemojick) {
Object.keys(toot.profile_emojis).forEach(function (keynico) {
var emoji = toot.profile_emojis[keynico];
@@ -482,6 +550,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var regExp = new RegExp(":" + shortcode + ":", "g");
content = content.replace(regExp, emoji_url);
spoil = spoil.replace(regExp, emoji_url);
poll = poll.replace(regExp, emoji_url);
});
}
//デフォ絵文字
@@ -498,6 +567,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
if (notice) {
notice = twemoji.parse(notice);
}
if (poll) {
poll = twemoji.parse(poll);
}
var mediack = toot.media_attachments[0];
//メディアがあれば
var media_ids = "";
@@ -509,16 +581,39 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var purl = media.preview_url;
media_ids = media_ids + media.id + ",";
var url = media.url;
var nsfwmes = ""
if (toot.sensitive && nsfw) {
var sense = "sensitive"
} else {
var blur = media.blurhash
if (blur) {
nsfwmes = '<div class="nsfw-media">' + lang.lang_parse_nsfw + '</div>'
purl = parseBlur(blur)
var sense = ""
}
} else {
var sense = ""
var blur = null
}
if (media.pleroma) {
if (media.pleroma.mime_type.indexOf("video") !== -1) {
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',' +
acct_id + ')" id="' + id + '-image-' + key2 + '" data-url="' + url +
'" data-type="video" class="img-parsed"><video src="' +
purl + '" class="' + sense +
' toot-img pointer" style="max-width:100%;"></a></span>';
}
} else {
if (media.type == "unknown") {
viewer = viewer + '<a href="' + media.remote_url + '" title="' + media.remote_url + '">[' + lang.lang_parse_unknown + ']</a> '
} else {
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',\'' +
acct_id + '\')" id="' + id + '-image-' + key2 + '" data-url="' + url +
'" data-type="' + media.type + '" class="img-parsed"><img draggable="false" src="' +
'" data-type="' + media.type + '" class="img-parsed img-link" style="width:calc(' + cwdt + '% - 1px); height:' + imh + ';"><img draggable="false" src="' +
purl + '" class="' + sense +
' toot-img pointer" style="width:calc(' + cwdt + '% - 1px); height:'+imh+';"></a></span>';
' toot-img pointer">' + nsfwmes + '</a>';
}
}
});
media_ids = media_ids.slice(0, -1);
} else {
@@ -695,45 +790,15 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
for (var i = 0; i < tickerdata.length; i++) {
var value = tickerdata[i];
if (value.domain == thisdomain) {
var tickerdom='<div style="background:linear-gradient(to left,transparent, '+value.bg+' 96%) !important; color:'+value.text+';width:100%; height:0.9rem; font-size:0.8rem;"><img draggable="false" src="'+value.image+'" style="height:100%;"><span style="position:relative; top:-0.2rem;"> '+value.name+'</span></div>';
var tickerdom = '<div style="background:linear-gradient(to left,transparent, ' + value.bg + ' 96%) !important; color:' + value.text + ';width:100%; height:0.9rem; font-size:0.8rem;"><img draggable="false" src="' + value.image + '" style="height:100%;"><span style="position:relative; top:-0.2rem;"> ' + escapeHTML(value.name) + '</span></div>';
break;
}
}
}
}
//Poll
var poll="";
if(toot.poll){
var choices=toot.poll.options;
if(toot.poll.voted){
var myvote=lang.lang_parse_voted;
var result_hide="";
}else{
myvote='<a onclick="voteMastodon(\''+acct_id+'\',\''+toot.poll.id+'\')" class="votebtn">'+lang.lang_parse_vote+'</a><br>';
if(choices[0].votes_count===0 || choices[0].votes_count>0){
myvote=myvote+'<a onclick="showResult(\''+acct_id+'\',\''+toot.poll.id+'\')" class="pointer">'+lang.lang_parse_unvoted+"</a>";
}
var result_hide="hide";
}
if(toot.poll.expired){
var ended=lang.lang_parse_endedvote;
}else{
var ended=date(toot.poll.expires_at, datetype);
}
Object.keys(choices).forEach(function(keyc) {
var choice = choices[keyc];
if(!toot.poll.voted && !toot.poll.expired){
var votesel='voteSelMastodon(\''+acct_id+'\',\''+toot.poll.id+'\','+keyc+','+toot.poll.multiple+')';
var voteclass="pointer waves-effect waves-light";
}else{
var votesel="";
var voteclass="";
}
poll=poll+'<div class="'+voteclass+' vote vote_'+acct_id+'_'+toot.poll.id+'_'+keyc+'" onclick="'+votesel+'">'+choice.title+'<span class="vote_'+acct_id+'_'+toot.poll.id+'_result '+result_hide+'">('+choice.votes_count+')</span></div>';
});
poll='<div class="vote_'+acct_id+'_'+toot.poll.id+'">'+poll+myvote+'<span class="cbadge cbadge-hover" title="' + date(toot.poll.expires_at, 'absolute') +
'"><i class="fa fa-calendar-times-o"></i>' +
ended+ '</span></div>';
//Quote
if (toot.quote) {
poll = poll + '<div class="quote-renote"><div class="renote-icon"><img src="' + toot.quote.account.avatar + '"></div><div class="renote-user">' + escapeHTML(toot.quote.account.display_name) + '</div><div class="renote-text">' + toot.quote.content + '</div></div>'
}
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' +
boostback + ' ' + fav_app + ' ' + rt_app + ' ' + pin_app +
@@ -752,17 +817,17 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
toot.account.acct + locked + '</span></div>' +
'<div class="flex-time"><span class="cbadge cbadge-hover pointer waves-effect" onclick="tootUriCopy(\'' +
toot.url + '\');" title="' + date(toot.created_at, 'absolute') +
'('+lang.lang_parse_clickcopyurl+')"><i class="fa fa-clock-o"></i>' +
'(' + lang.lang_parse_clickcopyurl + ')"><i class="far fa-clock"></i>' +
date(toot.created_at, datetype) + '</span>' +
'</div></div>' +
'<div class="area-toot">' + tickerdom + '<span class="' +
api_spoil + ' cw_text_' + toot.id + '"><span class="cw_text">' + spoil + "</span>" + spoiler_show +
'</span><span class="toot ' + spoiler + '">' + content +
'</span>' +
'</span>' + poll +
'' + viewer + '' +
'</div><div class="area-additional"><span class="additional">' + analyze +
'</span>' +
'' +poll+ mentions + tags + '</div>' +
'' + mentions + tags + '</div>' +
'<div class="area-vis"></div>' +
'<div class="area-actions ' + mouseover + '">' +
'<div class="action">' + vis + '</div>' +
@@ -771,27 +836,27 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
'<div class="action ' + disp["re"] + ' ' + noauth + '"><a onclick="re(\'' + toot.id +
'\',\'' + to_mention + '\',' +
acct_id + ',\'' + visen +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_replyto+'"><i class="fa fa-share"></i><span class="rep_ct">' + replyct +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="' + lang.lang_parse_replyto + '"><i class="fas fa-share"></i><span class="rep_ct">' + replyct +
'</a></span></a></div>' +
'<div class="action ' + can_rt + ' ' + disp["rt"] + ' ' + noauth + '"><a onclick="rt(\'' + toot.id + '\',' + acct_id +
',\'' + tlid +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_bt+'"><i class="fa fa-retweet ' +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="' + lang.lang_parse_bt + '"><i class="fas fa-retweet ' +
if_rt + ' rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
'</span></a></div>' +
'<div class="action ' + can_rt + ' ' + disp["qt"] + ' ' + noauth + ' ' + qtClass + '"><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+'"><i class="text-darken-3 fa fa-quote-right"></i></a></div>' +
'\')" 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></a></div>' +
'<div class="action ' + disp["fav"] + ' ' + noauth + '"><a onclick="fav(\'' + toot.id + '\',' + acct_id +
',\'' + tlid +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_fav+'"><i class="fa text-darken-3 fa-star' +
'\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="' + lang.lang_parse_fav + '"><i class="fas text-darken-3 fa-star' +
if_fav + ' fav_' + toot.id + '"></i><span class="fav_ct">' + toot.favourites_count +
'</a></span></div>' +
'<div class="' + if_mine + ' action ' + disp["del"] + ' ' + noauth + '"><a onclick="del(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_del+'"><i class="fa fa-trash-o"></i></a></div>' +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_parse_del + '"><i class="fas fa-trash"></i></a></div>' +
'<div class="' + if_mine + ' action pin ' + disp["pin"] + ' ' + noauth + '"><a onclick="pin(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_pin+'"><i class="fa fa-map-pin pin_' + toot.id + ' '+if_pin+'"></i></a></div>'
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_parse_pin + '"><i class="fas fa-map-pin pin_' + toot.id + ' ' + if_pin + '"></i></a></div>'
+ '<div class="' + if_mine + ' action ' + disp["red"] + ' ' + noauth + '"><a onclick="redraft(\'' + toot.id + '\',' +
acct_id +
')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_parse_redraft + '"><i class="material-icons">redo</i></a></div>' + trans +
@@ -822,6 +887,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
var datetype = localStorage.getItem("datetype");
Object.keys(obj).forEach(function (key) {
var toot = obj[key];
console.log(["Parsing", toot])
if (!toot.username) {
var raw = toot;
toot = toot.account;
@@ -830,15 +896,16 @@ function userparse(obj, auth, acct_id, tlid, popup) {
var notf = false;
}
if (toot.locked) {
var locked = ' <i class="fa fa-lock red-text"></i>';
var locked = ' <i class="fas fa-lock red-text"></i>';
} else {
var locked = "";
}
if (auth) {
var auth = '<i class="material-icons gray pointer" onclick="request(\'' +
toot.id + '\',\'authorize\',' + acct_id + ')">person_add</i>';
if (auth == "request") {
var authhtml = '<i class="material-icons gray pointer" onclick="request(\'' +
toot.id + '\',\'authorize\',' + acct_id + ')" title="Accept">person_add</i> <i class="material-icons gray pointer" onclick="request(\'' +
toot.id + '\',\'reject\',' + acct_id + ')" title="Reject">person_add_disabled</i>';
} else {
var auth = "";
var authhtml = "";
}
var ftxt = lang.lang_parse_followed;
if (!locale && localStorage.getItem("followlocale_" + acct_id)) {
@@ -924,13 +991,13 @@ function userparse(obj, auth, acct_id, tlid, popup) {
'<div class="area-display_name"><div class="flex-name"><span class="user">' +
dis_name + '</span>' +
'<span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;user-select:auto; cursor:text;"> @' +
toot.acct + locked + auth +'</span>' +
toot.acct + locked + '</span>' +
'</div>' +
'</div>' +
'<div style="justify-content:space-around" class="area-toot"> <div class="cbadge" style="width:100px;">Follows:' +
toot.following_count +
'</div><div class="cbadge" style="width:100px;">Followers:' + toot.followers_count +
'</div>' +
'</div>' + authhtml +
'</div>' +
'</div>' +
'</div>';
@@ -942,7 +1009,6 @@ function userparse(obj, auth, acct_id, tlid, popup) {
function client(name) {
if (name != "Unknown") {
//聞く
localStorage.removeItem("client_mute");
var electron = require("electron");
var remote = electron.remote;
var dialog = remote.dialog;
@@ -959,7 +1025,7 @@ function client(name) {
if (!obj) {
var obj = [];
obj.push(name);
Materialize.toast(name+lang.lang_status_emphas, 2000);
Materialize.toast(escapeHTML(name) + lang.lang_status_emphas, 2000);
} else {
var can;
Object.keys(obj).forEach(function (key) {
@@ -969,12 +1035,12 @@ function client(name) {
} else {
can = true;
obj.splice(key, 1);
Materialize.toast(name+lang.lang_status_unemphas, 2000);
Materialize.toast(escapeHTML(name) + lang.lang_status_unemphas, 2000);
}
});
if (!can) {
obj.push(name);
Materialize.toast(name+lang.lang_status_emphas, 2000);
Materialize.toast(escapeHTML(name) + lang.lang_status_emphas, 2000);
} else {
}
@@ -985,12 +1051,12 @@ function client(name) {
var cli = localStorage.getItem("client_mute");
var obj = JSON.parse(cli);
if (!obj) {
var obj=[];
obj = [];
}
obj.push(name);
var json = JSON.stringify(obj);
localStorage.setItem("client_mute", json);
Materialize.toast(name+lang.lang_parse_mute, 2000);
Materialize.toast(escapeHTML(name) + lang.lang_parse_mute, 2000);
} else {
return;
}

View File

@@ -25,13 +25,12 @@ function pollCalc(){
var days = $("#days_poll").val();
var hrs = $("#hours_poll").val();
var mins = $("#mins_poll").val();
console.log(days*86400+hrs*3600+mins*60)
console.log("Poll calc:" + days * 86400 + hrs * 3600 + mins * 60)
return days * 86400 + hrs * 3600 + mins * 60;
}
//Vote
function voteSelMastodon(acct_id, id, to, mul) {
console.log('.vote_'+acct_id+'_'+id+'_'+to);
if ($('.vote_' + acct_id + '_' + id + '_' + to).hasClass("sel")) {
$('.vote_' + acct_id + '_' + id + '_' + to).css("background-color", "transparent")
$('.vote_' + acct_id + '_' + id + '_' + to).removeClass("sel");
@@ -95,7 +94,7 @@ function voteMastodonrefresh(acct_id,id){
httpreqd.onreadystatechange = function () {
if (httpreqd.readyState == 4) {
var json = httpreqd.response;
console.log(json);
console.log(["Refresh vote", json]);
if (!json) {
return false;
}
@@ -108,10 +107,10 @@ function voteMastodonrefresh(acct_id,id){
if (!json.voted) {
votesel = 'voteSelMastodon(\'' + acct_id + '\',\'' + json.id + '\',' + keyc + ',' + json.multiple + ')';
}
poll=poll+'<div class="pointer vote vote_'+acct_id+'_'+json.id+'_'+keyc+'" onclick="'+votesel+'">'+choice.title+'<span class="vote_'+acct_id+'_'+json.id+'_result '+result_hide+'">('+choice.votes_count+')</span></div>';
poll = poll + '<div class="pointer vote vote_' + acct_id + '_' + json.id + '_' + keyc + '" onclick="' + votesel + '">' + escapeHTML(choice.title) + '<span class="vote_' + acct_id + '_' + json.id + '_result ' + result_hide + '">(' + choice.votes_count + ')</span></div>';
});
poll = poll + myvote + '<span class="cbadge cbadge-hover" title="' + date(json.expires_at, 'absolute') +
'"><i class="fa fa-calendar-times-o"></i>' +
'"><i class="far fa-calendar-times"></i>' +
date(json.expires_at, datetype) + '</span>';
$('.vote_' + acct_id + '_' + json.id).html(poll)
}

View File

@@ -33,7 +33,6 @@ $repeat = setInterval(function() {
var obj = JSON.parse(voice);
if (obj[0]) {
$synthes.text = obj[0];
console.log($synthes);
speechSynthesis.speak($synthes);
obj.splice(0, 1);
var json = JSON.stringify(obj);

View File

@@ -15,7 +15,7 @@ function src(mode) {
var q = $("#src").val();
var acct_id = $("#src-acct-sel").val();
if (acct_id == "tootsearch") {
tootsearch(q);
tsAdd(q)
return false;
}
localStorage.setItem("last-use", acct_id);
@@ -31,7 +31,7 @@ function src(mode) {
} else {
var start = "https://" + domain + "/api/v1/search?q=" + q
}
console.log(start)
console.log("Try to search at " + start)
fetch(start, {
method: 'GET',
headers: {
@@ -44,7 +44,7 @@ function src(mode) {
src("v1")
return false;
}).then(function (json) {
console.log(json);
console.log(["Search", json]);
//ハッシュタグ
if (json.hashtags[0]) {
var tags = "";
@@ -52,7 +52,7 @@ function src(mode) {
var tag = json.hashtags[key4];
if (mode) {
tags = tags + '<a onclick="tl(\'tag\',\'' + tag + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + tag + '</a><br> ';
'\',\'add\')" class="pointer">#' + escapeHTML(tag) + '</a><br> ';
} else {
tags = tags + graphDraw(tag);
}
@@ -73,9 +73,25 @@ function src(mode) {
jQuery("time.timeago").timeago();
});
}
function tootsearch(q){
function tsAdd(q) {
var add = {
domain: acct_id,
type: "tootsearch",
data: q
};
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();
}
function tootsearch(tlid, q) {
var start = "https://tootsearch.chotto.moe/api/v1/search?from=0&sort=created_at%3Adesc&q=" + q
console.log(start)
console.log("Toot srrach at " + start)
$("#notice_" + tlid).text("tootsearch(" + q + ")");
$("#notice_icon_" + tlid).text("search");
fetch(start, {
method: 'GET',
headers: {
@@ -89,25 +105,68 @@ function tootsearch(q){
}).then(function (raw) {
var templete = "";
var json = raw.hits.hits;
console.log(json);
Object.keys(json).forEach(function(key5) {
var toot = json[key5]["_source"];
console.log(toot);
var max_id = raw["hits"].length;
for (var i = 0; i < json.length; i++) {
var toot = json[i]["_source"];
if (lastid != toot.uri) {
if (toot && toot.account) {
templete = templete+parse([toot],'noauth');
templete = templete + parse([toot], "noauth", null, tlid, 0, [], "tootsearch")
}
}
var lastid = toot.uri;
}
});
if (!templete) {
templete = lang.lang_details_nodata;
} else {
templete = templete + '<div class="hide ts-marker" data-maxid="' + max_id + '"></div>';
}
$("#src-contents").html("Tootsearch("+lang.lang_src_ts+")<br>" + templete);
$("#timeline_" + tlid).html(templete);
jQuery("time.timeago").timeago();
});
}
function moreTs(tlid, q) {
var sid = $("#timeline_" + tlid + " .ts-marker").last().attr("data-maxid");
moreloading = true;
var start = "https://tootsearch.chotto.moe/api/v1/search?from=" + sid + "&sort=created_at%3Adesc&q=" + q
$("#notice_" + tlid).text("tootsearch(" + q + ")");
$("#notice_icon_" + tlid).text("search");
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json'
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (raw) {
var templete = "";
var json = raw.hits.hits;
var max_id = raw["hits"].length;
for (var i = 0; i < json.length; i++) {
var toot = json[i]["_source"];
if (lastid != toot.uri) {
if (toot && toot.account) {
templete = templete + parse([toot], "noauth", null, tlid, 0, [], "tootsearch")
}
}
var lastid = toot.uri;
}
if (!templete) {
templete = lang.lang_details_nodata;
} else {
templete = templete + '<div class="hide ts-marker" data-maxid="' + max_id + '"></div>';
}
$("#timeline_" + tlid).append(templete);
jQuery("time.timeago").timeago();
});
}
function graphDraw(tag) {
var tags = "";
var his = tag.history;
console.log(his);
var max = Math.max.apply(null, [his[0].uses, his[1].uses, his[2].uses, his[3].uses, his[4].uses, his[5].uses, his[6].uses]);
var six = 50 - (his[6].uses / max * 50);
var five = 50 - (his[5].uses / max * 50);
@@ -118,13 +177,13 @@ function graphDraw(tag){
var zero = 50 - (his[0].uses / max * 50);
if (max === 0) {
tags = '<br><br><svg version="1.1" viewbox="0 0 60 50" width="60" height="50">' +
'</svg><span style="font-size:200%">'+his[0].uses+'</span>toots&nbsp;<a onclick="tl(\'tag\',\'' + tag.name + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + tag.name + '</a>&nbsp;'+his[0].accounts+lang.lang_src_people;
'</svg><span style="font-size:200%">' + his[0].uses + '</span>toots&nbsp;<a onclick="tl(\'tag\',\'' + escapeHTML(tag.name) + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + escapeHTML(tag.name) + '</a>&nbsp;' + his[0].accounts + lang.lang_src_people;
} else {
tags = '<br><br><svg version="1.1" viewbox="0 0 60 50" width="60" height="50">' +
'<g><path d="M0,' + six + ' L10,' + five + ' 20,' + four + ' 30,' + three + ' 40,' + two + ' 50,' + one + ' 60,' + zero + '" style="stroke: #9e9e9e; stroke-width: 1;fill: none;"></path></g>' +
'</svg><span style="font-size:200%">'+his[0].uses+'</span>toots&nbsp;<a onclick="tl(\'tag\',\'' + tag.name + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + tag.name + '</a>&nbsp;'+his[0].accounts+lang.lang_src_people;
'</svg><span style="font-size:200%">' + his[0].uses + '</span>toots&nbsp;<a onclick="tl(\'tag\',\'' + escapeHTML(tag.name) + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + escapeHTML(tag.name) + '</a>&nbsp;' + his[0].accounts + lang.lang_src_people;
}
return tags;

View File

@@ -58,13 +58,14 @@ function favTag(){
Object.keys(obj).forEach(function (key) {
var tag = obj[key];
if (nowPT != tag) {
console.log(nowPT+"/"+tag);
console.log("stable tags:" + nowPT + "/" + tag);
var ptt = lang.lang_tags_realtime;
var nowon = "";
} else {
var ptt = lang.lang_tags_unrealtime;
var nowon = "(" + lang.lang_tags_realtime + ")";
}
tag = escapeHTML(tag);
tags = tags + '<a onclick="tagShow(\'' + tag + '\')" class="pointer">#' + tag + '</a>' + nowon + '<span class="hide" data-tag="' + tag + '"> <a onclick="tagTL(\'tag\',\'' + tag + '\',false,\'add\')" class="pointer" title="' + lang.lang_parse_tagTL.replace("{{tag}}", '#' + tag) + '">TL</a> <a onclick="brInsert(\'#' + tag + '\')" class="pointer" title="' + lang.lang_parse_tagtoot.replace("{{tag}}", '#' + tag) + '">Toot</a> ' +
'<a onclick="autoToot(\'' + tag + '\');" class="pointer" title="' + lang.lang_tags_always + lang.lang_parse_tagtoot.replace("{{tag}}", '#' + tag) + '">' + ptt + '</a> <a onclick="tagRemove(\'' + key + '\')" class="pointer" title="' + lang.lang_tags_tagunpin.replace("{{tag}}", '#' + tag) + '">' + lang.lang_del + '</a></span> ';
});
@@ -79,7 +80,6 @@ function trendTag(){
var domain = "imastodon.net"
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain + "/api/v1/trend_tags"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -96,6 +96,7 @@ function trendTag(){
var tags = "";
json = json.score;
Object.keys(json).forEach(function (tag) {
tag = escapeHTML(tag);
tags = tags + '<a onclick="tagShow(\'' + tag + '\')" class="pointer">#' + tag + '</a><span class="hide" data-tag="' + tag + '"> <a onclick="tagTL(\'tag\',\'' + tag + '\',false,\'add\')" class="pointer" title="#' + tag + 'のタイムライン">TL</a> <a onclick="show();brInsert(\'#' + tag + '\')" class="pointer" title="#' + tag + 'でトゥート">Toot</a></span> ';
});
$("#taglist").append('<div class="trendtag">アイマストドントレンドタグ<i class="material-icons pointer" onclick="trendTag()" style="font-size:12px">refresh</i>:' + tags + '</div>');
@@ -115,6 +116,7 @@ function tagTL(a,b,c,d){
tl(a, b, acct_id, d);
}
function autoToot(tag) {
tag = escapeHTML(tag)
var nowPT = localStorage.getItem("stable")
if (nowPT == tag) {
localStorage.removeItem("stable");

View File

@@ -7,7 +7,7 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
var domain = localStorage.getItem("domain_" + acct_id);
//タグとかの場合はカラム追加して描画
if (tlid == "add") {
console.log("add");
console.log("add new column");
var newtab = $(".box").length;
var add = {
domain: acct_id,
@@ -18,7 +18,6 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
var obj = JSON.parse(multi);
localStorage.setItem("card_" + obj.length, "true");
obj.push(add);
console.log(obj);
var json = JSON.stringify(obj);
localStorage.setItem("column", json);
parseColumn();
@@ -125,14 +124,14 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
};
}
console.log(start);
console.log(["Try to get timeline of " + tlid, start])
fetch(start, i).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json)
console.log(["Result of getting timeline of " + tlid, json])
$("#landing_" + tlid).hide();
if (localStorage.getItem("filter_" + acct_id) != "undefined") {
var mute = getFilterType(JSON.parse(localStorage.getItem("filter_" + acct_id)), type);
@@ -164,32 +163,14 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
localStorage.setItem("now", type);
if (localStorage.getItem("mode_" + domain) == "misskey") {
var misskey = true;
if (type == "home") {
var start = "wss://" + domain +
"/?i=" + at;
} else if (type == "pub") {
var start = "wss://" + domain +
"/global-timeline?i=" + at;
} else if (type == "pub-media") {
var start = "wss://" + domain +
"/global-timeline?i=" + at;
} else if (type == "local") {
var start = "wss://" + domain +
"/local-timeline?i=" + at;
} else if (type == "local-media") {
var start = "wss://" + domain +
"/local-timeline?i=" + at;
} else if (type == "mix") {
var start = "wss://" + domain +
"/hybrid-timeline?i=" + at;
} else if (type == "tag") {
Materialize.toast(lang_misskeyparse_tagnostr[lang], 1000);
} else if (type == "noauth") {
var start = "wss://" + acct_id +
"/local-timeline?i=" + at;
} else if (type=="list"){
Materialize.toast(lang_misskeyparse_listnostr[lang], 1000);
var key = localStorage.getItem("misskey_wss_" + acct_id)
var send = '{"type":"connect","body":{"channel":"' + typePs(type) + '","id":"' + tlid + '"}}'
var mskyset = setInterval(function () {
if (misskeywsstate[key]) {
misskeyws[key].send(send)
clearInterval(mskyset)
}
}, 100);
} else {
var misskey = false;
if (localStorage.getItem("streaming_" + acct_id)) {
@@ -231,20 +212,15 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
var start = wss +
"/api/v1/streaming/?stream=direct&access_token=" + at;
}
}
console.log(start);
var wsid = websocket.length;
localStorage.setItem("wss_" + tlid, wsid);
websocket[wsid] = new WebSocket(start);
websocket[wsid].onopen = function (mess) {
console.log(tlid + ":Connect Streaming API:" + type);
console.log(mess);
console.table({ "tlid": tlid, "type": "Connect Streaming API" + type, "domain": domain, "message": [mess] })
$("#notice_icon_" + tlid).removeClass("red-text");
}
websocket[wsid].onmessage = function (mess) {
console.log(tlid + ":Receive Streaming API:");
console.log(JSON.parse(mess.data));
console.log([tlid + ":Receive Streaming API:", JSON.parse(mess.data)]);
if (misskey) {
if (JSON.parse(mess.data).type == "note") {
var obj = JSON.parse(mess.data).body;
@@ -287,7 +263,6 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
} else if (typeA == "update" || typeA == "conversation") {
localStorage.removeItem("delete");
var obj = JSON.parse(JSON.parse(mess.data).payload);
console.log(obj);
if ($("#timeline_" + tlid + " [toot-id=" + obj.id + "]").length < 1) {
if (voice) {
say(obj.content)
@@ -335,8 +310,7 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
return false;
};
websocket[wsid].onclose = function () {
console.error("Closing");
console.error(tlid);
console.warn("Closing " + tlid);
if (mode == "error") {
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed');
@@ -349,7 +323,7 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
}
return false;
};
}
}
//一定のスクロールで発火
@@ -382,6 +356,10 @@ function moreload(type, tlid) {
} else if (type == "notf") {
notfmore(tlid);
return;
} else if (type == "tootsearch") {
var data = obj[tlid].data;
moreTs(tlid, data);
return;
}
moreloading = true;
localStorage.setItem("now", type);
@@ -441,15 +419,12 @@ function moreload(type, tlid) {
headers: hdr
};
}
fetch(start, i).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (misskey) {
var templete = misskeyParse(json, '', acct_id, tlid, "", mute);
} else {
@@ -463,18 +438,131 @@ function moreload(type, tlid) {
});
}
}
//TL差分取得
function tlDiff(type, data, acct_id, tlid, delc, voice, mode) {
console.log("Get diff of TL" + tlid)
var multi = localStorage.getItem("column");
var obj = JSON.parse(multi);
var acct_id = obj[tlid].domain;
if (!type) {
var type = obj[tlid].type;
} else {
var data;
}
if (type == "tag") {
var data = obj[tlid].data;
var tag = localStorage.getItem("tag-range");
if (tag == "local") {
data = data + "&local=true";
}
} else if (type == "list") {
var data = obj[tlid].data;
}
var sid = $("#timeline_" + tlid + " .cvo").first().attr("unique-id");
if (sid && !moreloading) {
if (type == "mix" && localStorage.getItem("mode_" + localStorage.getItem("domain_" + acct_id)) != "misskey") {
return;
} else if (type == "plus" && localStorage.getItem("mode_" + localStorage.getItem("domain_" + acct_id)) != "misskey") {
return;
} else if (type == "notf") {
return;
}
moreloading = true;
localStorage.setItem("now", type);
todo(cap(type) + " TL MoreLoading");
if (type != "noauth") {
var at = localStorage.getItem("acct_" + acct_id + "_at");
var hdr = {
'content-type': 'application/json',
'Authorization': 'Bearer ' + at
};
var domain = localStorage.getItem("domain_" + acct_id);
} else {
var hdr = {
'content-type': 'application/json'
};
domain = acct_id;
}
if (localStorage.getItem("mode_" + domain) == "misskey") {
var misskey = true;
hdr = {
'content-type': 'application/json'
};
var url = misskeycom(type, data);
var start = "https://" + domain + "/api/notes/" + url;
var method = "POST";
var req = {};
if (type != "noauth") {
req.i = at;
}
if (type == "local-media" || type == "pub-media") {
req.mediaOnly = true;
}
if (type == "tag") {
req.tag = data;
}
if (type == "list") {
req.listId = data;
}
req.sinceId = sid;
req.limit = 20;
var i = {
method: method,
headers: hdr,
body: JSON.stringify(req),
}
} else {
var misskey = false;
var start = "https://" + domain + "/api/v1/timelines/" + com(type, data) +
"since_id=" + sid;
if (type == "dm") {
var start = "https://" + domain + "/api/v1/conversations?" +
"since_id=" + sid;
}
var method = "GET";
var i = {
method: method,
headers: hdr
};
}
fetch(start, i).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(["Result diff of TL" + tlid, json]);
if (misskey) {
var templete = misskeyParse(json, '', acct_id, tlid, "", mute);
} else {
var templete = parse(json, '', acct_id, tlid, "", mute, type);
}
$("#timeline_" + tlid).prepend(templete);
additional(acct_id, tlid);
jQuery("time.timeago").timeago();
moreloading = false;
todc();
});
}
}
//TL再取得
function reloadTL(type, data, acct_id, key, delc, voice) {
tl(type, data, acct_id, key, delc, voice, "");
}
//WebSocket切断
function tlCloser() {
Object.keys(websocket).forEach(function (tlid) {
if (websocketOld[tlid]) {
websocketOld[tlid].close();
console.log("Close Streaming API: Old" + tlid);
console.log("%c Close Streaming API: Old" + tlid, "color:blue");
}
if (websocket[0]) {
console.log(websocket[0]);
websocket[tlid].close();
console.log("Close Streaming API:" + tlid);
console.log("%c Close Streaming API:" + tlid, "color:blue");
}
});
@@ -482,7 +570,7 @@ function tlCloser() {
Object.keys(websocketHome).forEach(function (tlid) {
if (websocketHome[tlid]) {
websocketHome[tlid].close();
console.log("Close Streaming API:MixHome" + tlid);
console.log("%c Close Streaming API:Integrated Home" + tlid, "color:blue");
}
});
@@ -490,7 +578,7 @@ function tlCloser() {
Object.keys(websocketLocal).forEach(function (tlid) {
if (websocketLocal[tlid]) {
websocketLocal[tlid].close();
console.log("Close Streaming API:MixLocal" + tlid);
console.log("%c Close Streaming API:Integrated Local" + tlid, "color:blue");
}
});
@@ -498,11 +586,17 @@ function tlCloser() {
Object.keys(websocketNotf).forEach(function (tlid) {
if (websocketNotf[tlid]) {
websocketNotf[tlid].close();
console.log("Close Streaming API:Notf" + tlid);
console.log("%c Close Streaming API:Notf" + tlid, "color:blue");
}
});
websocketNotf = [];
Object.keys(misskeyws).forEach(function (tlid) {
if (misskeyws[tlid]) {
misskeyws[tlid].close();
console.log("%c Close Streaming API:Misskey" + tlid, "color:blue");
}
});
misskeyws = {}
}
//TLのタイトル
@@ -543,7 +637,7 @@ function cap(type, data, acct_id) {
var response = "Federated TL(Media)";
}
} else if (type == "tag") {
var response= "#" + data
var response = "#" + escapeHTML(data)
} else if (type == "list") {
var ltitle = localStorage.getItem("list_" + data + "_" + acct_id);
var response = "List(" + ltitle + ")"
@@ -567,6 +661,8 @@ function cap(type, data, acct_id) {
var response = "Local+"
} else if (type == "webview") {
var response = "Twitter"
} else if (type == "tootsearch") {
var response = "tootsearch(" + escapeHTML(data) + ")";
}
return response;
}
@@ -591,6 +687,24 @@ function com(type, data) {
return "direct?"
}
}
//Misskey
function typePs(type) {
if (type == "home") {
return "homeTimeline"
} else if (type == "local" || type == "noauth") {
return "localTimeline"
} else if (type == "local-media") {
return "localTimeline"
} else if (type == "pub") {
return "globalTimeline"
} else if (type == "mix") {
return "hybridTimeline"
} else if (type == "tag") {
return "hashtag"
} else if (type == "list") {
return "userList"
}
}
function misskeycom(type, data) {
if (type == "home") {
return "timeline"
@@ -624,7 +738,7 @@ function icon(type) {
} else if (type == "pub-media") {
var response = "language";
} else if (type == "tag") {
var response="search";
var response = "whatshot";
} else if (type == "list") {
var response = "view_headline";
} else if (type == "notf") {
@@ -639,6 +753,8 @@ function icon(type) {
var response = "merge_type";
} else if (type == "webview") {
var response = "language";
} else if (type == "tootsearch") {
var response = "search";
}
return response;
}
@@ -666,8 +782,8 @@ function strAliveInt(){
setTimeout(strAlive, 10000);
}
function reconnector(tlid, type, acct_id, data, mode) {
console.log("Reconnector:"+mode)
if(type=="mix" || type=="plus"){
console.log("%c Reconnector:" + mode + "(timeline" + tlid + ")", "color:pink")
if (type == "mix" || type == "integrated" || type == "plus") {
if (localStorage.getItem("voice_" + tlid)) {
var voice = true;
} else {
@@ -680,10 +796,11 @@ function reconnector(tlid,type,acct_id,data,mode){
}
var wssh = localStorage.getItem("wssH_" + tlid);
websocketHome[wssh].close();
var wssh=localStorage.getItem("wssL_" + tlid);
var wssl = localStorage.getItem("wssL_" + tlid);
websocketLocal[wssl].close();
mixre(acct_id, tlid, type, mute, "", voice, mode);
} else if (type == "notf") {
notfColumn(acct_id, tlid, "")
} else {
var wss = localStorage.getItem("wss_" + tlid);
websocket[wss].close();

View File

@@ -59,7 +59,6 @@ function imgv(id, key, acct_id) {
$("#imagemodal").css("width", width + "px")
}
} else {
console.log("long")
$("#imagemodal img").css("width", "auto")
var widthS = windowH / height * width;
if (widthS < windowW) {
@@ -149,7 +148,6 @@ function imgCont(type) {
$("#imagemodal").css("width", width + "px")
}
} else {
console.log("long")
$("#imagemodal img").css("width", "auto")
var widthS = windowH / height * width;
if (widthS < windowW) {
@@ -167,7 +165,6 @@ function imgCont(type) {
} else {
$("#image-next").prop("disabled", false);
}
console.log("#" + id + "-image-" + (key * 1 - 1));
if ($("#" + id + "-image-" + (key * 1 - 1)).length === 0) {
$("#image-prev").prop("disabled", true);
} else {
@@ -231,7 +228,6 @@ function zoom(z) {
$(this).on('touchmove', function (event) {
if ($(target).data('down') === true) {
// スクロール
console.log($(target).data('x'));
target.scrollLeft($(target).data('scrollLeft') + $(target).data('x') -
getX(event));
target.scrollTop($(target).data('scrollTop') + $(target).data('y') -
@@ -284,7 +280,7 @@ function dlImg(){
}
ipc.send('general-dl', [url, save, false]);
ipc.on('general-dl-prog', function (event, arg) {
console.log(arg);
console.log("Progress: " + arg);
})
ipc.on('general-dl-message', function (event, arg) {
var argC = arg.replace(/\\/g, "\\\\") + "\\\\.";

View File

@@ -20,21 +20,23 @@ $('.type').click(function() {
$("#type-sel").val($(this).attr("data-type"))
})
//最初、カラム変更時に発火
function parseColumn() {
console.log("parse");
function parseColumn(dontclose) {
console.log("%c Parse column", "color:red;font-size:125%");
var size = localStorage.getItem("size");
if (size) {
$("#timeline-container").css("font-size", size + "px");
$(".toot-reset").css("font-size", size + "px");
$(".cont-series").css("font-size", size + "px");
}
if (localStorage.getItem("menu-done")) {
$("#fukidashi").addClass("hide")
}
if (!dontclose) {
tlCloser();
}
var multi = localStorage.getItem("multi");
if (!multi) {
var obj = [];
var json = JSON.stringify(obj);
localStorage.setItem("multi", json);
} else {
if (multi) {
var obj = JSON.parse(multi);
var templete;
@@ -50,10 +52,15 @@ function parseColumn() {
ckdb(key);
//フィルターデータ読もう
getFilter(key);
var domain = localStorage.getItem("domain_" + key);
if (localStorage.getItem("mode_" + domain) == "misskey") {
localStorage.removeItem("misskey_wss_" + key)
connectMisskey(key)
}
});
}
var acctlist = obj;
console.log(obj);
console.table(obj);
/*var xed=localStorage.getItem("xed");
if(xed){
xpand();
@@ -130,6 +137,21 @@ function parseColumn() {
}
var html = webviewParse("https://tweetdeck.twitter.com", key, insert, icnsert, css);
$("#timeline-container").append(html);
} else if (acct.type == "tootsearch") {
if (!acct.left_fold) {
basekey = key;
}
var width = localStorage.getItem("width");
if (width) {
var css = " min-width:" + width + "px;"
}
var anime = localStorage.getItem("animation");
if (anime == "yes" || !anime) {
var animecss = "box-anime";
} else {
var animecss = "";
}
unstreamingTL(acct.type, key, basekey, insert, icnsert, acct.left_fold, css, animecss, acct.data);
} else {
var width = localStorage.getItem("width");
if (width) {
@@ -142,15 +164,19 @@ function parseColumn() {
var animecss = "";
}
if (acct.type == "notf") {
var exclude=lang.lang_excluded+':<br><input type="checkbox" class="filled-in" id="exc-reply-'+key+'" '+excludeCk(key,"mention")+' /><label for="exc-reply-'+key+'" class="exc-chb"><i class="fa fa-share exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-fav-'+key+'" '+excludeCk(key,"favourite")+' /><label for="exc-fav-'+key+'" class="exc-chb"><i class="fa fa-star exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-bt-'+key+'" '+excludeCk(key,"reblog")+' /><label for="exc-bt-'+key+'" class="exc-chb" ><i class="fa fa-retweet exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-follow-'+key+'" '+excludeCk(key,"follow")+' /><label for="exc-follow-'+key+'" class="exc-chb" ><i class="fa fa-users exc-icons"></i></label> '+
'<input type="checkbox" class="filled-in" id="exc-follow-'+key+'" '+excludeCk(key,"poll")+' /><label for="exc-poll-'+key+'" class="exc-chb" ><i class="fa fa-tasks exc-icons"></i></label> '+
'<button class="btn waves-effect" style="width:60px; padding:0;" onclick="exclude('+key+')">Filter</button><br>';
var exclude = lang.lang_excluded + ':<br><input type="checkbox" class="filled-in" id="exc-reply-' + key + '" ' + excludeCk(key, "mention") + ' /><label for="exc-reply-' + key + '" class="exc-chb"><i class="fas fa-share exc-icons"></i></label> ' +
'<input type="checkbox" class="filled-in" id="exc-fav-' + key + '" ' + excludeCk(key, "favourite") + ' /><label for="exc-fav-' + key + '" class="exc-chb"><i class="fas fa-star exc-icons"></i></label> ' +
'<input type="checkbox" class="filled-in" id="exc-bt-' + key + '" ' + excludeCk(key, "reblog") + ' /><label for="exc-bt-' + key + '" class="exc-chb" ><i class="fas fa-retweet exc-icons"></i></label> ' +
'<input type="checkbox" class="filled-in" id="exc-follow-' + key + '" ' + excludeCk(key, "follow") + ' /><label for="exc-follow-' + key + '" class="exc-chb" ><i class="fas fa-users exc-icons"></i></label> ' +
'<input type="checkbox" class="filled-in" id="exc-poll-' + key + '" ' + excludeCk(key, "poll") + ' /><label for="exc-poll-' + key + '" class="exc-chb" ><i class="fas fa-tasks exc-icons"></i></label> ' +
'<button class="btn waves-effect" style="width:60px; padding:0;" onclick="exclude(' + key + ')">Filter</button>';
if(checkNotfFilter(key)){
exclude=exclude+'<button class="btn red waves-effect" style="width:60px; padding:0;" onclick="resetNotfFilter(' + key + ')">Clear all</button>'
}
exclude=exclude+"<br>";
} else if (acct.type == "home") {
var exclude = '<a onclick="ebtToggle(' + key +
')" class="setting nex"><i class="fa fa-retweet waves-effect nex" title="'+lang.lang_layout_excludingbt +'" style="font-size:24px"></i><span id="sta-bt-' +
')" class="setting nex"><i class="fas fa-retweet waves-effect nex" title="' + lang.lang_layout_excludingbt + '" style="font-size:24px"></i><span id="sta-bt-' +
key + '">Off</span></a>' + lang.lang_layout_excludingbt + '<br>';
} else {
var exclude = "";
@@ -166,9 +192,17 @@ function parseColumn() {
if (key === 0) {
left_hold = '';
}
if (localStorage.getItem("mode_" + localStorage.getItem("domain_" + acct.domain)) == "misskey") {
var isMisRed = ""
exclude = ""
var if_misskey_hide = "hide"
} else {
var isMisRed = "red-text"
var if_misskey_hide = ""
}
var html = '<div class="boxIn" id="timeline_box_' + key + '_box" tlid="' + key +
'" data-acct="' + acct.domain + '"><div class="notice-box z-depth-2" id="menu_' + key + '" style="' + insert + ' ">' +
'<div class="area-notice"><i class="material-icons waves-effect red-text" id="notice_icon_' + key + '"'+notf_attr+' style="font-size:40px; padding-top:25%;" onclick="goTop(' + key + ')" title="'+lang.lang_layout_gotop +'"></i></div>'+
'<div class="area-notice"><i class="material-icons waves-effect ' + isMisRed + '" id="notice_icon_' + key + '"' + notf_attr + ' style="font-size:40px; padding-top:25%;" onclick="checkStr(\'' + acct.type + '\', \'' + data + '\', \'' + acct.domain + '\', \'' + key + '\', \'' + delc + '\',\'' + voice + '\',null)" title="' + lang.lang_layout_gotop + '"></i></div>' +
'<div class="area-notice_name"><span id="notice_' + key + '" class="tl-title"></span></div>' +
'<div class="area-a1"><a onclick="notfToggle(' + acct.domain + ',' + key +
')" class="setting nex ' + if_notf + '" title="' + unique_notf + '"' + icnsert + '><i class="material-icons waves-effect nex notf-icon_' +
@@ -179,7 +213,7 @@ function parseColumn() {
')" class="setting nex" title="' + lang.lang_layout_setthis + '"' + icnsert + '><i class="material-icons waves-effect nex">settings</i></a></div></div>' +
'<div class="column-hide notf-indv-box z-depth-4" id="notf-box_' + key +
'"><div id="notifications_' + key +
'" data-notf="' + acct.domain + '" data-type="notf"></div></div><div class="column-hide notf-indv-box" id="util-box_' + key +
'" data-notf="' + acct.domain + '" data-type="notf" class="notf-timeline"></div></div><div class="column-hide notf-indv-box" id="util-box_' + key +
'" style="padding:5px;">' + exclude + left_hold + '<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 +
@@ -187,8 +221,8 @@ function parseColumn() {
key + '">On</span></a>' + lang.lang_layout_linkana + '<br><a onclick="voiceToggle(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="' + lang.lang_layout_tts + '">hearing</i><span id="sta-voice-' +
key + '">On</span></a>' + lang.lang_layout_tts + 'TL<br><a onclick="reconnector(' + key +
',\''+acct.type+'\',\''+acct.domain+'\',\''+acct.data+'\')" class="setting nex '+if_notf+'"><i class="material-icons waves-effect nex '+if_notf+'" title="'+lang.lang_layout_reconnect+'">low_priority</i></a><span class="'+if_notf+'">'+lang.lang_layout_reconnect+'</span><br>'+lang.lang_layout_headercolor +'<br><div id="picker_'+key+'" class="color-picker"></div></div><div class="tl-box" tlid="' + key + '"><div id="timeline_' + key +
'" class="tl '+acct.type+'-timeline " tlid="' + key + '" data-type="' + acct.type + '" data-acct="'+acct.domain+'"><div id="landing_'+key+'" style="text-align:center">'+lang.lang_layout_nodata +'</div></div></div>'
',\'' + acct.type + '\',\'' + acct.domain + '\',\'' + escapeHTML(acct.data) + '\')" class="setting nex ' + if_notf + ' ' + if_misskey_hide + '"><i class="material-icons waves-effect nex ' + if_notf + '" title="' + lang.lang_layout_reconnect + '">low_priority</i></a><span class="' + if_notf + '">' + lang.lang_layout_reconnect + '</span><br>' + lang.lang_layout_headercolor + '<br><div id="picker_' + key + '" class="color-picker"></div></div><div class="tl-box" tlid="' + key + '"><div id="timeline_' + key +
'" class="tl ' + acct.type + '-timeline " tlid="' + key + '" data-type="' + acct.type + '" data-acct="' + acct.domain + '" data-const="' + acct.type + '_' + acct.domain + '"><div id="landing_' + key + '" style="text-align:center">' + lang.lang_layout_nodata + '</div></div></div>'
$('#timeline_box_' + basekey + '_parentBox').append(html);
localStorage.removeItem("pool_" + key);
if (acct.data) {
@@ -240,6 +274,14 @@ function parseColumn() {
}
}
}
function checkStr(type, data, acct_id, key, delc, voice) {
if ($('#notice_icon_' + key).hasClass("red-text") && type != "notf" && type != "mix") {
goTop(key);
tlDiff(type, data, acct_id, key, delc, voice, "");
} else {
goTop(key);
}
}
//セカンダリートゥートボタン
function secvis(set) {
if (set == "public") {
@@ -266,7 +308,9 @@ function secvis(set){
//カラム追加
function addColumn() {
var acct = $("#add-acct-sel").val();
if(acct != "webview" && acct != "noauth"){
localStorage.setItem("last-use", acct);
}
var type = $("#type-sel").val();
if (acct == "noauth") {
acct = $("#noauth-url").val();
@@ -327,7 +371,6 @@ function removeColumn(tlid) {
var ipc = electron.ipcRenderer;
ipc.send('column-del', "");
ipc.on('column-del-reply', function (event, arg) {
console.log(arg);
if (arg === 1) {
localStorage.removeItem("card_" + tlid);
obj.splice(tlid, 1);
@@ -425,7 +468,7 @@ function coloradd(key,bg,txt){
function webviewParse(url, key, insert, icnsert, css) {
var html = '<div class="box" id="timeline_box_' + key + '_box" tlid="' + key +
'" style="' + css + '"><div class="notice-box z-depth-2" id="menu_' + key + '" style="' + insert + '">' +
'<div class="area-notice"><i class="fa fa-twitter waves-effect" id="notice_icon_' + key + '" style="font-size:40px; padding-top:25%;"></i></div>'+
'<div class="area-notice"><i class="fab fa-twitter waves-effect" id="notice_icon_' + key + '" style="font-size:40px; padding-top:25%;"></i></div>' +
'<div class="area-notice_name tl-title">WebView(' + url + ')</div>' +
'<div class="area-sta"><input type="checkbox" id="webviewsel" value="true" class="filled-in"><label for="webviewsel">' + lang.lang_layout_webviewmode + '</label></div>' +
'<div class="area-a2"><a onclick="removeColumn(' + key +
@@ -439,6 +482,37 @@ function webviewParse(url,key,insert,icnsert,css){
return html;
}
function unstreamingTL(type, key, basekey, insert, icnsert, left_fold, css, animecss, q) {
if (!left_fold) {
var basehtml = '<div style="' + css + '" class="box ' + animecss + '" id="timeline_box_' + basekey + '_parentBox"></div>';
$("#timeline-container").append(basehtml);
var left_hold = '<a onclick="leftFoldSet(' + key + ')" class="setting nex"><i class="material-icons waves-effect nex" title="' + lang.lang_layout_leftFold + '">view_agenda</i></a>' + lang.lang_layout_leftFold + '</span><br>';
} else {
var left_hold = '<a onclick="leftFoldRemove(' + key + ')" class="setting nex"><i class="material-icons waves-effect nex" title="' + lang.lang_layout_leftUnfold + '">view_column</i></a>' + lang.lang_layout_leftUnfold + '</span><br>';
}
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="area-notice"><i class="material-icons waves-effect" id="notice_icon_' + key + '" style="font-size:40px; padding-top:25%;" onclick="tootsearch(' + key + ',\'' + q + '\');" title="' + lang.lang_layout_gotop + '"></i></div>' +
'<div class="area-notice_name"><span id="notice_' + key + '" class="tl-title"></span></div>' +
'<div class="area-a1"></div><div class="area-sta"></div>' +
'<div class="area-a2"><a onclick="removeColumn(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="' + lang.lang_layout_delthis + '"' + icnsert + '>cancel</i></a></div>' +
'<div class="area-a3"><a onclick="setToggle(' + key +
')" class="setting nex" title="' + lang.lang_layout_setthis + '"' + icnsert + '><i class="material-icons waves-effect nex">settings</i></a></div></div>' +
'<div class="column-hide notf-indv-box" id="util-box_' + key +
'" style="padding:5px;">' + left_hold + '<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>' + lang.lang_layout_headercolor + '<br><div id="picker_' + key + '" class="color-picker"></div></div><div class="tl-box" tlid="' + key + '"><div id="timeline_' + key +
'" class="tl ' + type + '-timeline " tlid="' + key + '" data-type="' + type + '" data-acct="nostr"><div id="landing_' + key + '" style="text-align:center">' + lang.lang_layout_nodata + '</div></div></div>'
$('#timeline_box_' + basekey + '_parentBox').append(html);
tootsearch(key, q);
cardCheck(key);
ebtCheck(key);
mediaCheck(key);
catchCheck(key);
voiceCheck(key);
return true;
}
function leftFoldSet(key) {
var multi = localStorage.getItem("column");
var obj = JSON.parse(multi);

View File

@@ -1,4 +1,6 @@
function menu() {
localStorage.setItem("menu-done", true);
$("#fukidashi").addClass("hide")
if (!$("#menu").hasClass("appear")) {
$("#menu").addClass("appear")
var left = localStorage.getItem("menu-left");
@@ -19,6 +21,8 @@ function menu(){
$("#menu-bar").html("TheDesk " + localStorage.getItem("ver"));
$(".menu-content").addClass("hide");
$("#add-box").removeClass("hide");
$("#left-menu div").removeClass("active");
$("#addColumnMenu").addClass("active");
} else {
$('#menu').fadeOut()
$("#menu").removeClass("appear")
@@ -26,7 +30,8 @@ function menu(){
}
$(function () {
$( "#menu" ).draggable({handle: "#menu-bar",
$("#menu").draggable({
handle: "#menu-bar",
stop: function () {
var left = $('#menu').offset().left;
if (left > $('body').width() - $('#menu').width()) {

View File

@@ -5,6 +5,10 @@ function hide() {
$('#post-box').fadeOut()
$("#post-box").removeClass("appear")
$("#emoji").addClass("hide")
$("#left-side").show();
$("#default-emoji").show();
$("#unreact").show();
$("#addreact").addClass("hide");
}
//最小化
function mini() {
@@ -38,7 +42,8 @@ function show() {
}
$(function () {
$( "#post-box" ).draggable({handle: "#post-bar",
$("#post-box").draggable({
handle: "#post-bar",
stop: function () {
var left = $('#post-box').offset().left;
if (left > $('body').width() - $('#post-box').width()) {

View File

@@ -28,7 +28,7 @@ function scrollck() {
var scrt = $(this).find(".tl").height() - $(window).height();
var scr = $(this).scrollTop();
if (scr > scrt) {
console.log("kicked");
console.log("kicked more loading:" + tlid);
moreload('', tlid);
}
});
@@ -44,7 +44,6 @@ function goColumn(key){
$("#sort-box").addClass("hide");
$("#sort-box").removeClass("show");
if ($('[tlid=' + key + ']').length) {
console.log($('[tlid='+key+']').offset().left);
$("#timeline-container").animate({ scrollLeft: $("#timeline-container").scrollLeft() + $('[tlid=' + key + ']').offset().left });
}
}

View File

@@ -123,6 +123,11 @@ function load() {
var font = "";
}
$("#font").val(font);
$("#c1-file").text(localStorage.getItem("custom1"))
$("#c2-file").text(localStorage.getItem("custom2"));
$("#c3-file").text(localStorage.getItem("custom3"));
$("#c4-file").text(localStorage.getItem("custom4"));
//$("#log").val(localStorage.getItem("errors"))
}
function climute() {
@@ -142,7 +147,7 @@ function climute(){
var list = key * 1 + 1;
templete = '<div class="acct" id="acct_' + key + '">' + list +
'.' +
cli + '<button class="btn waves-effect red disTar" onclick="cliMuteDel(' +
escapeHTML(cli) + '<button class="btn waves-effect red disTar" onclick="cliMuteDel(' +
key + ')">' + lang.lang_del + '</button><br></div>';
$("#mute-cli").append(templete);
});
@@ -154,7 +159,7 @@ function cliMuteDel(key){
obj.splice(key, 1);
var json = JSON.stringify(obj);
localStorage.setItem("client_mute", json);
mute();
climute();
}
function wordmute() {
@@ -228,7 +233,6 @@ function exportSettings(){
properties: ['openFile', 'createDirectory'],
defaultPath: "export.thedeskconfigv2"
}, (savedFiles) => {
console.log(savedFiles);
if (!savedFiles) {
return false;
}
@@ -289,7 +293,6 @@ function exportSettings(){
var tagarr = localStorage.getItem("tag");
var favtag = JSON.parse(tagarr);
exp.favoriteTags = favtag;
console.log(exp);
ipc.send('export', [savedFiles, JSON.stringify(exp)]);
alert("Done.")
//cards
@@ -311,7 +314,6 @@ function importSettings(){
{ name: 'TheDesk Config', extensions: ['thedeskconfig', 'thedeskconfigv2'] },
]
}, (fileNames) => {
console.log(fileNames);
if (!fileNames) {
return false;
}
@@ -358,7 +360,6 @@ function importSettings(){
//Version 1
localStorage.setItem("theme", obj.theme);
if (obj.width) {
console.log(obj.width)
localStorage.setItem("width", obj.width);
}
if (obj.font) {
@@ -547,7 +548,6 @@ function deleteIt(){
function ctLoad() {
ipc.send('theme-json-list', "");
ipc.on('theme-json-list-response', function (event, args) {
console.log(args);
var templete = "";
Object.keys(args).forEach(function (key) {
var theme = args[key];
@@ -591,7 +591,6 @@ function custom(){
$("#delTheme").removeClass("disabled")
ipc.send('theme-json-request', id);
ipc.on('theme-json-response', function (event, args) {
console.log(args);
$("#custom_name").val(args.name);
$("#custom_desc").val(args.desc);
$("#" + args.base).prop("checked", true);
@@ -628,7 +627,6 @@ function customImp(){
}
}
function hardwareAcceleration(had) {
console.log("ha");
ipc.send('ha', had);
}
@@ -636,6 +634,22 @@ ipc.on('theme-json-create-complete', function (event, args) {
$("#custom_import").val("");
ctLoad()
});
function customSound(key) {
var electron = require("electron");
var remote = electron.remote;
var dialog = remote.dialog;
dialog.showOpenDialog(null, {
title: 'Custom sound',
properties: ['openFile'],
filters: [
{ name: 'Audio', extensions: ['mp3', 'aac', 'wav', 'flac', 'm4a'] },
{ name: 'All', extensions: ['*'] },
]
}, (fileNames) => {
localStorage.setItem("custom" + key, fileNames[0]);
$("#c1-file").text(fileNames[0])
});
}
window.onload = function () {
//最初に読む
load();
@@ -648,3 +662,4 @@ oksload();
npprovider();
ctLoad()
};

View File

@@ -32,7 +32,7 @@ function sortload(){
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="このカラムを削除">cancel</i></a></div><div class="sortacct">' + acctdata + '</div></li>';
$("#sort").append(html);
@@ -58,8 +58,10 @@ function Scap(type, data) {
return "Integrated"
} else if (type == "webview") {
return "Twitter"
} else if (type == "tootsearch") {
return "tootsearch(" + data + ")"
} else {
console.log(type);
console.error("unknown timeline type: " + type);
}
}
@@ -101,7 +103,7 @@ function sort(){
var json = JSON.stringify(newobj);
localStorage.setItem("column", json);
$("#sort").html("");
Materialize.toast("並べ替え完了。", 3000);
Materialize.toast("Sorted", 3000);
sortload();
parseColumn();
sortMenu()

View File

@@ -79,7 +79,7 @@ function nowplaying(mode){
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
console.table(json);
if (json.length < 1) {
return false;
}
@@ -129,7 +129,11 @@ function nowplaying(mode){
ipc.send('itunes', "");
ipc.once('itunes-np', function (event, arg) {
console.log(arg);
if (arg.cmd) {
console.error(arg);
return;
}
console.table(arg);
var content = localStorage.getItem("np-temp");
if (!content || content == "" || content == "null") {
var content = "#NowPlaying {song} / {album} / {artist}\n{url}";
@@ -142,8 +146,8 @@ function nowplaying(mode){
media(arg.path, "image/png", "new");
}
} else if (platform == "darwin") {
if(flag && arg.artworks[0]){
ipc.send('bmp-image', [arg.artworks[0].path,0]);
if (flag && arg.existsArtwork) {
media(arg.artworks[0].data, "image/png", "new");
}
}
var regExp = new RegExp("{song}", "g");
@@ -215,49 +219,3 @@ $("#npbtn").bind('contextmenu', function() {
nowplaying('itunes');
return false;
});
/*cinderella NP*/
function cgNP(q){
suggest = "https://cg.toot.app/api/v1/?song=" + q
console.log(suggest)
fetch(suggest, {
method: 'GET',
headers: {
'content-type': 'application/json'
},
}).then(function(response) {
return response.json();
}).catch(function(error) {
todo(error);
console.error(error);
}).then(function(json) {
console.log(json);
var electron = require("electron");
var ipc = electron.ipcRenderer;
var flag=localStorage.getItem("artwork");
if(flag){
var img=json.album.artwork;
ipc.send('bmp-image', [img,0]);
}
var content=localStorage.getItem("np-temp");
if(!content || content==""){
var content="#NowPlaying {song} / {album} / {artist}\n{url}";
}
var regExp = new RegExp("{song}", "g");
content = content.replace(regExp, json.name);
var regExp = new RegExp("{album}", "g");
content = content.replace(regExp, json.album.name);
var regExp = new RegExp("{artist}", "g");
content = content.replace(regExp, json.artist.text);
var regExp = new RegExp("{composer}", "g");
content = content.replace(regExp, json.composer);
var regExp = new RegExp("{lyricist}", "g");
content = content.replace(regExp, json.lyricist);
var regExp = new RegExp("{bpm}", "g");
content = content.replace(regExp, json.bpm);
var regExp = new RegExp("{genre}", "g");
content = content.replace(regExp, "");
var regExp = new RegExp("{url}", "g");
content = content.replace(regExp, "");
$("#textarea").val(content);
});
}

View File

@@ -57,7 +57,7 @@ function startmem(){
var use = arg[0];
var cpu = arg[1];
var total = arg[2]
$("#tips-text").html(cpu+"<br>Memory:"+Math.floor(use/1024/1024/102.4)/10+"/"+Math.floor(total/1024/1024/102.4)/10+"GB("+Math.floor(use/total*100)+"%)")
$("#tips-text").html(escapeHTML(cpu) + "<br>Memory:" + Math.floor(use / 1024 / 1024 / 102.4) / 10 + "/" + Math.floor(total / 1024 / 1024 / 102.4) / 10 + "GB(" + Math.floor(use / total * 100) + "%)")
})
}
//トレンドタグ
@@ -66,7 +66,6 @@ function trendTagonTip(){
var domain = "imastodon.net"
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain + "/api/v1/trend_tags"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -83,7 +82,7 @@ function trendTagonTip(){
var tags = "";
json = json.score;
Object.keys(json).forEach(function (tag) {
tags = tags + '<a onclick="tagShow(\'' + tag + '\')" class="pointer">#' + tag + '</a><span class="hide" data-tag="' + tag + '"> <a onclick="tagTL(\'tag\',\'' + tag + '\',false,\'add\')" class="pointer" title="#' + tag + 'のタイムライン">TL</a> <a onclick="show();brInsert(\'#' + tag + '\')" class="pointer" title="#' + tag + 'でトゥート">Toot</a></span><br>';
tags = tags + '<a onclick="tagShow(\'' + tag + '\')" class="pointer">#' + escapeHTML(tag) + '</a><span class="hide" data-tag="' + tag + '"> <a onclick="tagTL(\'tag\',\'' + tag + '\',false,\'add\')" class="pointer" title="#' + tag + 'のタイムライン">TL</a> <a onclick="show();brInsert(\'#' + tag + '\')" class="pointer" title="#' + tag + 'でトゥート">Toot</a></span><br>';
});
$("#tips-text").html('<div class="trendtag">トレンドタグ<i class="material-icons pointer" onclick="trendTagonTip()" style="font-size:12px">refresh</i>:<br>' + tags + '</div>');
trendTagonTipInterval()
@@ -109,7 +108,6 @@ function spotifytips(){
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
var ms = json.progress_ms;
var last = 1000 - ms % 1000;
var item = json.item;
@@ -200,4 +198,3 @@ function tipsToggle(){
if (localStorage.getItem("tips")) {
tips(localStorage.getItem("tips"));
}

View File

@@ -438,10 +438,11 @@ function showReq(more, acct_id) {
todo(error);
console.error(error);
}).then(function (json) {
if(localStorage.getItem("mode_" + domain)=="misskey"){
var templete = userparse(json, 'true',acct_id);
if (localStorage.getItem("mode_" + domain) != "misskey") {
var templete = userparse(json, "request", acct_id);
} else {
var templete = misskeyUserparse(json, 'true',acct_id);
var templete = misskeyUserparse(json, true, acct_id);
}
if (!json[0]) {
@@ -537,9 +538,8 @@ function showFrl(more, acct_id) {
$("#his-follow-recom-contents").html(lang.lang_details_nodata + "(" + lang.lang_hisdata_frcreq + ")<br>");
console.error(error);
}).then(function (json) {
console.log(json);
if (!json[0]) {
console.log("No data");
console.warn("No suggestions(recommend) data");
templete = lang.lang_details_nodata + "(" + lang.lang_hisdata_frcwarn + ")<br>";
} else {
var templete = userparse(json, '', acct_id);
@@ -553,6 +553,51 @@ function showFrl(more, acct_id) {
});
}
//Keybase
function udAdd(start) {
fetch(start, {
method: 'GET',
headers: {
'Accept': 'application/json'
},
//body: JSON.stringify({})
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
var fields = json.attachment;
for (var i = 0; i < fields.length; i++) {
if (fields[i].type == "IdentityProof") {
if (fields[i].signatureAlgorithm == "keybase") {
var html = '<a href="https://keybase.io/' + fields[i].name + '" target="_blank" class="cbadge teal waves-effect" style="max-width:200px;" title="' + lang.lang_hisdata_key.replace("{{set}}", escapeHTML(fields[i].signatureAlgorithm)) + '"><i class="fas fa-key" aria-hidden="true"></i>' + escapeHTML(fields[i].signatureAlgorithm) + ':' + escapeHTML(fields[i].name) + '</a>';
} else {
var html = '<span class="cbadge teal" style="max-width:200px;" title="' + lang.lang_hisdata_key.replace("{{set}}", escapeHTML(fields[i].signatureAlgorithm)) + '"><i class="fas fa-key" aria-hidden="true"></i>' + escapeHTML(fields[i].signatureAlgorithm) + ':' + escapeHTML(fields[i].name) + '</span>';
}
$("#his-proof-prof").append(html)
}
}
});
fetch("https://notestock.osa-p.net/api/v1/isstock.json?id=" + start.replace("@", "users/"), {
method: 'GET',
headers: {
'Accept': 'application/json'
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json.user.public_view) {
var html = '<a href="' + json.user.url + '" target="_blank" class="cbadge purple waves-effect" style="max-width:200px;" title="Notestock">Notestock</a>';
$("#his-proof-prof").append(html)
}
});
}
//ユーザーマッチングリスト
function showMat() {
@@ -562,7 +607,6 @@ function showMat() {
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];
console.log(start);
fetch(start, {
method: 'GET',
headers: {
@@ -575,7 +619,6 @@ function showMat() {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
var templete = "";
Object.keys(json).forEach(function (key) {
var user = json[key];

View File

@@ -30,7 +30,7 @@ function imgChange(imgfile, target) {
var acct_id = $('#his-data').attr("use-acct");
todo("アップロードしています")
if (!imgfile.files.length) {
console.log("No Img");
console.warn("No Image to upload");
return;
}
var file = imgfile.files[0];
@@ -52,7 +52,6 @@ function imgChange(imgfile, target) {
httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
$('#his-data').modal('close');
todc();
localStorage.removeItem("image");

View File

@@ -19,7 +19,7 @@ function udgEx(user,acct_id){
if (acct_id == "main") {
acct_id = localStorage.getItem("main");
}
console.log(user);
console.log("Get user data of " + user);
var domain = localStorage.getItem("domain_" + acct_id);
if (localStorage.getItem("mode_" + domain) == "misskey") { return false; }
var at = localStorage.getItem("acct_" + acct_id + "_at");
@@ -36,7 +36,6 @@ function udgEx(user,acct_id){
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (json.accounts) {
var id = json.accounts[0].id;
udg(id, acct_id);
@@ -52,7 +51,6 @@ function udg(user, acct_id) {
reset();
if (!user) {
user = localStorage.getItem("user-id_" + acct_id);
console.log(user);
}
todo("User Data Loading...");
var domain = localStorage.getItem("domain_" + acct_id);
@@ -62,7 +60,6 @@ function udg(user, acct_id) {
}
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain + "/api/v1/accounts/" + user;
console.log(start);
fetch(start, {
method: 'GET',
headers: {
@@ -75,7 +72,6 @@ function udg(user, acct_id) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
//一つ前のユーザーデータ
if (!localStorage.getItem("history")) {
$("#his-history-btn").prop("disabled", true);
@@ -105,6 +101,7 @@ function udg(user, acct_id) {
fer(json.id, '', acct_id);
var dis_name = escapeHTML(json.display_name);
dis_name = twemoji.parse(dis_name);
var note = json.note;
if (json.emojis) {
var actemojick = json.emojis[0];
@@ -117,12 +114,17 @@ function udg(user, acct_id) {
var emoji = json.emojis[key5];
var shortcode = emoji.shortcode;
var emoji_url = '<img src="' + emoji.url +
'" class="emoji-img" data-emoji="'+shortcode+'">';
'" class="emoji-img" data-emoji="' + shortcode + '" draggable="false">';
var regExp = new RegExp(":" + shortcode + ":", "g");
dis_name = dis_name.replace(regExp, emoji_url);
note = note.replace(regExp, emoji_url);
});
}
//noteの解析
//var tags = '<a onclick="tl(\'tag\',\'$1\',' + acct_id +',\'add\')" class="pointer parsed">#$1</a>';
//var mens = '<a onclick="udgEx(\'$1\',' + acct_id +')" class="pointer parsed">@$1</a>';
//note=note.replace(/#(\S+)/gi, tags)
//note=note.replace(/\s@([a-zA-Z_0-9@.-]+)/gi, mens)
$("#his-name").html(dis_name);
$("#his-acct").text(json.acct);
$("#his-acct").attr("fullname", fullname);
@@ -143,8 +145,14 @@ function udg(user, acct_id) {
for (var i = 0; i < json.fields.length; i++) {
var fname = json.fields[i].name;
var fval = json.fields[i].value;
fval=twemoji.parse(fval);
note=note+'<tr><td class="his-field-title">'+fname+'</td><td class="his-field-content">'+fval+'</td></tr>';
if (json.fields[i].verified_at) {
var when = lang.lang_showontl_verified + ":" + crat(json.fields[i].verified_at);
var color = "rgba(121,189,154,.25);"
} else {
var when = "";
var color = "inherit"
}
note = note + '<tr><td class="his-field-title">' + twemoji.parse(escapeHTML(fname)) + '</td><td class="his-field-content" title="' + when + '" style="background-color:' + color + '">' + twemoji.parse(fval) + '</td></tr>';
}
note = note + '</table>'
$("#his-des").html(twemoji.parse(note));
@@ -157,6 +165,7 @@ function udg(user, acct_id) {
if (json.bot) {
$("#his-bot").html(lang.lang_showontl_botacct);
}
$("#his-des").attr("data-acct", acct_id);
$('#his-data').css('background-size', 'cover');
$("#his-data .tab-content").css("height", $("#his-float-timeline").height() - 70 + "px")
localStorage.setItem("history", user);
@@ -170,10 +179,10 @@ function udg(user, acct_id) {
showFrl('', acct_id);
$("#his-name-val").val(json.display_name);
if (json.fields.length > 0) {
$("#his-f1-name").val(json.fields[0].name); $("#his-f1-val").val($.strip_tags(json.fields[0].value));
$("#his-f2-name").val(json.fields[1].name); $("#his-f2-val").val($.strip_tags(json.fields[1].value));
$("#his-f3-name").val(json.fields[2].name); $("#his-f3-val").val($.strip_tags(json.fields[2].value));
$("#his-f4-name").val(json.fields[3].name); $("#his-f4-val").val($.strip_tags(json.fields[3].value));
if (json.fields[0]) { $("#his-f1-name").val(json.fields[0].name); $("#his-f1-val").val($.strip_tags(json.fields[0].value)); }
if (json.fields[1]) { $("#his-f2-name").val(json.fields[1].name); $("#his-f2-val").val($.strip_tags(json.fields[1].value)); }
if (json.fields[2]) { $("#his-f3-name").val(json.fields[2].name); $("#his-f3-val").val($.strip_tags(json.fields[2].value)); }
if (json.fields[3]) { $("#his-f4-name").val(json.fields[3].name); $("#his-f4-val").val($.strip_tags(json.fields[3].value)); }
}
var des = json.note;
des = des.replace(/<br \/>/g, "\n")
@@ -193,13 +202,14 @@ function udg(user, acct_id) {
$(".only-his-data").show();
}
todc();
//外部データ取得(死かもしれないので)
udAdd(json.url);
});
}
function misskeyUdg(user, acct_id) {
reset();
if (!user) {
user = localStorage.getItem("user-id_" + acct_id);
console.log(user);
}
todo("User Data Loading...");
var domain = localStorage.getItem("domain_" + acct_id);
@@ -209,7 +219,6 @@ function misskeyUdg(user, acct_id) {
}
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain + "/api/users/show";
console.log(user);
fetch(start, {
method: 'POST',
headers: {
@@ -225,7 +234,6 @@ function misskeyUdg(user, acct_id) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
//一つ前のユーザーデータ
if (!localStorage.getItem("history")) {
$("#his-history-btn").prop("disabled", true);
@@ -262,7 +270,7 @@ function misskeyUdg(user, acct_id) {
$("#his-follow").text(json.followingCount);
$("#his-follower").text(json.followersCount);
$("#his-since").text(crat(json.createdAt));
var note=json.description;
var note = escapeHTML(json.description);
$("#his-des").html(twemoji.parse(note));
if (json.isCat) {
$("#his-bot").html("Cat" + twemoji.parse("😺"));
@@ -324,7 +332,6 @@ function historyShow(){
function profShow() {
var acct_id = $("#post-acct-sel").val();
var user = localStorage.getItem("user-id_" + acct_id);
console.log("user-id_"+acct_id+":"+user);
udg(user, acct_id)
hide();
}
@@ -392,6 +399,12 @@ function relations(user, acct_id) {
$("#his-end-btn").removeClass("endorsed");
$("#his-end-btn").text(lang.lang_status_endorse)
}
//Blocked
if (json.blocked_by) {
$("#his-float-timeline").hide();
$("#his-float-blocked").show();
$("#his-follow-btn").hide()
}
});
}
@@ -453,6 +466,9 @@ function reset(){
$("#his-f4-name").val(""); $("#his-f4-val").val("");
$("#his-endorse").html("");
$("#his-openin").attr("data-href", "");
$("#his-float-timeline").show();
$("#his-float-blocked").hide();
$("#his-proof-prof").html("")
}
$('#my-data-nav .custom-tab').on('click', function () {
var target = $(this).find("a").attr("go");

View File

@@ -1,4 +1,4 @@
'use strict';
var dir = 'file://' + __dirname;
var base = dir + '/view/';
// Electronのモジュール
@@ -50,19 +50,14 @@ try {
}; // デフォルトバリュー
}
function isFile(file) {
try {
var lang = fs.readFileSync(lang_path, 'utf8');
} catch (e) {
var langs=app.getLocale();
if(~langs.indexOf("ja")){
lang="ja";
}else{
lang="en";
fs.statSync(file);
return true
} catch (err) {
if (err.code === 'ENOENT') return false
}
fs.writeFileSync(lang_path,lang);
}
console.log(app.getLocale());
console.log("launch:"+lang);
// 全てのウィンドウが閉じたら終了
app.on('window-all-closed', function () {
if (process.platform != 'darwin') {
@@ -70,17 +65,40 @@ app.on('window-all-closed', function() {
app.quit();
}
});
// macOSでウィンドウを閉じた後に再度開けるようにする
app.on('activate', function () {
if (mainWindow == null) {
createWindow();
}
});
function createWindow() {
if (isFile(lang_path)) {
console.log("exist");
var lang = fs.readFileSync(lang_path, 'utf8');
} else {
var langs = app.getLocale();
console.log(langs);
if (~langs.indexOf("ja")) {
lang = "ja";
} else {
lang = "en";
}
fs.mkdir(app.getPath("userData"), function (err) {
fs.writeFileSync(lang_path, lang);
});
}
console.log(app.getLocale());
console.log("launch:" + lang);
// メイン画面の表示。ウィンドウの幅、高さを指定できる
var platform = process.platform;
var bit = process.arch;
if (platform == "linux") {
var arg={width:window_size.width,height:window_size.height,x:window_size.x,y:window_size.y,icon: __dirname + '/desk.png'}
var arg = { webPreferences: { webviewTag: true, nodeIntegration: true }, width: window_size.width, height: window_size.height, x: window_size.x, y: window_size.y, icon: __dirname + '/desk.png' }
} else if (platform == "win32") {
var arg={width:window_size.width,height:window_size.height,x:window_size.x,y:window_size.y,simpleFullscreen:true}
var arg = {webPreferences: { webviewTag: true, nodeIntegration: true }, width: window_size.width, height: window_size.height, x: window_size.x, y: window_size.y, simpleFullscreen: true }
} else if (platform == "darwin") {
var arg={width:window_size.width,height:window_size.height,x:window_size.x,y:window_size.y,simpleFullscreen:true}
var arg = { webPreferences: { webviewTag: true, nodeIntegration: true }, width: window_size.width, height: window_size.height, x: window_size.x, y: window_size.y, simpleFullscreen: true }
}
mainWindow = new BrowserWindow(arg);
electron.session.defaultSession.clearCache(() => { })
@@ -109,6 +127,7 @@ function createWindow() {
}
// ウィンドウが閉じられたらアプリも終了
mainWindow.on('closed', function () {
electron.ipcMain.removeAllListeners();
mainWindow = null;
});
mainWindow.on('close', function () {
@@ -131,7 +150,7 @@ function createWindow() {
var platform = process.platform;
var bit = process.arch;
if (platform == "darwin") {
Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang,mainWindow,false)));
Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang, mainWindow, false, dir)));
}
//CSS
css.css(mainWindow);

View File

@@ -15,6 +15,9 @@ function dl(mainWindow,lang_path,base) {
var bit = process.arch;
if (platform != "others") {
updatewin = new BrowserWindow({
webPreferences: {
nodeIntegration:true
},
width: 600,
height: 400,
"transparent": false, // ウィンドウの背景を透過
@@ -76,7 +79,7 @@ function dl(mainWindow,lang_path,base) {
},
saveAs: false
};
download(BrowserWindow.getFocusedWindow(),
download(updatewin,
url, opts)
.then(dl => {
updatewin.webContents.send('mess', "ダウンロードが完了しました。");

View File

@@ -51,6 +51,9 @@ function img(mainWindow,dir){
});
function adobeWindow() {
var window = new BrowserWindow({
webPreferences: {
nodeIntegration:true
},
width: 1000,
height: 750
});

View File

@@ -1,5 +1,5 @@
// Create the Application's main menu
function templete(lang,mainWindow,packaged){
function templete(lang, mainWindow, packaged, dir) {
const electron = require("electron");
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
@@ -68,18 +68,26 @@ function templete(lang,mainWindow,packaged){
const menu = [{
label: dict.application[lang],
submenu: [
{ label: dict.about[lang], click: function() {
{
label: dict.about[lang], click: function () {
var ver = app.getVersion()
var window = new BrowserWindow({width: 300, height: 460,
var window = new BrowserWindow({
webPreferences: {
nodeIntegration:true
},
width: 300, height: 460,
"transparent": false, // ウィンドウの背景を透過
"frame": false, // 枠の無いウィンドウ
"resizable": false });
window.loadURL('file://' + __dirname + '/about.html?ver='+ver);
} },
"resizable": false
});
window.loadURL(dir + '/about.html?ver=' + ver);
}
},
{ type: "separator" },
{ label: dict.quit[lang], accelerator: "Command+Q", click: function () { app.quit(); } }
]}, {
]
}, {
label: dict.edit[lang],
submenu: [
{ label: dict.undo[lang], accelerator: "CmdOrCtrl+Z", selector: "undo:" },
@@ -89,7 +97,8 @@ function templete(lang,mainWindow,packaged){
{ label: dict.copy[lang], accelerator: "CmdOrCtrl+C", selector: "copy:" },
{ label: dict.paste[lang], accelerator: "CmdOrCtrl+V", selector: "paste:" },
{ label: dict.selall[lang], accelerator: "CmdOrCtrl+A", selector: "selectAll:" }
]},{
]
}, {
label: dict.view[lang],
submenu: [
{

View File

@@ -4,7 +4,7 @@ function np(mainWindow){
const app = electron.app;
const fs = require("fs");
var ipc = electron.ipcMain;
ipc.on('itunes', (e, args) => {
ipc.on('itunes', async (e, args) => {
//Verified on Windows
console.log("Access");
if (args[0] == "set") {
@@ -25,13 +25,15 @@ function np(mainWindow){
var platform = process.platform;
var bit = process.arch;
if (platform == "darwin") {
const nowplaying = require("itunes-nowplaying-mac")
nowplaying.getRawData().then(function (value) {
try {
const nowplaying = require("itunes-nowplaying-mac");
const value = await nowplaying.getRawData();
mainWindow.webContents.send('itunes-np', value);
}).catch(function (error) {
// 非同期処理失敗。呼ばれない
console.log(error);
});
} catch (error) {
// エラーを返す
console.error(error);
mainWindow.webContents.send('itunes-np', error);
}
} else {
var { NowPlaying, PlayerName } = require("nowplaying-node");
var nppath = join(app.getPath("userData"), "nowplaying");

View File

@@ -11,7 +11,6 @@ function system(mainWindow, dir, lang) {
const BrowserWindow = electron.BrowserWindow;
const dialog = electron.dialog;
const os = require('os')
const fm = require('font-manager');
const language = require("../main/language.js");
ipc.on('native-notf', function (e, args) {
@@ -73,8 +72,11 @@ function system(mainWindow, dir, lang) {
var ver = app.getVersion()
var window = new BrowserWindow({
webPreferences: {
nodeIntegration:true
},
width: 300,
height: 460,
height: 480,
"transparent": false, // ウィンドウの背景を透過
"frame": false, // 枠の無いウィンドウ
"resizable": false
@@ -101,6 +103,9 @@ function system(mainWindow, dir, lang) {
window_pos = [0, 0]; // デフォルトバリュー
}
var nanowindow = new BrowserWindow({
webPreferences: {
nodeIntegration:true
},
width: 350,
height: 200,
"transparent": false, // ウィンドウの背景を透過
@@ -172,6 +177,7 @@ function system(mainWindow, dir, lang) {
fn(data); // ソート後の配列を返す
}
ipc.on('fonts', (e, arg) => {
const fm = require('font-manager');
var fonts = fm.getAvailableFontsSync();
object_array_sort(fonts, 'family', 'asc', function (fonts_sorted) {
mainWindow.webContents.send('font-list', fonts_sorted);

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="./css/themes.css" type="text/css" rel="stylesheet">
@@ -15,38 +16,58 @@ html{
overflow: hidden;
font-family: sans-serif;
}
body {
background-color: rgba(0, 0, 0, 0.1);
font-size: 11px;
}
#timeline_nano {
overflow-y: scroll;
overflow-x: hidden;
-webkit-app-region: no-drag;
max-height: 100px;
}
.user{font-size:12px;}
.user {
font-size: 12px;
}
select {
-webkit-app-region: no-drag;
}
button {
-webkit-app-region: no-drag;
}
textarea {
-webkit-app-region: no-drag;
}
::-webkit-scrollbar {
width: 5px;
height: 10px;
background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-track {
-webkit-border-radius: 5px;
border-radius: 5px;
}
.area-actions{display:none !important;}
.area-date_via{display:none !important;}
.area-side{display:none !important;}
.area-actions {
display: none !important;
}
.area-date_via {
display: none !important;
}
.area-side {
display: none !important;
}
/* Handle */
::-webkit-scrollbar-thumb {
-webkit-border-radius: 5px;
@@ -54,22 +75,29 @@ textarea {
background: rgba(0, 0, 0, 0.8);
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}
.blacktheme body {
color: white;
background-color: #212121;
}
.blacktheme button {
background-color: black;
color: white;
}
.blacktheme textarea, .blacktheme select{
.blacktheme textarea,
.blacktheme select {
color: white;
}
.blacktheme select,.blacktheme option{
.blacktheme select,
.blacktheme option {
background-color: black;
}
</style>
</head>
<body>
<script>
//jQuery読む

2727
app/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +1,31 @@
{
"name": "thedesk",
"version": "18.1.0",
"version": "18.5.0",
"description": "TheDesk is a Mastodon client for PC.",
"repository": "https://github.com/cutls/TheDesk",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dist": "build --linux snap",
"build:js": "node build.js",
"build": "electron-builder",
"build:all": "electron-builder --win --linux",
"build:win": "electron-builder --win"
},
"keywords": [],
"keywords": [
"mastodon",
"client",
"electron",
"thedesk"
],
"bugs": {
"url": "https://github.com/cutls/TheDesk/issues",
"email": "mstdn@thedesk.top"
"email": "web-pro@cutls.com"
},
"homepage": "https://thedesk.top",
"author": {
"name": "Cutls",
"url": "https://kirishima.clooud/@Cutls",
"url": "https://cutls.com/@Cutls",
"email": "web-pro@cutls.com"
},
"contributor": [
@@ -33,27 +41,34 @@
},
{
"name": "kPherox",
"url": "https://www.kr-kp.com/",
"url": "https://pawoo.net/@kPherox",
"email": "admin@mail.kr-kp.com"
}
],
"license": "GPL-3.0",
"dependencies": {
"electron-dl": "^1.11.0",
"font-manager": "^0.3.0",
"jimp": "^0.2.28",
"electron-dl": "^1.14.0",
"jimp": "^0.6.4",
"json5": "^2.1.0",
"node-notifier": "^5.2.1",
"sumchecker": "^2.0.2",
"vue": "^2.6.9"
"node-notifier": "^5.4.0",
"sumchecker": "^3.0.0",
"vue": "^2.6.10"
},
"optionalDependencies": {
"nowplaying-node": "^0.1.3",
"itunes-nowplaying-mac": "git+https://github.com/rinsuki/itunes-nowplaying-mac#pull/1/head"
"nowplaying-node": "git+https://github.com/cutls/nowplaying-node",
"itunes-nowplaying-mac": "git+https://github.com/rinsuki/itunes-nowplaying-mac#pull/4/head",
"font-manager": "^0.3.0"
},
"devDependencies": {
"electron": "^5.0.1",
"electron-builder": "^20.40.2"
},
"build": {
"productName": "TheDesk",
"appId": "top.thedesk",
"asarUnpack": [
"node_modules/itunes-nowplaying-mac"
],
"directories": {
"output": "../build"
},
@@ -83,21 +98,19 @@
"linux": {
"icon": "build/icons",
"target": [
"snap"
"zip"
],
"category": "Network"
},
"mac": {
"target": "dmg"
"target": [
"dmg",
"zip"
]
},
"electronDownload": {
"version": "4.0.6"
"version": "5.0.1"
},
"electronVersion": "4.0.6"
},
"devDependencies": {
"electron": "^4.0.6",
"electron-packager": "^13.1.1",
"electron-rebuild": "^1.8.4"
"electronVersion": "5.0.1"
}
}

BIN
app/source/notif.wav Normal file

Binary file not shown.

BIN
app/source/notif2.wav Normal file

Binary file not shown.

BIN
app/source/notif3.wav Normal file

Binary file not shown.

View File

@@ -1,5 +1,6 @@
<!doctype html>
<html lang="en">
<head>
<title>Account Manager - TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport">
@@ -10,14 +11,57 @@
<link href='../../css/tl.css' rel='stylesheet' type='text/css'>
<link href='../../css/userdata.css' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
<style>.acct{display:flex; justify-content:space-around;}
.card{width:400px; background-color: #9e9e9e; margin:10px; }
body,html{overflow-y: scroll;}
#acct-list{display:flex; flex-wrap:wrap; color:white; align-items: flex-start}
.lts{font-size:150%}
.colorsel{ display:flex; }
.card .colorsel div:not(.exc){width:20px;height:20px;}
.card .colorsel div.exc{width:40px;height:20px;}
<style>
.acct {
display: flex;
justify-content: space-around;
}
.card {
width: 400px;
background-color: #9e9e9e;
margin: 10px;
}
body,
html {
overflow-y: scroll;
}
#acct-list {
display: flex;
flex-wrap: wrap;
color: white;
align-items: flex-start
}
.lts {
font-size: 150%
}
.colorsel {
display: flex;
}
.card .colorsel div:not(.exc) {
width: 20px;
height: 20px;
}
.card .colorsel div.exc {
width: 40px;
height: 20px;
}
.first {
display: flex;
justify-content: center;
align-items: center
}
.first .hide-first {
display: none;
}
</style>
<meta charset="utf-8">
<!--
@@ -28,6 +72,7 @@ body,html{overflow-y: scroll;}
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
-->
</head>
<body id="mainView">
<script type="text/javascript" src="../../js/common/jquery.js"></script>
<script type="text/javascript" src="../../js/platform/first.js"></script>
@@ -39,28 +84,33 @@ body,html{overflow-y: scroll;}
<script type="text/javascript" src="../../js/ui/tips.js"></script>
<script type="text/javascript" src="../../js/common/time.js"></script>
<script type="text/javascript" src="../../js/common/modal.js"></script>
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;">Back</a><br>
<div class="hide-first">
<a href="index.html" class="btn waves-effect orange nex"
style="width:100%; max-width:200px;">Back</a><br>
<h5>List of accounts</h5>
<div id="acct-list"></div>
<div class="divider"></div>
</div>
<div>
<h5>Add an account</h5><br>
<div id="add">
<div class="row">
<div class="col s6">
<div class="col s8">
<input type="text" id="url" style="width:70%" placeholder="ex)mstdn.jp">
<div id="ins-suggest"></div>
Check if TheDesk is not working on Windows, you want to login Pleroma servers, you cannot login when it checked.<br>
Uncheck it to skip pasiting code.(login to Mastodon on Windows or macOS) (Recommended: pcheck)<br>
<input type="checkbox" class="filled-in" id="linux" />
<label for="linux">Code setup</label><br>
<input type="checkbox" class="filled-in" id="misskey" />
<label for="misskey">Login as Misskey</label><br>
<button class="btn waves-effect" onclick="instance()">Login</button><br>
</div>
<div class="col s6">
<div class="col s4">
<span style="font-family:Open Sans;">Supports</span>
<div id="support" class="collection transparent"></div>
</div>
</div></div>
</div>
</div>
<div id="auth" style="display:none">
Paste the code and close browser.<br>
<input type="text" id="code" placeholder="Code">
@@ -73,6 +123,8 @@ body,html{overflow-y: scroll;}
<input type="text" id="misskey-key" placeholder="Code">
<button class="btn waves-effect" onclick="misskeyLogin()">Auth</button><br>
</div>
</div>
<div class="hide-first">
<h5>Main an account</h5>
<div class="input-field" style="width:300px"><span data-trans="your_acct">Select an account</span>
<br>
@@ -91,6 +143,7 @@ Toots:<span id="ins-toot"></span><br>
Users:<span id="ins-user"></span>Users<br>
Connection:<span id="ins-per"></span>%<br>
Mastodon version:<span id="ins-ver"></span>@<span id="ins-upd"></span><br>
</div>
<script type="text/javascript" src="../../js/ui/theme.js"></script>
<script type="text/javascript" src="../../js/platform/end.js"></script>
<script type="text/javascript" src="../../js/common/sha256.js"></script>

View File

@@ -1,16 +1,18 @@
<!doctype html>
<html lang="en">
<head>
<title>TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport">
<link href="../../css/materialize.css" type="text/css" rel="stylesheet">
<link href='../../css/font-awesome.css' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<link href="../../css/themes.css" type="text/css" rel="stylesheet">
<link href='../../css/tl.css' rel='stylesheet' type='text/css'>
<link href='../../css/userdata.css' rel='stylesheet' type='text/css'>
<link href='../../css/post.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/post.css" rel="stylesheet" type="text/css">
<link href="../../css/master.css" type="text/css" rel="stylesheet">
<link href='../../css/sort.css' rel='stylesheet' type='text/css'>
<link href="../../css/sort.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300|Baloo+Bhai" rel="stylesheet">
<meta charset="utf-8">
<!--
@@ -21,27 +23,29 @@
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
-->
</head>
<body>
<script type="text/javascript" src="../../js/common/jquery.js"></script>
<script type="text/javascript" src="../../js/platform/first.js"></script>
<script type="text/javascript" src="../../js/common/materialize.js"></script>
<script type="text/javascript" src="../../js/lang/lang.en.js"></script>
<script type="text/javascript" src="../../js/common/time.js"></script>
<script type="text/javascript" src="../../js/common/blurhash.js"></script>
<script type="text/javascript" src="../../js/common/version.js"></script>
<script type="text/javascript" src="../../js/common/keyshortcut.js"></script>
<script type="text/javascript" src="../../js/common/modal.js"></script>
<script type="text/javascript" src="../../js/ui/jquery-ui.min.js"></script>
<script>
var ver="Usamin (18.1.2)";
var ver = "Usamin (18.5.0)";
//betaを入れるとバージョンチェックしない
//GitHubに上げるときはindex.htmlをちゃんとする。(index.start.html)
//var ver="beta";
//WinstoreではバージョンCK・言語・Misskeyトークンの機能が排除
var acct_id = 0;
var tlid = 0;
verck(ver);
</script>
<textarea id="copy" style="top:-100px; position:fixed;"></textarea>
<canvas id="canvas" style="top:-100px; position:fixed;width:32px;height:32px" width="32" height="32"></canvas>
<div id="tl">
<!--TL-->
<!--ドラッグハンドラ-->
@@ -53,57 +57,85 @@ var tlid=0;
</div>
</div>
<div id="post-box" class="z-depth-5">
<div id="post-bar" class="drag-bar">Post new</div>
<div id="post-bar" class="drag-bar"><span id="unreact">Post new</span><span id="addreact"
class="hide">Reaction</span></div>
<!--トゥートボックス-->
<div id="left-side">
<div class="row" style="margin-bottom:0;">
</span>
<div class="" style="float:left;">
<a onclick="profShow()" style="vertical-align:-2.5rem;" class="pointer mize">
<img src="../../img/missing.svg" id="acct-sel-prof" title="Show profile of the selecting account(Ctrl+Shift+P)" data-trans-title="post_box_prof" width="24px">
<img src="../../img/missing.svg" id="acct-sel-prof" title="Show profile of the selecting account(Ctrl+Shift+P)"
data-trans-title="post_box_prof" width="24px">
</a>
</div>
<div class="input-field mize" style="float:left; width:calc(100% - 24px)">
<select id="post-acct-sel" class="acct-sel" onchange="mdCheck()"></select>
</div>
<span class="cancel">
<i class="material-icons waves-effect" onclick="hide()" title="Close this box(X)" data-trans-title="post_box_close">cancel</i>
<i class="material-icons waves-effect" onclick="hide()" title="Close this box(X)"
data-trans-title="post_box_close">cancel</i>
</span>
<!--Markdown-->
<div class="row" style="margin-bottom:0">
<div class="markdown mize hide">
<div class="col s12">
<i class="material-icons pointer setting waves-effect" onclick="tagsel('b')" title="太字(Ctrl+B)テキストボックス内を選択してから押すと囲みます。">format_bold</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('i')" title="字(Ctrl+I)テキストボックス内を選択してから押すと囲みます。">format_italic</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('u')" title="下線(Ctrl+U)テキストボックス内を選択してから押すと囲みます。">format_underlined</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('s')" title="取り消し(Ctrl+S)テキストボックス内を選択してから押すと囲みます。">strikethrough_s</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('>','no','yes')" title="引用">format_quote</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('#','no','yes')" title="見出し">short_text</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('`','yes','no')" title="コード挿入 テキストボックス内を選択してから押すと囲みます。">code</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('- ','yes','yes')" title="箇条書きリスト">format_list_bulleted</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('1. ','yes','yes')" title="番号付きリスト">format_list_numbered</i>
<i class="pointer setting fa fa-subscript waves-effect" onclick="markdown('__','yes','no','before')" title="下付き文字 テキストボックス内を選択してから押すと囲みます。" style="font-size:1.5rem"></i>
<i class="pointer setting fa fa-superscript waves-effect" onclick="markdown('_','yes','no','before')" title="上付き文字 テキストボックス内を選択してから押すと囲みます。" style="font-size:1.5rem"></i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('spin')" title="回転 テキストボックス内を選択してから押すと囲みます。">autorenew</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('pulse')" title="点滅 テキストボックス内を選択してから押すと囲みます。">flare</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('flip=vertical')" title="上下反転 テキストボックス内を選択してから押すと囲みます。">swap_vert</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('flip=horizontal')" title="左右反転 テキストボックス内を選択してから押すと囲みます。">swap_horiz</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('b')"
title="字(Ctrl+B)テキストボックス内を選択してから押すと囲みます。">format_bold</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('i')"
title="斜字(Ctrl+I)テキストボックス内を選択してから押すと囲みます。">format_italic</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('u')"
title="下線(Ctrl+U)テキストボックス内を選択してから押すと囲みます。">format_underlined</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('s')"
title="取り消し(Ctrl+S)テキストボックス内を選択してから押すと囲みます。">strikethrough_s</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('>','no','yes')"
title="引用">format_quote</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('#','no','yes')"
title="見出し">short_text</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('`','yes','no')"
title="コード挿入 テキストボックス内を選択してから押すと囲みます。">code</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('- ','yes','yes')"
title="箇条書きリスト">format_list_bulleted</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('1. ','yes','yes')"
title="番号付きリスト">format_list_numbered</i>
<i class="pointer setting fa fa-subscript waves-effect"
onclick="markdown('__','yes','no','before')" title="下付き文字 テキストボックス内を選択してから押すと囲みます。"
style="font-size:1.5rem"></i>
<i class="pointer setting fa fa-superscript waves-effect"
onclick="markdown('_','yes','no','before')" title="上付き文字 テキストボックス内を選択してから押すと囲みます。"
style="font-size:1.5rem"></i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('spin')"
title="回転 テキストボックス内を選択してから押すと囲みます。">autorenew</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('pulse')"
title="点滅 テキストボックス内を選択してから押すと囲みます。">flare</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('flip=vertical')"
title="上下反転 テキストボックス内を選択してから押すと囲みます。">swap_vert</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('flip=horizontal')"
title="左右反転 テキストボックス内を選択してから押すと囲みます。">swap_horiz</i>
<span class="sml gray pointer waves-effect">
<a onclick="mdToggle()">Markdownエディタを隠す</a>
</span>
<br>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('size')" title="文字サイズ変更 テキストボックス内を選択してから押すと囲みます。">format_size</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('size')"
title="文字サイズ変更 テキストボックス内を選択してから押すと囲みます。">format_size</i>
<input id="size" style="width: calc(50% - 20px); margin: 0; height: 24px;" value="12">px
<i class="material-icons pointer setting waves-effect" onclick="tagsel('colorhex')" title="文字色変更 テキストボックス内を選択してから押すと囲みます。">color_lens</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('colorhex')"
title="文字色変更 テキストボックス内を選択してから押すと囲みます。">color_lens</i>
<input id="colorhex" style="width: calc(50% - 50px); margin: 0; height: 24px;" type="color">
<br>
<i class="material-icons pointer setting waves-effect" onclick="markdownLink()" title="リンク挿入">link</i>
<input id="linkt" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="リンクテキスト">&nbsp;
<input id="link2" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="リンクアドレス">
<i class="material-icons pointer setting waves-effect" onclick="markdownLink()"
title="リンク挿入">link</i>
<input id="linkt" style="width: calc(50% - 20px); margin: 0; height: 24px;"
placeholder="リンクテキスト">&nbsp;
<input id="link2" style="width: calc(50% - 20px); margin: 0; height: 24px;"
placeholder="リンクアドレス">
<br>
<i class="material-icons pointer setting waves-effect" onclick="markdownImage()" title="インライン画像挿入">image</i>
<input id="image" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="代替テキスト">&nbsp;
<input id="image2" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="画像アドレス">
<i class="material-icons pointer setting waves-effect" onclick="markdownImage()"
title="インライン画像挿入">image</i>
<input id="image" style="width: calc(50% - 20px); margin: 0; height: 24px;"
placeholder="代替テキスト">&nbsp;
<input id="image2" style="width: calc(50% - 20px); margin: 0; height: 24px;"
placeholder="画像アドレス">
</div>
</div>
<div class="input-field col s12" id="preview-field" style="margin-top: 0;">
@@ -115,7 +147,8 @@ var tlid=0;
</div>
<div class="input-field col s12" id="toot-field" style="margin-top: 10px;">
<textarea id="textarea" class="materialize-textarea unmize" style="margin-bottom:0;" data-length="500"></textarea>
<textarea id="textarea" class="materialize-textarea unmize" style="margin-bottom:0;"
data-length="500"></textarea>
<label for="textarea" data-trans="toot">Toot</label>
<br>
<span class="sml gray pointer markdown mize" id="preview-btn">
@@ -126,13 +159,19 @@ var tlid=0;
</span>
</div>
<div class="col s12 mize" style="margin-top: 0; display:flex; justify-content: space-between">
<i class="waves-effect gray material-icons" id="nsfw" title="Mark media as sensitive" onclick="nsfw()">visibility_off</i>
<i class="waves-effect gray material-icons purple-text dropdown-button" data-activates='dropdown1' id="vis-icon">public</i>
<i class="waves-effect gray material-icons" id="nsfw" title="Mark media as sensitive"
onclick="nsfw()">visibility_off</i>
<i class="waves-effect gray material-icons purple-text dropdown-button"
data-activates='dropdown1' id="vis-icon">public</i>
<a class="waves-effect gray" id="cw" onclick="cw()" title="Hide text behind warning">CW</a>
<span><span id="imgup"></span><span id="imgsel"><i class="waves-effect material-icons gray" onclick="fileselect()" title="Attach..">photo_library</i></span></span>
<i class="waves-effect gray material-icons" onclick="emojiToggle()" id="emojibtn" title="Emojis">tag_faces</i>
<i class="waves-effect gray material-icons dropdown-button" data-activates='dropdown2'>more_vert</i>
<i class="material-icons nex gray waves-effect" title="Clear toot box(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i>
<span><span id="imgup"></span><span id="imgsel"><i class="waves-effect material-icons gray"
onclick="fileselect()" title="Attach..">photo_library</i></span></span>
<i class="waves-effect gray material-icons" onclick="emojiToggle()" id="emojibtn"
title="Emojis">tag_faces</i>
<i class="waves-effect gray material-icons dropdown-button"
data-activates='dropdown2'>more_vert</i>
<i class="material-icons nex gray waves-effect" title="Clear toot box(Ctrl+Shit+C)"
data-trans-title="post_box_clear" id="clear">clear</i>
</div>
<div class="col s12 mize" style="margin-bottom:5px; padding:0;">
<div id="taglist"></div>
@@ -145,13 +184,15 @@ var tlid=0;
<br>
<input type="text" id="cw-text" placeholder="Warning text" class="mize" style="margin:0">
<div id="sch-box">Post at<br><span class="sml">2.7.0~ Minimum time gap:5min(clock on the server may not be accurate.)</span><br>
<input type="datetime-local" id="sch-date" placeholder="Scheduled toot" class="datepicker" style="margin:0">
<input type="datetime-local" id="sch-date" placeholder="Scheduled toot" class="datepicker"
style="margin:0">
</div>
</div>
</div>
<!-- 公開範囲 Dropdown Structure -->
<ul id='dropdown1' class='dropdown-content'>
<li style="font-size: 16px; display: block; line-height: 22px; padding: 14px 16px;">Adjust status privacy</li>
<li style="font-size: 16px; display: block; line-height: 22px; padding: 14px 16px;">Adjust status privacy
</li>
<li>
<a onclick="vis('public')">(Public)</a>
</li>
@@ -195,8 +236,11 @@ var tlid=0;
<!--END hidden area-->
</div>
<div id="toot-btn-field">
<button class="btn waves-effect indigo unmize toot-btn-group" onclick="post()" id="toot-post-btn">Toot</button>
<button class="btn waves-effect indigo darken-3 unmize hide toot-btn-group" onclick="sec()" id="toot-sec-btn"><i class="material-icons" id="toot-sec-icon" title="Secondary Toot">lock_open</i></button>
<button class="btn waves-effect indigo unmize toot-btn-group" onclick="post()"
id="toot-post-btn">Toot</button>
<button class="btn waves-effect indigo darken-3 unmize hide toot-btn-group" onclick="sec()"
id="toot-sec-btn"><i class="material-icons" id="toot-sec-icon"
title="Secondary Toot">lock_open</i></button>
</div>
</div>
<div id="right-side">
@@ -205,18 +249,19 @@ var tlid=0;
<div id="emoji" class="hide">
<span class="gray sml">
<a onclick="emojiGet('true')" class="pointer">Refresh emojis list</a>
<i class="material-icons waves-effect" onclick="emojiToggle()" title="Close this box" data-trans-title="post_box_close">cancel</i>
<br>
</span>
<div id="emoji-list" class="" style="">
</div>
<div class="emoji-control center">
<button class="btn waves-effect blue" style="width:30%; padding:0;" onclick="emojiList('before')" id="emoji-before">
<button class="btn waves-effect blue" style="width:30%; padding:0;" onclick="emojiList('before')"
id="emoji-before">
<i class="material-icons">navigate_before</i>
</button>
<span id="emoji-count"></span>/
<span id="emoji-sum"></span>
<button class="btn waves-effect blue" style="width:30%; padding:0;" onclick="emojiList('next')" id="emoji-next">
<button class="btn waves-effect blue" style="width:30%; padding:0;" onclick="emojiList('next')"
id="emoji-next">
<i class="material-icons">navigate_next</i>
</button>
</div>
@@ -251,7 +296,7 @@ var tlid=0;
<i class="material-icons">flag</i>
</a>
<a onclick="faicon()" class="pointer waves-effect" title="faicon" id="faicon-btn">
<i class="fa fa-fort-awesome"></i>
<i class="fab fa-fort-awesome"></i>
</a>
</div>
</div>
@@ -259,12 +304,8 @@ var tlid=0;
<div id="poll" class="hide">
<select id="poll-sel" onchange="pollProviderCk()">
<option value="nothing">Polls: Disabled</option>
<option value="votedon">votedon.</option>
<option value="mastodon-poll">Mastodon(2.8~)</option>
</select>
<div id="votedon" class="poll-provider hide">
WIP
</div>
<div id="mastodon-poll" class="poll-provider hide">
<input type="text" class="mastodon-choice" placeholder="Choice1">
<input type="text" class="mastodon-choice" placeholder="Choice2">
@@ -274,9 +315,9 @@ var tlid=0;
<label for="poll-multiple">Multiple select</label><br>
<input type="checkbox" class="filled-in" id="poll-until" value="1" />
<label for="poll-until">Hide 'votes' count until people vote it.</label><br>
<input type="number" style="width:50px" id="days_poll" placeholder="d" value="0">days
<input type="number" style="width:50px" id="hours_poll" placeholder="h" value="0">hours
<input type="number" style="width:50px" id="mins_poll" placeholder="m" value="0">minutes
<input type="number" style="width:50px" id="days_poll" placeholder="d" value="0">day(s)
<input type="number" style="width:50px" id="hours_poll" placeholder="h" value="0">hour(s)
<input type="number" style="width:50px" id="mins_poll" placeholder="m" value="6">minute(s)
</div>
</div>
</div>
@@ -285,6 +326,27 @@ var tlid=0;
<div id="tootmodal" class="modal modal-fixed-footer">
<div class="modal-content">
<ul class="collapsible" data-collapsible="accordion" id="det-col">
<li class="dm-hide">
<div class="collapsible-header">
<i class="material-icons">people_outline</i>Local TL after this toot)
</div>
<div class="collapsible-body toot-reset" id="ltl-after">
</div>
</li>
<li class="dm-hide">
<div class="collapsible-header">
<i class="material-icons">person_outline</i>User TL before this toot
</div>
<div class="collapsible-body toot-reset" id="user-after">
</div>
</li>
<li class="dm-hide">
<div class="collapsible-header">
<i class="material-icons">language</i>Federated TL after this toot
</div>
<div class="collapsible-body toot-reset" id="ftl-after">
</div>
</li>
<li>
<div class="collapsible-header">
<i class="material-icons">arrow_upward</i>Context before this toot
@@ -330,26 +392,29 @@ var tlid=0;
</li>
<li class="dm-hide">
<div class="collapsible-header">
<i class="text-darken-3 fa fa-retweet"></i>People who boosted it
<i class="text-darken-3 false fas fa-retweet"></i>People who boosted it
</div>
<div class="collapsible-body toot-reset" id="toot-rt">
</div>
</li>
</ul>
<div class="dm-hide">
Use other account(<i class="fa fa-retweet"></i>/<i class="fa fa-star"></i>:unfav and unBT are disabled.)<br>
Use other account(<i class="fas fa-retweet"></i>/<i class="fas fa-star"></i>:unfav and unBT are disabled.)<br>
<div class="row">
<div class="col s6">
<select id="status-acct-sel" class="acct-sel"></select>
</div>
<div class="col s2">
<button class="dropdown-button btn waves-effect" style="width:100%;" onclick="staEx('reply')"><i class="fa fa-share"></i>/button>
<button class="dropdown-button btn waves-effect" style="width:100%;" onclick="staEx('reply')"><i
class="fas fa-share"></i></button>
</div>
<div class="col s2">
<button class="dropdown-button btn waves-effect indigo" style="width:100%;" onclick="staEx('rt')"><i class="fa fa-retweet"></i></button>
<button class="dropdown-button btn waves-effect indigo" style="width:100%;"
onclick="staEx('rt')"><i class="fas fa-retweet"></i></button>
</div>
<div class="col s2">
<button class="dropdown-button btn waves-effect orange" style="width:100%;" onclick="staEx('fav')"><i class="fa fa-star"></i></button>
<button class="dropdown-button btn waves-effect orange" style="width:100%;"
onclick="staEx('fav')"><i class="fas fa-star"></i></button>
</div>
</div>
<div id="toot-tools">
@@ -360,7 +425,6 @@ var tlid=0;
</div>
<div class="modal-footer">
<a href="#!" class="waves-effect waves-green btn-flat dm-hide" onclick="brws()">Open in browser</a>
<a href="#!" class="waves-effect waves-green btn-flat dm-hide" onclick="shot()">Take a screenshot</a>
<a href="#!" class="waves-effect waves-green btn-flat dm-hide" onclick="cbCopy()">Copy URL of this toot</a>
<a href="#!" class="waves-effect waves-green btn-flat dm-hide" onclick="cbCopy('emb')">Embed</a>
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">Close</a>
@@ -372,7 +436,7 @@ var tlid=0;
<div id="his-data-show">
<div class="his-float" id="his-float-data">
<div id="his-basic-prof">
<img src="../../img/loading.svg" id="his-prof">
<img src="../../img/loading.svg" id="his-prof" draggable="false">
<span id="his-name">Loading...</span><span class="gray" id="his-bot"></span>
<br>@
<span id="his-acct"></span><br>
@@ -390,12 +454,16 @@ var tlid=0;
<span class="cbadge" style="max-width:150px; width:150px; ">Since:
<span id="his-since"></span>
</span>
<div id="his-proof-prof"></div>
</div>
<div id="his-des"></div><br>
<div id="his-des" data-acct=""></div><br>
<div id="his-plus-action">
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-emp-btn" onclick="empUser()">Emphasize this user</a>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat only-his-data" id="his-end-btn" onclick="pinUser()">Feature on profile</a><br>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-openin" onclick="profbrws()">Open in browser</a><br>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-emp-btn"
onclick="empUser()">Emphasize this user</a>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat only-his-data"
id="his-end-btn" onclick="pinUser()">Feature on profile</a><br>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-openin"
onclick="profbrws()">Open in browser</a><br>
</div><br>
<div id="his-matching-list">
Get people resembling this user.<br>
@@ -414,10 +482,12 @@ var tlid=0;
<a go="#his-follow-list" title="Follow"><i class="material-icons">people</i></a>
</li>
<li class="custom-tab col my-data-width">
<a go="#his-follower-list" title="Follower"><i class="material-icons">people</i></a>
<a go="#his-follower-list" title="Follower"><i
class="material-icons">people</i></a>
</li>
<li class="custom-tab col my-data-width only-his-data">
<a go="#his-action" title="Cross-account"><i class="material-icons">account_box</i></a>
<a go="#his-action" title="Cross-account"><i
class="material-icons">account_box</i></a>
</li>
<li class="custom-tab col my-data-width only-his-data">
<a go="#his-list" title="List"><i class="material-icons">list</i></a>
@@ -429,43 +499,52 @@ var tlid=0;
<a go="#his-blocking-list" title="Blocks"><i class="material-icons">block</i></a>
</li>
<li class="custom-tab col my-data-width only-my-data">
<a go="#his-blocking-list" title="Blocks"><i class="material-icons">voice_over_off</i></a>
<a go="#his-blocking-list" title="Blocks"><i
class="material-icons">voice_over_off</i></a>
</li>
<li class="custom-tab col my-data-width only-my-data">
<a go="#his-domain-list" title="Domain block"><i class="material-icons">language</i><i class="material-icons">block</i></a>
<a go="#his-domain-list" title="Domain block"><i
class="material-icons">language</i><i class="material-icons">block</i></a>
</li>
<li class="custom-tab col my-data-width only-my-data">
<a go="#his-prof-list" title="Edit profile"><i class="material-icons">create</i></a>
</li>
<li class="custom-tab col my-data-width only-my-data">
<a go="#his-request-list" title="Follow requests"><i class="material-icons">how_to_reg</i></a>
<a go="#his-request-list" title="Follow requests"><i
class="material-icons">how_to_reg</i></a>
</li>
<li class="custom-tab col my-data-width only-my-data">
<a go="#his-follow-recom-list" title="Suggest"><i class="material-icons">recent_actors</i></a>
<a go="#his-follow-recom-list" title="Suggest"><i
class="material-icons">recent_actors</i></a>
</li>
</ul>
</div>
<div id="his-tl" class="tab-content">
<div id="his-tl-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="utl('--now','more')">More</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="utl('--now','more')">More</button>
</div>
<div id="his-follow-list" class="tab-content">
<div id="his-follow-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="flw('--now','more')">More</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="flw('--now','more')">More</button>
</div>
<div id="his-follower-list" class="tab-content">
<div id="his-follower-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="fer('--now','more')">More</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="fer('--now','more')">More</button>
</div>
<div id="his-action" class="tab-content">
Use other account to Follow((Unable to unfollow))<br>
<div style="max-width:500px;"><select id="user-acct-sel" class="acct-sel"></select></div>
<a href="#!" class="waves-effect btn" onclick="follow('selector','true')">Follow</a><br>
or<br>
<a href="#!" class="waves-effect btn" onclick="udgEx('selector', 'selector')">Show profile</a><br>
<a href="#!" class="waves-effect btn"
onclick="udgEx('selector', 'selector')">Show profile</a><br>
</div>
<div id="his-list" class="tab-content">
<div id="his-lists-a">Follow to add this user to lists.</div>
@@ -475,22 +554,26 @@ var tlid=0;
<div id="his-fav-list" class="tab-content">
<div id="his-fav-list-contents" class="cont-series">
</div>
<button class="btn waves-effect" style="width:100%; padding:0;" onclick="showFav('more')">More</button>
<button class="btn waves-effect" style="width:100%; padding:0;"
onclick="showFav('more')">More</button>
</div>
<div id="his-blocking-list" class="tab-content">
<div id="his-blocking-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="showBlo('more')">More</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="showBlo('more')">More</button>
</div>
<div id="his-muting-list" class="tab-content">
<div id="his-muting-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="showMut('more')">More</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="showMut('more')">More</button>
</div>
<div id="his-domain-list" class="tab-content">
<div id="his-domain-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="showDom('more')">More</button>Add blocking domain
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="showDom('more')">More</button>Add blocking domain
<br>
<input type="text" placeholder="example.com" id="domainblock">
<button class="btn waves-effect" onclick="addDomainblock()">Add</button>
@@ -505,7 +588,8 @@ var tlid=0;
<textarea placeholder="Note" id="his-des-val" class="materialize-textarea"></textarea>
<label for="his-des-val">Note</label>
</div>
<button class="btn waves-effect" style="width:100%; padding:0;" onclick="profedit()">Save</button>
<button class="btn waves-effect" style="width:100%; padding:0;"
onclick="profedit()">Save</button>
<br>Change avataor:
<span id="prof-change">
<input type="file" onchange="imgChange(this,'avatar')">
@@ -518,20 +602,28 @@ var tlid=0;
<div id="his-request-list" class="tab-content">
<div id="his-request-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="showReq('more')">More</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="showReq('more')">More</button>
</div>
<div id="his-follow-recom-list" class="tab-content">
<div id="his-follow-recom-contents" class="cont-series">
</div>
</div>
</div>
<div class="his-float" id="his-float-blocked">
<div>You are blocked. Why?</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="modal-action waves-effect waves-green btn-flat" id="his-history-btn" onclick="historyShow()">Back</button>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-follow-btn" onclick="follow()">Follow</a>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-mute-btn" onclick="mute()">Mute</a>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-block-btn" onclick="block()">Block</a>
<button class="modal-action waves-effect waves-green btn-flat" id="his-history-btn"
onclick="historyShow()">Back</button>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-follow-btn"
onclick="follow()">Follow</a>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-mute-btn"
onclick="mute()">Mute</a>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-block-btn"
onclick="block()">Block</a>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" onclick="hisclose()">Close</a>
</div>
</div>
@@ -583,39 +675,49 @@ var tlid=0;
<a href="https://thedesk.top" target="_blank">HP</a><br>
<a href="https://github.com/cutls/TheDesk" target="_blank">GitHub</a><br>
<br>
<div id="release-Usamin_18-1-1" class="release-do" style="display:none; ">
<div id="release-Usamin_18-5-0" class="release-do" style="display:none; ">
<a href="https://code.cutls.com/thedesk-log/" target="_blank">開発の経緯</a><br>
<a href="https://ja.mstdn.wiki/TheDesk" target="_blank">機能一覧</a><br>
Entyでは支援者様限定で様々なTheDeskに関する記事をご覧いただけます。<br>
Pixiv Fanboxでは支援者様限定で様々なTheDeskに関する記事をご覧いただけます。最低月一更新。<br>
困ったときは、<a href="https://docs.thedesk.top">TheDesk Docs</a>をご覧ください。
<h5>Release Note Usamin (18.1.1)</h5>
・お知らせ機能改善<br>
・Integrated TLで一部挙動改善(Thanks to <a href="https://www.kr-kp.com/">kPherox</a>)<br>
--以下18.1.0--<br>
・iTunes NowPlaying(macOS)にアルバムアートワークを付ける(Thanks to <a href="https://www.kr-kp.com/">kPherox</a>)<br>
・カラムを<b>縦に並べられる</b>ように(2つ目以降のカラム毎の設定の「左に重ねる」「右に出す」を押す)<br>
・画像を個別に削除する(画像をクリックして)<br>
・何個もアルバムアートワークが投稿されるバグを修正<br>
・Misskeyでログインしたまま何もできないバグを修正(権限回り)
<h5>Release Note Usamin (18.5.0)</h5>
・macOSでのアップデータについて修正。<br>
・本来不要なところにフォロリク許可画面が出るようになっていたのを修正。<br>
・不明なメディアに対するリンクを表示します。<br>
・PleromaでのVideoの挙動について修正しました。<br>
・Patreonでの支援を開始しました。<br>
・アスタルテの新しいBBCodeに対応しました。<br>
・タイムライン下の方が切れてしまう不具合の修正<br>
・通知をユーザーごとにフィルターする機能(最新のMastodonのみ)。<br>
・Electron 5.0.1になりました。<br>
<br>
<h5>ThinkingDeskラベル</h5>
<img src="../../img/thinkingdesk.png" style="width:100px;" draggable="false"><br>
手作りマットラベル。貼ってはがせる。300円なのでポイントの余りでどうぞ。<br>
<a href="https://item.mercari.com/jp/m822743330" target="_blank">メルカリ</a>へ。
</div>
<div id="release-en">
<div id="release-en" style="display:none">
<h5>Let's make it native!</h5>
<a href="https://translate.thedesk.top">Crowdin translation project</a>
</div>
<br><br>
<h3>Support TheDesk!</h3>
TheDesk has no ad, you need no charge to unlock premium features. We need your friendly support!<br>
<a class="btn-share btn waves-effect waves-light purple lighten-2" href="https://enty.jp/Cutls" target="_blank">
Support on Enty
</a>
<a class="btn-share btn waves-effect waves-light red lighten-2" href="https://www.pixiv.net/fanbox/creator/28105985" target="_blank">
<a class="btn-share btn waves-effect waves-light red lighten-2"
href="https://www.pixiv.net/fanbox/creator/28105985" target="_blank">
Support on Pixiv FANBOX
</a>
<a class="btn-share btn waves-effect waves-light blue" href="https://www.amazon.co.jp/registry/wishlist/2TV35ZHHJPDSB" target="_blank">
<a class="btn-share btn waves-effect waves-light red darken-2"
href="https://www.patreon.com/cutls" target="_blank">
Support on Patreon
</a>
<a class="btn-share btn waves-effect waves-light blue"
href="https://www.amazon.co.jp/registry/wishlist/2TV35ZHHJPDSB" target="_blank">
Amazon Wish List
</a>
<br>
Give me Amazon Gift Card:<a href="mailto:mstdn@thedesk.top" target="_blank">mstdn@thedesk.top</a><br>
Give me Amazon Gift Card:<a href="mailto:web-pro@cutls.com"
target="_blank">web-pro@cutls.com</a><br>
Kyash<br>
<img src="../../img/kyash.png" width="100"><br>
</div>
@@ -639,13 +741,20 @@ var tlid=0;
</span>
<div id="menu-wrapper">
<div id="left-menu">
<div class="waves-effect active" onclick="addColumnMenu()" id="addColumnMenu"><i class="material-icons">add</i><span>Add a column</span></div>
<div class="waves-effect" onclick="sortMenu()" id="sortMenu"><i class="material-icons">sort</i><span>Sort</span></div>
<div class="waves-effect" onclick="searchMenu()" id="searchMenu"><i class="material-icons">search</i><span>Search</span></div>
<div class="waves-effect" onclick="listMenu()" id="listMenu"><i class="material-icons">view_headline</i><span>List</span></div>
<div class="waves-effect" onclick="filterMenu()" id="filterMenu"><i class="material-icons">filter_list</i><span>Filter</span></div>
<div class="waves-effect" onclick="help()"><i class="material-icons">help_outline</i><span>Help</span></div>
<div class="waves-effect" onclick="location.href='index.html'"><i class="material-icons">refresh</i><span>Reload TL</span></div>
<div class="waves-effect active" onclick="addColumnMenu()" id="addColumnMenu"><i
class="material-icons">add</i><span>Add a column</span></div>
<div class="waves-effect" onclick="sortMenu()" id="sortMenu"><i
class="material-icons">sort</i><span>Sort</span></div>
<div class="waves-effect" onclick="searchMenu()" id="searchMenu"><i
class="material-icons">search</i><span>Search</span></div>
<div class="waves-effect" onclick="listMenu()" id="listMenu"><i
class="material-icons">view_headline</i><span>List</span></div>
<div class="waves-effect" onclick="filterMenu()" id="filterMenu"><i
class="material-icons">filter_list</i><span>Filter</span></div>
<div class="waves-effect" onclick="help()"><i
class="material-icons">help_outline</i><span>Help</span></div>
<div class="waves-effect" onclick="location.href='index.html'"><i
class="material-icons">refresh</i><span>Reload TL</span></div>
</div>
<div id="right-menu">
<!--カラム追加-->
@@ -660,24 +769,50 @@ var tlid=0;
<input type="hidden" value="local" id="type-sel">
Show this TL:
<div id="tltype">
<div class="type waves-effect active" data-type="local"><div><i class="material-icons">people_outline</i></div><span>Local</span></div>
<div class="type waves-effect" data-type="local-media"><div><i class="material-icons">people_outline</i><i class="material-icons sub-icon">perm_media</i></div><span>Local(Media)</span></div>
<div class="type waves-effect" data-type="home"><div><i class="material-icons">home</i></div><span>Home</span></div>
<div class="type waves-effect" data-type="pub"><div><i class="material-icons">language</i></div><span>Federated</span></div>
<div class="type waves-effect" data-type="pub-media"><div><i class="material-icons">language</i><i class="material-icons sub-icon">perm_media</i></div><span>Federated(Media)</span></div>
<div class="type waves-effect" data-type="dm"><div><i class="material-icons">mail_outline</i></div><span>Direct Message</span></div>
<div class="type waves-effect" data-type="mix"><div><i class="material-icons">merge_type</i></div><span>Integrated(Local/Home)</span></div>
<div class="type waves-effect" data-type="plus"><div><i class="material-icons">merge_type</i><i class="material-icons sub-icon">reply</i></div><span>LTL+Reply+BT</span></div>
<div class="type waves-effect" data-type="notf"><div><i class="material-icons">notifications</i></div><span>Notifications</span></div>
<div class="type waves-effect active" data-type="local">
<div><i class="material-icons">people_outline</i></div><span>Local</span>
</div>
<div class="type waves-effect" data-type="local-media">
<div><i class="material-icons">people_outline</i><i
class="material-icons sub-icon">perm_media</i>
</div><span>Local(Media)</span>
</div>
<div class="type waves-effect" data-type="home">
<div><i class="material-icons">home</i></div><span>Home</span>
</div>
<div class="type waves-effect" data-type="pub">
<div><i class="material-icons">language</i></div><span>Federated</span>
</div>
<div class="type waves-effect" data-type="pub-media">
<div><i class="material-icons">language</i><i
class="material-icons sub-icon">perm_media</i></div>
<span>Federated(Media)</span>
</div>
<div class="type waves-effect" data-type="dm">
<div><i class="material-icons">mail_outline</i></div><span>Direct Message</span>
</div>
<div class="type waves-effect" data-type="mix">
<div><i class="material-icons">merge_type</i></div><span>Integrated(Local/Home)</span>
</div>
<div class="type waves-effect" data-type="plus">
<div><i class="material-icons">merge_type</i><i
class="material-icons sub-icon">reply</i></div>
<span>LTL+Reply+BT</span>
</div>
<div class="type waves-effect" data-type="notf">
<div><i class="material-icons">notifications</i></div><span>Notifications</span>
</div>
</div>
</div>
<div id="noauth" class="hide">Show this TL:
<input id="noauth-url" type="text" class="validate" style="width:calc( 70% - 40px);" placeholder="e.g:mstdn.jp">
<input id="noauth-url" type="text" class="validate" style="width:calc( 70% - 40px);"
placeholder="e.g:mstdn.jp">
</div>
<div id="webview-add" class="hide">TweetDeck with customed TJDeck(<a href='https://gist.github.com/cutls/8787a55d2c1c53274e68a427966046a6' target='_blank'>Code</a>/<a href='https://gist.github.com/totoraj930/d1394dadb51d75666a76829f61e7280c' target='_blank'>TJDeck</a>). Keyboard shortcuts will irritate you. When you feel so, you check 'Prefer WebView' on top of the column.
</div>
</div>
<button class="btn waves-effect blue " style="width:calc( 100% - 10px);" onclick="addColumn()" data-trans-i="add">
<button class="btn waves-effect blue " style="width:calc( 100% - 10px);" onclick="addColumn()"
data-trans-i="add">
<i class="material-icons left">add</i>Add
</button>
<br>
@@ -687,12 +822,13 @@ var tlid=0;
<div id="src-box" class="hide menu-content">
<div class="input-field">
<select id="src-acct-sel" class="acct-sel" onchange="trend()"></select>
</div><div class="input-field">
<i class="material-icons prefix">search</i>
<input id="src" type="text" class="validate" style="width:calc( 60% - 40px);">
</div>
<div class="input-field">
<input id="src" type="text" class="validate" style="width:60%">
<label for="src" data-trans="src">Search</label>
<button class="btn waves-effect indigo" style="width:calc( 40% - 40px);" onclick="src()" data-trans-i="src">
<i class="material-icons left">search</i>Search
<button class="btn waves-effect indigo" style="width: 36%;padding: 0;padding-left: 15px;"
onclick="src()" data-trans-i="src">
<i class="material-icons left" style="margin:0">search</i>Search
</button>
<br>
<br>
@@ -706,7 +842,7 @@ var tlid=0;
<div id="sort-box" class="hide menu-content">
<ul id="sort"></ul>
<div>
<button onclick="sort()" class="btn waves-effect nex" style="width:100%; max-width:300px;" data-trans-i="sort">
<button onclick="sort()" class="btn waves-effect nex" style="width:97.5%;" data-trans-i="sort">
<i class="material-icons left">sort</i>Sort
</button>
</div>
@@ -718,7 +854,8 @@ var tlid=0;
<label>Account(Scroll to show all)</label>
</div>
<div style="float:left; padding-top:8px; padding-bottom:28px;">
<button class="btn waves-effect indigo" style="width:80px;" onclick="list()" data-trans-i="lists">
<button class="btn waves-effect indigo" style="width:80px;" onclick="list()"
data-trans-i="lists">
List
</button>
</div>
@@ -735,7 +872,8 @@ var tlid=0;
<label>Account(Scroll to show all)</label>
</div>
<div style="float:left; padding-top:8px; padding-bottom:28px;">
<button class="btn waves-effect indigo" style="width:80px;" onclick="filter()" data-trans-i="filters">
<button class="btn waves-effect indigo" style="width:80px;" onclick="filter()"
data-trans-i="filters">
List
</button>
</div>
@@ -759,10 +897,18 @@ var tlid=0;
<label for="except_filter">Drop instead of hide</label><br>
<span class="sml">Filtered toots will disappear irreversibly, even if filter is later removed</span><br>
Expire after<span class="sml">Unset or "0" means "Never"<b>This value may contain some error</b></span><br><br>
<input type="number" style="width:50px" id="days_filter" placeholder="d" value="0">days
<input type="number" style="width:50px" id="hours_filter" placeholder="h" value="0">hours
<input type="number" style="width:50px" id="mins_filter" placeholder="m" value="0">minutes
<button class="btn waves-effect" style="width:120px;" onclick="makeNewFilter()" id="add-filter-btn">Add</button><br>
<input type="number" style="width:50px" id="days_filter" placeholder="d" value="0">day(s)
<input type="number" style="width:50px" id="hours_filter" placeholder="h" value="0">hour(s)
<input type="number" style="width:50px" id="mins_filter" placeholder="m" value="0">minute(s)<br>
Quick:<a onclick="filterTime(0,0,30)" class="pointer">30minute(s)</a>/
<a onclick="filterTime(0,1,0)" class="pointer">1hour(s)</a>/
<a onclick="filterTime(0,6,0)" class="pointer">6hour(s)</a>/
<a onclick="filterTime(0,12,0)" class="pointer">12hour(s)</a>/
<a onclick="filterTime(1,0,0)" class="pointer">1day(s)</a>/
<a onclick="filterTime(7,0,0)" class="pointer">7day(s)</a>/
<a onclick="filterTime(0,0,0)" class="pointer">Never</a><br>
<button class="btn waves-effect" style="width:120px;" onclick="makeNewFilter()"
id="add-filter-btn">Add</button><br>
<span class="sml">Integrated TL/Plus TL will hide both Home-filtering words and Local-filtering words.</span>
</div>
</div>
@@ -772,12 +918,18 @@ var tlid=0;
</a>&nbsp;|&nbsp;
<a onclick="bottomReverse()" class="nex waves-effect">
<i class="material-icons" style="font-size: 1rem;">swap_horiz</i>Toot button layout reverse
</a>&nbsp;|&nbsp;
<a onclick="openRN()" class="nex waves-effect">
<i class="material-icons" style="font-size: 1rem;">new_releases</i>Release Note
</a>
</div>
<div id="main">
<!--TLのTL-->
<div id="timeline-container">
<h3>Welcome to TheDesk</h3><br><a href="acct.html">Add an account</a> or click <i class="material-icons">apps</i> to add a column.
<div id="something-wrong">
<img src="" style="width:150px;margin:5px;display:none;" draggable="false">
<div>Internal error: please clear all data(at setting page) <b>All data will be deleted.</b></div>
</div>
</div>
</div>
</div>
@@ -785,8 +937,10 @@ var tlid=0;
<div id="bottom" class="reverse">
<div class="leftside reverse">
<div id="dambox">
<button id="posttgl" class="btn waves-effect indigo" style="width: 100%;height: 2.5rem;line-height: 0;margin: 0;">
<i class="material-icons" style="position: relative; top: 5px; font-size: 1.5rem; text-align: center; margin-right: 10px;">edit</i>Toot
<button id="posttgl" class="btn waves-effect indigo"
style="width: 100%;height: 2.5rem;line-height: 0;margin: 0;">
<i class="material-icons"
style="position: relative; top: 5px; font-size: 1.5rem; text-align: center; margin-right: 10px;">edit</i>Toot
</button>
</div>
<div class="leftside reverse" id="group">
@@ -798,13 +952,16 @@ var tlid=0;
<i class="material-icons nex" title="Preferences(Ctrl+Shift+S)">settings</i>
</a>
<a onclick="nano()" class="nex waves-effect">
<i class="material-icons" title="The smallest Mastodon,TheDesk Nano" data-trans-title="nano_desp">remove_from_queue</i>
<i class="material-icons" title="The smallest Mastodon,TheDesk Nano"
data-trans-title="nano_desp">remove_from_queue</i>
</a>
<a onclick="menu()" class="nex waves-effect" id="list-tgl">
<i class="material-icons" title="List">apps</i>
</a>
<span id="fukidashi"><- Add TL</span>
</div>
</div>
</div>
</div></div>
<div>
<div id="tips-menu">
<div class="btnsgroup" style="height:34px"><span class="grouptitle">Tips:</span>
@@ -821,7 +978,7 @@ var tlid=0;
<i class="material-icons nex" title="アイマストドントレンド" data-trans-title="trendtip">whatshot</i>
</a>
<a onclick="tips('spotify')" class="nex waves-effect">
<i class="fa fa-spotify nex" title="Spotify" data-trans-title="spotifytips"></i>
<i class="fab fa-spotify nex" title="Spotify" data-trans-title="spotifytips"></i>
</a>
</div>
</div>
@@ -860,6 +1017,7 @@ var tlid=0;
<script type="text/javascript" src="../../js/tl/speech.js"></script>
<script type="text/javascript" src="../../js/ui/post-box.js"></script>
<script type="text/javascript" src="../../js/ui/layout.js"></script>
<script type="text/javascript" src="../../js/post/emoji.js"></script>
<script type="text/javascript" src="../../js/login/instance.js"></script>
<script type="text/javascript" src="../../js/login/login.js"></script>
<script type="text/javascript" src="../../js/ui/img.js"></script>
@@ -873,7 +1031,6 @@ var tlid=0;
<script type="text/javascript" src="../../js/post/img.js"></script>
<script type="text/javascript" src="../../js/post/status.js"></script>
<script type="text/javascript" src="../../js/post/misskeystatus.js"></script>
<script type="text/javascript" src="../../js/post/emoji.js"></script>
<script type="text/javascript" src="../../js/post/suggest.js"></script>
<script type="text/javascript" src="../../js/post/bb-md.js"></script>
<script type="text/javascript" src="../../js/userdata/showOnTL.js"></script>

View File

@@ -15,7 +15,7 @@
<script type="text/javascript" src="../../js/platform/first.js"></script>
<script type="text/javascript" src="../../js/common/materialize.js"></script>
<a href="setting.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;"><i class="material-icons left">undo</i>Back</a>
LICENSE of TheDesk:<a href="https://github.com/cutls/TheDesk/blob/master/LICENSE.md">TheDesk LICENSE (Latest Ver.)</a><br>
LICENSE of TheDesk:<a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">TheDesk LICENSE (Latest Ver.)</a><br>
<article style="width:500px; max-width:100%; margin:15px; font-family:Arial,Helvetica">
<h5>TheDesk</h5>
<i class="fa fa-github"></i><a href="https://github.com/cutls/TheDesk" target="_blank">cutls/TheDesk</a><br>

View File

@@ -1,5 +1,6 @@
<!doctype html>
<html lang="en">
<html lang="en" style="overflow:scroll">
<head>
<title>Settings - TheDesk</title>
<!--
@@ -17,8 +18,17 @@
<link href='../../css/font-awesome.css' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
<meta charset="utf-8">
<style>input{max-height:50px!important} .pcr-result{height:1rem !important;}</style>
<style>
input {
max-height: 50px !important
}
.pcr-result {
height: 1rem !important;
}
</style>
</head>
<body id="mainView" style="overflow-y:scroll">
<script type="text/javascript" src="../../js/common/jquery.js"></script>
<script type="text/javascript" src="../../js/platform/first.js"></script>
@@ -37,36 +47,45 @@
<div class="collapsible-body">
<h5>Languages</h5>
To translate with Crowdin, you have to login Crowdin and restart TheDesk when login is finished.<br>
<a href="../ja/setting.html" onclick="changelang('ja')">日本語(Japanese)</a>/<a href="../en/setting.html" onclick="changelang('en')">English</a>/<a href="../ps/setting.html" onclick="changelang('ps')">Crowdin web translate</a>/
<a onclick="changelang('ja')" class="pointer" style="margin-right:5px;">日本語</a><a onclick="changelang('en')" class="pointer" style="margin-right:5px;">English</a><a onclick="changelang('ps')" class="pointer" style="margin-right:5px;">Crowdin translate system(beta)</a>
<h5>Import and export of preferences</h5>
<button onclick="exportSettings()" class="btn waves-effect lime darken-3" style="width:100%; max-width:200px;">Export</button>
<button onclick="importSettings()" class="btn waves-effect cyan darken-3" style="width:100%; max-width:200px;">Import</button>
<button onclick="exportSettings()" class="btn waves-effect lime darken-3"
style="width:100%; max-width:200px;">Export</button>
<button onclick="importSettings()" class="btn waves-effect cyan darken-3"
style="width:100%; max-width:200px;">Import</button>
<div id="envView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.id=='notf'"><a onclick="notftest()" class="pointer">Notification test</a><br></template>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.id=='notf'"><a onclick="notftest()"
class="pointer">Notification test</a><br></template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue" type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue"
type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<label v-bind:for="item.id+check.value">{{check.text}}</label>
</template>
</template>
<template v-else>
<template v-if="item.doubleText">
<template v-for="(textbox, j) in item.data">
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id" v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id"
v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
</template>
</template>
<template v-else>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id" v-bind:style="{ width: item.width+'px'}"/>{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;" v-on:click="complete(i)">Change</button>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id"
v-bind:style="{ width: item.width+'px'}" />{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;"
v-on:click="complete(i)">Change</button>
</template><br>
</template>
</div>
<h5>Font</h5>
Select your favorite font to 'Select'<br>
Select your favorite font to 'Select'(Windows/ macOS only)<br>
<button class="btn waves-effect" style="width:100px;" onclick="font()">Select</button><br>
<div id="fonts" class="hide" style="overflow-y:scroll; width:300px; height:500px;"></div>
<br>
@@ -109,40 +128,52 @@
<h5>Name</h5>
<input type="text" style="width:300px" id="custom_name" placeholder="Name...">
<h5>About this theme</h5>
<div class="input-field"><textarea style="width:300px" id="custom_desc" class="materialize-textarea" placeholder="About this theme..."></textarea></div>
<div class="input-field"><textarea style="width:300px" id="custom_desc" class="materialize-textarea"
placeholder="About this theme..."></textarea></div>
<h5>Color scheme</h5>
<input class="with-gap" name="derection" type="radio" id="dark" value="dark" checked="true" />
<input class="with-gap" name="direction" type="radio" id="dark" value="dark" checked="true" />
<label for="dark">Dark</label>
<input class="with-gap" name="derection" type="radio" id="light" value="light" />
<input class="with-gap" name="direction" type="radio" id="light" value="light" />
<label for="light">Light</label>
<div id="pickers">
<div>
<h5>Primary</h5>Background of components
<div id="color-picker0-wrap"><div class="color-picker" id="color-picker0"></div></div>
<div id="color-picker0-wrap">
<div class="color-picker" id="color-picker0"></div>
</div>
<input type="hidden" id="color-picker0_value">
</div>
<div>
<h5>Secondary</h5>Background color
<div id="color-picker1-wrap"><div class="color-picker" id="color-picker1"></div></div>
<div id="color-picker1-wrap">
<div class="color-picker" id="color-picker1"></div>
</div>
<input type="hidden" id="color-picker1_value">
</div>
<div>
<h5>Texts</h5>Text color
<div id="color-picker2-wrap"><div class="color-picker" id="color-picker2"></div></div>
<div id="color-picker2-wrap">
<div class="color-picker" id="color-picker2"></div>
</div>
<input type="hidden" id="color-picker2_value">
</div>
<div>
<h5>Accent</h5>Background of boosts
<div id="color-picker3-wrap"><div class="color-picker" id="color-picker3"></div></div>
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
</div>
</div>
<button class="btn-large waves-effect" onclick="customComp()">Change</button>&nbsp;<button class="btn waves-effect red disabled" id="delTheme" onclick="deleteIt()">Delete</button><br><br>
<input type="text" style="width:300px" id="custom_json" class="materialize-textarea" placeholder="JSON style" readonly><br>
<button class="btn-large waves-effect" onclick="customComp()">Change</button>&nbsp;<button
class="btn waves-effect red disabled" id="delTheme" onclick="deleteIt()">Delete</button><br><br>
<input type="text" style="width:300px" id="custom_json" class="materialize-textarea"
placeholder="JSON style" readonly><br>
Share this code with other TheDesk. Do not share this code with MiAS.
<h4>Import of custom themes</h4>
Get more themes on <a href="https://assets.msky.cafe/" target="_blank">MiAS</a><br>
<input type="text" style="width:300px" id="custom_import" class="materialize-textarea" placeholder="JSON/JSON5 style">
<input type="text" style="width:300px" id="custom_import" class="materialize-textarea"
placeholder="JSON/JSON5 style">
<button class="btn waves-effect" onclick="customImp()">Import</button><br>
</li>
<li>
@@ -153,26 +184,41 @@
<div id="tlView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
{{item.text.desc}}<br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue" type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue"
type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<label v-bind:for="item.id+check.value">{{check.text}}</label>
</template>
</template>
<template v-else>
<template v-if="item.doubleText">
<template v-for="(textbox, j) in item.data">
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id" v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id"
v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
</template>
</template>
<template v-else>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id" v-bind:style="{ width: item.width+'px'}"/>{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;" v-on:click="complete(i)">Change</button>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id"
v-bind:style="{ width: item.width+'px'}" />{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;"
v-on:click="complete(i)">Change</button>
</template><br>
</template>
</div>
<h5>Custom sound</h5>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(1)">Custom 1</button><span
id="c1-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(2)">Custom 2</button><span
id="c2-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(3)">Custom 3</button><span
id="c3-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(4)">Custom 4</button><span
id="c4-file"></span><br>
</div>
</li>
<li>
@@ -183,11 +229,14 @@
<div id="postView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
{{item.text.desc}}<br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
<template v-if="!check.kirishima || (check.kirishima && kirishima)">
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue" type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue"
type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<label v-bind:for="item.id+check.value">{{check.text}}</label>
<span v-if="check.kirishimaText">{{check.kirishimaText}}</span>
</template>
@@ -196,14 +245,17 @@
<template v-else>
<template v-if="item.doubleText">
<template v-for="(textbox, j) in item.data">
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id" v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id"
v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
</template>
</template>
<template v-else>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id" v-bind:style="{ width: item.width+'px'}"/>{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;" v-on:click="complete(i)">Change</button>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id"
v-bind:style="{ width: item.width+'px'}" />{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;"
v-on:click="complete(i)">Change</button>
</template><br>
</template>
</div>
</div>
@@ -270,9 +322,14 @@
Click <i class="material-icons" style="font-size:24px;">music_note</i>icon to NowPlaying<br>
<h5>Account Connection</h5>
TheDesk save your data on thedesk.top server.<br>
<div id="spotify-code-show" class="hide"><input type="text" id="spotify-code"><button onclick="spotifyAuth()" class="btn waves-effect" style="width:100px;">Save</button></div>
<a onclick="spotifyConnect()" class="btn waves-effect nex" style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-enable"><i class="fa fa-spotify left"></i>Connect</a>
<a onclick="spotifyDisconnect()" class="btn waves-effect nex disabled" style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-disable"><i class="fa fa-spotify left"></i>Disconnect</a>
<div id="spotify-code-show" class="hide"><input type="text" id="spotify-code"><button
onclick="spotifyAuth()" class="btn waves-effect" style="width:100px;">Save</button></div>
<a onclick="spotifyConnect()" class="btn waves-effect nex"
style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-enable"><i
class="fa fa-spotify left"></i>Connect</a>
<a onclick="spotifyDisconnect()" class="btn waves-effect nex disabled"
style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-disable"><i
class="fa fa-spotify left"></i>Disconnect</a>
<h5>Edit a template</h5>
<br>
<textarea id="np-temp" class="materialize-textarea" data-length="500">#NowPlaying {song} / {album} / {artist}
@@ -280,11 +337,8 @@
Spotify:{song}:Song name/{album}:Album name/{artist}:Artist name/{url}:URL to Spotify<br>
macOS:{song}:Song name/{album}:Album name/{artist}:Artist name/composer:{composer}/spampling rate:{hz}/bit rate:{bitRate}/genre:{genre}<br>
Windows:{song}:Song name/{album}:Album name/{artist}:Artist name<br>
<span class="imas hide">CINDERELLA NowPlaying(imastodon.net限定)では作曲家{composer}/作詞家{lyricist}/BPM{bpm}が有効です。<br>
CINDERELLA NowPlayingはimastodon.netにログインしているとき、トゥート欄に「//」を入力し、その後に曲名を入れることで可能です。</span><br>
<button onclick="spotifySave()" class="btn waves-effect" style="width:100px;">Save</button>
<h5>Attach an Artwork of Spotify</h5>
<span class="imas hide">この設定はCINDERELLA NowPlaying(imastodon.net限定)にも適用されます。</span><br>
<input class="with-gap" onchange="spotifyFlagSave()" name="awk" type="radio" id="awk_yes" value="yes" />
<label for="awk_yes">Yes</label>
<input class="with-gap" onchange="spotifyFlagSave()" name="awk" type="radio" id="awk_no" value="no" />
@@ -299,23 +353,28 @@
<div class="collapsible-body">
<h5>Speed</h5>
1-100(default:10)<br>
<p class="range-field"><input type="range" id="voicespeed" min="1" max="100" value="10" style="width:500px; max-width:100%"/></p>
<p class="range-field"><input type="range" id="voicespeed" min="1" max="100" value="10"
style="width:500px; max-width:100%" /></p>
<h5>Pitch</h5>
0-100(default:50)<br>
<p class="range-field"><input type="range" id="voicepitch" min="0" max="100" value="50" style="width:500px; max-width:100%"/></p>
<p class="range-field"><input type="range" id="voicepitch" min="0" max="100" value="50"
style="width:500px; max-width:100%" /></p>
<h5>Volume</h5>
0-100(default:100)<br>
<p class="range-field"><input type="range" id="voicevol" min="0" max="100" value="100" style="width:500px; max-width:100%"/></p>
<p class="range-field"><input type="range" id="voicevol" min="0" max="100" value="100"
style="width:500px; max-width:100%" /></p>
<h5>Test</h5>
<input type="text" style="width:350px" id="voicetxt" value="TheDesk is an open-source Mastodon client for PC.">
<button class="btn waves-effect blue" style="width:150px;" onclick="voicePlay()" id="testplay">Play/Stop</button><br>
<button class="btn waves-effect blue" style="width:150px;" onclick="voicePlay()"
id="testplay">Play/Stop</button><br>
<br>
<button class="btn waves-effect" style="width:100px;" onclick="voiceSettings()">Save</button>
</div>
</li>
</ul>
<br>
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;"><i class="material-icons left">undo</i>Back</a>
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;"><i
class="material-icons left">undo</i>Back</a>
<br>
<br>Keyboard shortcuts
<li>Ctrl+1-9:Jump to n(1-9)th column</li>
@@ -346,23 +405,36 @@
<a href="https://astarte.thedesk.top">アスタルテ暇人ランキング</a>を開く
</li><br>
</div>
<button class="btn waves-effect red" style="width:100%; max-width:500px;" onclick="if(confirm('Delete all data. You cannot undo. Continue?')){ localStorage.clear(); location.href='index.html'; }"><i class="material-icons left">delete</i>Reset(Danger)</button><br><br>
<button class="btn waves-effect indigo" onclick="about()" style="width:100%; max-width:500px;"><i class="material-icons left">info</i>About TheDesk</button>
<a href="https://thedesk.top" class="btn waves-effect deep-purple lighten-2" style="width:100%; max-width:500px;"><i class="material-icons left">web</i>Website</a>
<a href="https://enty.jp/Cutls" class="btn waves-effect purple lighten-2" style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>Support(Enty)</a>
<a href="https://www.pixiv.net/fanbox/creator/28105985" class="btn waves-effect red lighten-2" style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>Support(Pixiv FANBOX)</a>
<a href="https://docs.thedesk.top" class="btn waves-effect blue darken-2" style="width:100%; max-width:500px;"><i class="material-icons left">list</i>Help/Docs(Constructing)</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2" style="width:100%; max-width:500px;"><i class="fa fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@kirishima.cloud" class="btn waves-effect blue lighten-2" style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25" style="padding-top:5px;">Developer: Cutls@kirishima.cloud</a>
<button class="btn waves-effect red" style="width:100%; max-width:500px;"
onclick="if(confirm('Delete all data. You cannot undo. Continue?')){ localStorage.clear(); location.href='index.html'; }"><i
class="material-icons left">delete</i>Reset(Danger)</button><br><br>
<button class="btn waves-effect indigo" onclick="about()" style="width:100%; max-width:500px;"><i
class="material-icons left">info</i>About TheDesk</button>
<a href="https://thedesk.top" class="btn waves-effect deep-purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">web</i>Website</a>
<a href="https://www.pixiv.net/fanbox/creator/28105985" class="btn waves-effect red lighten-2"
style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>Support(Pixiv FANBOX)</a>
<a href="https://www.patreon.com/cutls" class="btn waves-effect red darken-2"
style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>Support(Patreon)</a>
<a href="https://docs.thedesk.top" class="btn waves-effect blue darken-2" style="width:100%; max-width:500px;"><i
class="material-icons left">list</i>Help/Docs(Constructing)</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2"
style="width:100%; max-width:500px;"><i class="fa fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@cutls.com" class="btn waves-effect blue lighten-2"
style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25"
style="padding-top:5px;">Developer: Cutls@cutls.com</a>
<br>
Kyash<br>
<img src="../../img/kyash.png" width="100"><br>
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';" class="pointer">Check update</a><br>
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';"
class="pointer">Check update</a><br>
<a href="oss.html">OSS License</a><br>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018 All Rights Reserved.
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy Policy</a>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a
href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy
Policy</a>
<br>Developer: Cutls P(
<a href="index.html?mode=user&code=Cutls@kirishima.cloud">@Cutls@kirishima.cloud</a>)
<a href="index.html?mode=user&code=Cutls@cutls.com">@Cutls@cutls.com</a>)
<br>
</span><br>
TheDeskおよびCutls Pは<a href="https://donken.org/">被災地支援のためのマストドン研究会</a>をログイン機能提供等の形で応援しています。<br>

View File

@@ -7,6 +7,27 @@ var yesno=[
value: "no"
}
];
var sound = [
{
text: "None",
value: "none"
}, {
text: "Default",
value: "default"
}, {
text: "Custom 1",
value: "c1"
}, {
text: "Custom 2",
value: "c2"
}, {
text: "Custom 3",
value: "c3"
}, {
text: "Custom 4",
value: "c4"
}
];
var envConstruction = [
{
id: "popup",
@@ -286,6 +307,46 @@ var tlConstruction=[
desc: "",
checkbox: yesno
}
}, {
id: "replySound",
storage: "replySound",
checkbox: true,
setValue: "none",
text: {
head: "Sound(Reply)",
desc: "",
checkbox: sound
}
}, {
id: "favSound",
storage: "favSound",
checkbox: true,
setValue: "none",
text: {
head: "Sound(Fav)",
desc: "",
checkbox: sound
}
}, {
id: "btSound",
storage: "btSound",
checkbox: true,
setValue: "none",
text: {
head: "Sound(Boost)",
desc: "",
checkbox: sound
}
}, {
id: "followSound",
storage: "followSound",
checkbox: true,
setValue: "none",
text: {
head: "Sound(Follow)",
desc: "",
checkbox: sound
}
}
];
var postConstruction = [
@@ -476,5 +537,16 @@ var postConstruction=[
}
]
}
}, {
id: "zero",
storage: "emoji-zero-width",
checkbox: true,
setValue: "normal",
setValue: "no",
text: {
head: "Zero-width space when inserting emojis",
desc: "",
checkbox: yesno
}
}
]

View File

@@ -1,5 +1,6 @@
<!doctype html>
<html lang="en">
<head>
<title>Update - TheDesk</title>
<link href="../../css/materialize.css" type="text/css" rel="stylesheet">
@@ -14,6 +15,7 @@
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
-->
</head>
<body>
<style>
body {
@@ -23,6 +25,7 @@ body{
padding: 10px;
text-align: right;
}
#start {
display: flex;
justify-content: center;
@@ -31,17 +34,25 @@ body{
height: calc(100vh - 2.5rem);
text-align: center;
}
#checkbox {
text-align: left;
}
a,button,input,label,i{
a,
button,
input,
label,
i {
-webkit-app-region: no-drag;
}
#updskip {
display: flex;
justify-content: center;
align-items: center;
}
.skipbtn {
display: block;
float: left;
@@ -55,10 +66,12 @@ a,button,input,label,i{
border: 1px solid;
overflow: hidden;
}
.skipbtn:hover {
background-color: #b3e5fc;
transition: all 0.3s ease-in-out;
}
#prog {
font-size: 200%;
}
@@ -75,10 +88,14 @@ a,button,input,label,i{
<p>Get latest TheDesk</p>
<span id="now"></span><b id="ver"></b><br>
<span id="det"></span><br>
<button class="waves-effect btn windows hide" onclick="update('install')" style="margin-left:15px;">Installer ver.</button>
<button class="waves-effect btn windows hide" onclick="update('portable')" style="margin-left:15px;">Portable ver.</button>
<button class="waves-effect btn linux hide" onclick="update('linux')" style="margin-left:15px;">Start</button>
<button class="waves-effect btn mac hide" onclick="update('mac')" style="margin-left:15px;">Start</button>
<button class="waves-effect btn windows hide" onclick="update('install')"
style="margin-left:15px;">Installer ver.</button>
<button class="waves-effect btn windows hide" onclick="update('portable')"
style="margin-left:15px;">Portable ver.</button>
<button class="waves-effect btn linux hide" onclick="update('linux')"
style="margin-left:15px;">Start</button>
<button class="waves-effect btn mac hide" onclick="update('mac')"
style="margin-left:15px;">Start</button>
<br>
Some problems?<br>Please download on <a href="https://thedesk.top">Oficial HP</a>.
</div>
@@ -86,14 +103,21 @@ a,button,input,label,i{
<h4>You may lose a cool experience!</h4>
Skip this update<br>
<div id="updskip">
<a onclick="window.close();" class="pointer skipbtn waves-effect waves-light"><div>Until next TL loading</div></a>
<a onclick="nextv();" class="pointer skipbtn waves-effect waves-light"><div>Until next version</div></a>
<a onclick="window.close();" class="pointer skipbtn waves-effect waves-light">
<div>Until next TL loading</div>
</a>
<a onclick="nextv();" class="pointer skipbtn waves-effect waves-light">
<div>Until next version</div>
</a>
</div>
<a class="pointer waves-effect" onclick="skipper();" style="margin-top:5px">Continue updating</a>
</div>
<div id="dlnow" class="hide">
<h4>Downloading...</h4>
<h4 id="prog"></h4>
<div class="progress">
<div class="determinate" style="width: 0%"></div>
</div>
</div>
</div>
<script type="text/javascript" src="../../js/common/about.js"></script>
@@ -113,6 +137,7 @@ function skipper(){
}
var electron = require("electron");
var ipc = electron.ipcRenderer;
//var shell = electron.shell;
verck();
function update(sel) {
$("#box").toggleClass("show");
@@ -158,7 +183,8 @@ function update(sel){
}
} else if (sel == "mac") {
var url = json["mac"];
var file="TheDesk-darwin-x64.zip";
shell.openExternal(url);
return false;
}
ipc.send('download-btn', [url, file]);
});
@@ -169,7 +195,7 @@ function update(sel){
}
ipc.on('prog', function (event, arg) {
console.log(arg);
$("body").css('background','linear-gradient(#fff 0%,#fff '+(1-arg)*100+'%, #d7ccc8 '+(1-arg)*100+'%, #d7ccc8 100%)');
$(".determinate").css("width",arg*100+"%");
$("#prog").text(Math.floor(arg * 100) + "%");
})
ipc.on('mess', function (event, arg) {
@@ -198,9 +224,23 @@ function verck(){
console.error(error);
}).then(function (json) {
console.log(json);
if (platform == "win32") {
$("#ver").text(json.desk);
localStorage.setItem("next-ver", json.desk);
} else if (platform == "linux") {
$("#ver").text(json.desk_linux);
localStorage.setItem("next-ver", json.desk_linux);
} else if (platform == "darwin") {
$("#ver").text(json.desk_mac);
localStorage.setItem("next-ver", json.desk_mac);
}
var lang = "en";
if (lang == "ja") {
$("#det").html(json.detail);
} else {
$("#det").html(json.detail_en);
}
$("#now").text(localStorage.getItem("ver"));
});

View File

@@ -1,5 +1,6 @@
<!doctype html>
<html lang="ja">
<head>
<title>Account Manager - TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport">
@@ -10,14 +11,57 @@
<link href='../../css/tl.css' rel='stylesheet' type='text/css'>
<link href='../../css/userdata.css' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
<style>.acct{display:flex; justify-content:space-around;}
.card{width:400px; background-color: #9e9e9e; margin:10px; }
body,html{overflow-y: scroll;}
#acct-list{display:flex; flex-wrap:wrap; color:white; align-items: flex-start}
.lts{font-size:150%}
.colorsel{ display:flex; }
.card .colorsel div:not(.exc){width:20px;height:20px;}
.card .colorsel div.exc{width:40px;height:20px;}
<style>
.acct {
display: flex;
justify-content: space-around;
}
.card {
width: 400px;
background-color: #9e9e9e;
margin: 10px;
}
body,
html {
overflow-y: scroll;
}
#acct-list {
display: flex;
flex-wrap: wrap;
color: white;
align-items: flex-start
}
.lts {
font-size: 150%
}
.colorsel {
display: flex;
}
.card .colorsel div:not(.exc) {
width: 20px;
height: 20px;
}
.card .colorsel div.exc {
width: 40px;
height: 20px;
}
.first {
display: flex;
justify-content: center;
align-items: center
}
.first .hide-first {
display: none;
}
</style>
<meta charset="utf-8">
<!--
@@ -28,6 +72,7 @@ body,html{overflow-y: scroll;}
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
-->
</head>
<body id="mainView">
<script type="text/javascript" src="../../js/common/jquery.js"></script>
<script type="text/javascript" src="../../js/platform/first.js"></script>
@@ -39,28 +84,33 @@ body,html{overflow-y: scroll;}
<script type="text/javascript" src="../../js/ui/tips.js"></script>
<script type="text/javascript" src="../../js/common/time.js"></script>
<script type="text/javascript" src="../../js/common/modal.js"></script>
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;">戻る</a><br>
<div class="hide-first">
<a href="index.html" class="btn waves-effect orange nex"
style="width:100%; max-width:200px;">戻る</a><br>
<h5>アカウント一覧</h5>
<div id="acct-list"></div>
<div class="divider"></div>
</div>
<div>
<h5>アカウントを追加</h5><br>
<div id="add">
<div class="row">
<div class="col s6">
<div class="col s8">
<input type="text" id="url" style="width:70%" placeholder="ex)mstdn.jp">
<div id="ins-suggest"></div>
Windows以外でご使用の方やPleromaにログインされる方はチェックを入れて下さい。ログインできない場合、チェックを外してください。<br>
チェックを外すとコード貼り付けをスキップできます。(<u>Mastodon</u>にWindowsやmacOSからログインする場合)失敗する場合はチェックを入れてください。<br>
<input type="checkbox" class="filled-in" id="linux" />
<label for="linux">コードセットアップ</label><br>
<input type="checkbox" class="filled-in" id="misskey" />
<label for="misskey">Misskeyとしてログイン</label><br>
<button class="btn waves-effect" onclick="instance()">Login</button><br>
</div>
<div class="col s6">
<div class="col s4">
<span style="font-family:Open Sans;">Supports</span>
<div id="support" class="collection transparent"></div>
</div>
</div></div>
</div>
</div>
<div id="auth" style="display:none">
指定されたコードを貼り付けてください。ログインウィンドウは閉じていただいて構いません。<br>
<input type="text" id="code" placeholder="コードを入力">
@@ -73,6 +123,8 @@ body,html{overflow-y: scroll;}
<input type="text" id="misskey-key" placeholder="コードを入力">
<button class="btn waves-effect" onclick="misskeyLogin()">Auth</button><br>
</div>
</div>
<div class="hide-first">
<h5>メインアカウント</h5>
<div class="input-field" style="width:300px"><span data-trans="your_acct">アカウントを選択</span>
<br>
@@ -91,6 +143,7 @@ Administered by:<a id="ins-admin"></a><br>
ユーザー数:<span id="ins-user"></span>ユーザー数<br>
コネクション:<span id="ins-per"></span>%<br>
Mastodonバージョン:<span id="ins-ver"></span>@<span id="ins-upd"></span><br>
</div>
<script type="text/javascript" src="../../js/ui/theme.js"></script>
<script type="text/javascript" src="../../js/platform/end.js"></script>
<script type="text/javascript" src="../../js/common/sha256.js"></script>

View File

@@ -1,16 +1,18 @@
<!doctype html>
<html lang="ja">
<head>
<title>TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport">
<link href="../../css/materialize.css" type="text/css" rel="stylesheet">
<link href='../../css/font-awesome.css' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<link href="../../css/themes.css" type="text/css" rel="stylesheet">
<link href='../../css/tl.css' rel='stylesheet' type='text/css'>
<link href='../../css/userdata.css' rel='stylesheet' type='text/css'>
<link href='../../css/post.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/post.css" rel="stylesheet" type="text/css">
<link href="../../css/master.css" type="text/css" rel="stylesheet">
<link href='../../css/sort.css' rel='stylesheet' type='text/css'>
<link href="../../css/sort.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300|Baloo+Bhai" rel="stylesheet">
<meta charset="utf-8">
<!--
@@ -21,27 +23,29 @@
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
-->
</head>
<body>
<script type="text/javascript" src="../../js/common/jquery.js"></script>
<script type="text/javascript" src="../../js/platform/first.js"></script>
<script type="text/javascript" src="../../js/common/materialize.js"></script>
<script type="text/javascript" src="../../js/lang/lang.ja.js"></script>
<script type="text/javascript" src="../../js/common/time.js"></script>
<script type="text/javascript" src="../../js/common/blurhash.js"></script>
<script type="text/javascript" src="../../js/common/version.js"></script>
<script type="text/javascript" src="../../js/common/keyshortcut.js"></script>
<script type="text/javascript" src="../../js/common/modal.js"></script>
<script type="text/javascript" src="../../js/ui/jquery-ui.min.js"></script>
<script>
var ver="Usamin (18.1.2)";
var ver = "Usamin (18.5.0)";
//betaを入れるとバージョンチェックしない
//GitHubに上げるときはindex.htmlをちゃんとする。(index.start.html)
//var ver="beta";
//WinstoreではバージョンCK・言語・Misskeyトークンの機能が排除
var acct_id = 0;
var tlid = 0;
verck(ver);
</script>
<textarea id="copy" style="top:-100px; position:fixed;"></textarea>
<canvas id="canvas" style="top:-100px; position:fixed;width:32px;height:32px" width="32" height="32"></canvas>
<div id="tl">
<!--TL-->
<!--ドラッグハンドラ-->
@@ -53,57 +57,85 @@ var tlid=0;
</div>
</div>
<div id="post-box" class="z-depth-5">
<div id="post-bar" class="drag-bar">投稿</div>
<div id="post-bar" class="drag-bar"><span id="unreact">投稿</span><span id="addreact"
class="hide">Reaction</span></div>
<!--トゥートボックス-->
<div id="left-side">
<div class="row" style="margin-bottom:0;">
</span>
<div class="" style="float:left;">
<a onclick="profShow()" style="vertical-align:-2.5rem;" class="pointer mize">
<img src="../../img/missing.svg" id="acct-sel-prof" title="選択したアカウントのプロフィールを表示(Ctrl+Shift+P)" data-trans-title="post_box_prof" width="24px">
<img src="../../img/missing.svg" id="acct-sel-prof" title="選択したアカウントのプロフィールを表示(Ctrl+Shift+P)"
data-trans-title="post_box_prof" width="24px">
</a>
</div>
<div class="input-field mize" style="float:left; width:calc(100% - 24px)">
<select id="post-acct-sel" class="acct-sel" onchange="mdCheck()"></select>
</div>
<span class="cancel">
<i class="material-icons waves-effect" onclick="hide()" title="このボックスを閉じる(X)" data-trans-title="post_box_close">cancel</i>
<i class="material-icons waves-effect" onclick="hide()" title="このボックスを閉じる(X)"
data-trans-title="post_box_close">cancel</i>
</span>
<!--Markdown-->
<div class="row" style="margin-bottom:0">
<div class="markdown mize hide">
<div class="col s12">
<i class="material-icons pointer setting waves-effect" onclick="tagsel('b')" title="太字(Ctrl+B)テキストボックス内を選択してから押すと囲みます。">format_bold</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('i')" title="字(Ctrl+I)テキストボックス内を選択してから押すと囲みます。">format_italic</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('u')" title="下線(Ctrl+U)テキストボックス内を選択してから押すと囲みます。">format_underlined</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('s')" title="取り消し(Ctrl+S)テキストボックス内を選択してから押すと囲みます。">strikethrough_s</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('>','no','yes')" title="引用">format_quote</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('#','no','yes')" title="見出し">short_text</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('`','yes','no')" title="コード挿入 テキストボックス内を選択してから押すと囲みます。">code</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('- ','yes','yes')" title="箇条書きリスト">format_list_bulleted</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('1. ','yes','yes')" title="番号付きリスト">format_list_numbered</i>
<i class="pointer setting fa fa-subscript waves-effect" onclick="markdown('__','yes','no','before')" title="下付き文字 テキストボックス内を選択してから押すと囲みます。" style="font-size:1.5rem"></i>
<i class="pointer setting fa fa-superscript waves-effect" onclick="markdown('_','yes','no','before')" title="上付き文字 テキストボックス内を選択してから押すと囲みます。" style="font-size:1.5rem"></i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('spin')" title="回転 テキストボックス内を選択してから押すと囲みます。">autorenew</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('pulse')" title="点滅 テキストボックス内を選択してから押すと囲みます。">flare</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('flip=vertical')" title="上下反転 テキストボックス内を選択してから押すと囲みます。">swap_vert</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('flip=horizontal')" title="左右反転 テキストボックス内を選択してから押すと囲みます。">swap_horiz</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('b')"
title="字(Ctrl+B)テキストボックス内を選択してから押すと囲みます。">format_bold</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('i')"
title="斜字(Ctrl+I)テキストボックス内を選択してから押すと囲みます。">format_italic</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('u')"
title="下線(Ctrl+U)テキストボックス内を選択してから押すと囲みます。">format_underlined</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('s')"
title="取り消し(Ctrl+S)テキストボックス内を選択してから押すと囲みます。">strikethrough_s</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('>','no','yes')"
title="引用">format_quote</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('#','no','yes')"
title="見出し">short_text</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('`','yes','no')"
title="コード挿入 テキストボックス内を選択してから押すと囲みます。">code</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('- ','yes','yes')"
title="箇条書きリスト">format_list_bulleted</i>
<i class="material-icons pointer setting waves-effect" onclick="markdown('1. ','yes','yes')"
title="番号付きリスト">format_list_numbered</i>
<i class="pointer setting fa fa-subscript waves-effect"
onclick="markdown('__','yes','no','before')" title="下付き文字 テキストボックス内を選択してから押すと囲みます。"
style="font-size:1.5rem"></i>
<i class="pointer setting fa fa-superscript waves-effect"
onclick="markdown('_','yes','no','before')" title="上付き文字 テキストボックス内を選択してから押すと囲みます。"
style="font-size:1.5rem"></i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('spin')"
title="回転 テキストボックス内を選択してから押すと囲みます。">autorenew</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('pulse')"
title="点滅 テキストボックス内を選択してから押すと囲みます。">flare</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('flip=vertical')"
title="上下反転 テキストボックス内を選択してから押すと囲みます。">swap_vert</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('flip=horizontal')"
title="左右反転 テキストボックス内を選択してから押すと囲みます。">swap_horiz</i>
<span class="sml gray pointer waves-effect">
<a onclick="mdToggle()">Markdownエディタを隠す</a>
</span>
<br>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('size')" title="文字サイズ変更 テキストボックス内を選択してから押すと囲みます。">format_size</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('size')"
title="文字サイズ変更 テキストボックス内を選択してから押すと囲みます。">format_size</i>
<input id="size" style="width: calc(50% - 20px); margin: 0; height: 24px;" value="12">px
<i class="material-icons pointer setting waves-effect" onclick="tagsel('colorhex')" title="文字色変更 テキストボックス内を選択してから押すと囲みます。">color_lens</i>
<i class="material-icons pointer setting waves-effect" onclick="tagsel('colorhex')"
title="文字色変更 テキストボックス内を選択してから押すと囲みます。">color_lens</i>
<input id="colorhex" style="width: calc(50% - 50px); margin: 0; height: 24px;" type="color">
<br>
<i class="material-icons pointer setting waves-effect" onclick="markdownLink()" title="リンク挿入">link</i>
<input id="linkt" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="リンクテキスト">&nbsp;
<input id="link2" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="リンクアドレス">
<i class="material-icons pointer setting waves-effect" onclick="markdownLink()"
title="リンク挿入">link</i>
<input id="linkt" style="width: calc(50% - 20px); margin: 0; height: 24px;"
placeholder="リンクテキスト">&nbsp;
<input id="link2" style="width: calc(50% - 20px); margin: 0; height: 24px;"
placeholder="リンクアドレス">
<br>
<i class="material-icons pointer setting waves-effect" onclick="markdownImage()" title="インライン画像挿入">image</i>
<input id="image" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="代替テキスト">&nbsp;
<input id="image2" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="画像アドレス">
<i class="material-icons pointer setting waves-effect" onclick="markdownImage()"
title="インライン画像挿入">image</i>
<input id="image" style="width: calc(50% - 20px); margin: 0; height: 24px;"
placeholder="代替テキスト">&nbsp;
<input id="image2" style="width: calc(50% - 20px); margin: 0; height: 24px;"
placeholder="画像アドレス">
</div>
</div>
<div class="input-field col s12" id="preview-field" style="margin-top: 0;">
@@ -115,7 +147,8 @@ var tlid=0;
</div>
<div class="input-field col s12" id="toot-field" style="margin-top: 10px;">
<textarea id="textarea" class="materialize-textarea unmize" style="margin-bottom:0;" data-length="500"></textarea>
<textarea id="textarea" class="materialize-textarea unmize" style="margin-bottom:0;"
data-length="500"></textarea>
<label for="textarea" data-trans="toot">トゥート</label>
<br>
<span class="sml gray pointer markdown mize" id="preview-btn">
@@ -126,13 +159,19 @@ var tlid=0;
</span>
</div>
<div class="col s12 mize" style="margin-top: 0; display:flex; justify-content: space-between">
<i class="waves-effect gray material-icons" id="nsfw" title="画像に制限を付与" onclick="nsfw()">visibility_off</i>
<i class="waves-effect gray material-icons purple-text dropdown-button" data-activates='dropdown1' id="vis-icon">public</i>
<i class="waves-effect gray material-icons" id="nsfw" title="画像に制限を付与"
onclick="nsfw()">visibility_off</i>
<i class="waves-effect gray material-icons purple-text dropdown-button"
data-activates='dropdown1' id="vis-icon">public</i>
<a class="waves-effect gray" id="cw" onclick="cw()" title="コンテンツワーニング(トゥートを表示する前にメッセージで隠す)">CW</a>
<span><span id="imgup"></span><span id="imgsel"><i class="waves-effect material-icons gray" onclick="fileselect()" title="ファイルを選択">photo_library</i></span></span>
<i class="waves-effect gray material-icons" onclick="emojiToggle()" id="emojibtn" title="絵文字を挿入">tag_faces</i>
<i class="waves-effect gray material-icons dropdown-button" data-activates='dropdown2'>more_vert</i>
<i class="material-icons nex gray waves-effect" title="トゥートボックスのクリア(Ctrl+Shit+C)" data-trans-title="post_box_clear" id="clear">clear</i>
<span><span id="imgup"></span><span id="imgsel"><i class="waves-effect material-icons gray"
onclick="fileselect()" title="ファイルを選択">photo_library</i></span></span>
<i class="waves-effect gray material-icons" onclick="emojiToggle()" id="emojibtn"
title="絵文字を挿入">tag_faces</i>
<i class="waves-effect gray material-icons dropdown-button"
data-activates='dropdown2'>more_vert</i>
<i class="material-icons nex gray waves-effect" title="トゥートボックスのクリア(Ctrl+Shit+C)"
data-trans-title="post_box_clear" id="clear">clear</i>
</div>
<div class="col s12 mize" style="margin-bottom:5px; padding:0;">
<div id="taglist"></div>
@@ -145,13 +184,15 @@ var tlid=0;
<br>
<input type="text" id="cw-text" placeholder="警告文" class="mize" style="margin:0">
<div id="sch-box">時間指定投稿<br><span class="sml">2.7.0~ 5分以内には投稿できません。サーバーの時計が正確とは限りません。</span><br>
<input type="datetime-local" id="sch-date" placeholder="時間指定投稿" class="datepicker" style="margin:0">
<input type="datetime-local" id="sch-date" placeholder="時間指定投稿" class="datepicker"
style="margin:0">
</div>
</div>
</div>
<!-- 公開範囲 Dropdown Structure -->
<ul id='dropdown1' class='dropdown-content'>
<li style="font-size: 16px; display: block; line-height: 22px; padding: 14px 16px;">公開範囲指定</li>
<li style="font-size: 16px; display: block; line-height: 22px; padding: 14px 16px;">公開範囲指定
</li>
<li>
<a onclick="vis('public')">公開(Public)</a>
</li>
@@ -195,8 +236,11 @@ var tlid=0;
<!--END hidden area-->
</div>
<div id="toot-btn-field">
<button class="btn waves-effect indigo unmize toot-btn-group" onclick="post()" id="toot-post-btn">トゥート</button>
<button class="btn waves-effect indigo darken-3 unmize hide toot-btn-group" onclick="sec()" id="toot-sec-btn"><i class="material-icons" id="toot-sec-icon" title="セカンダリートゥート">lock_open</i></button>
<button class="btn waves-effect indigo unmize toot-btn-group" onclick="post()"
id="toot-post-btn">トゥート</button>
<button class="btn waves-effect indigo darken-3 unmize hide toot-btn-group" onclick="sec()"
id="toot-sec-btn"><i class="material-icons" id="toot-sec-icon"
title="セカンダリートゥート">lock_open</i></button>
</div>
</div>
<div id="right-side">
@@ -205,18 +249,19 @@ var tlid=0;
<div id="emoji" class="hide">
<span class="gray sml">サーバーによって実装が異なります。
<a onclick="emojiGet('true')" class="pointer">絵文字更新</a>
<i class="material-icons waves-effect" onclick="emojiToggle()" title="このボックスを閉じる" data-trans-title="post_box_close">cancel</i>
<br>
</span>
<div id="emoji-list" class="" style="">
</div>
<div class="emoji-control center">
<button class="btn waves-effect blue" style="width:30%; padding:0;" onclick="emojiList('before')" id="emoji-before">
<button class="btn waves-effect blue" style="width:30%; padding:0;" onclick="emojiList('before')"
id="emoji-before">
<i class="material-icons">navigate_before</i>
</button>
<span id="emoji-count"></span>/
<span id="emoji-sum"></span>
<button class="btn waves-effect blue" style="width:30%; padding:0;" onclick="emojiList('next')" id="emoji-next">
<button class="btn waves-effect blue" style="width:30%; padding:0;" onclick="emojiList('next')"
id="emoji-next">
<i class="material-icons">navigate_next</i>
</button>
</div>
@@ -251,7 +296,7 @@ var tlid=0;
<i class="material-icons">flag</i>
</a>
<a onclick="faicon()" class="pointer waves-effect" title="faicon" id="faicon-btn">
<i class="fa fa-fort-awesome"></i>
<i class="fab fa-fort-awesome"></i>
</a>
</div>
</div>
@@ -259,12 +304,8 @@ var tlid=0;
<div id="poll" class="hide">
<select id="poll-sel" onchange="pollProviderCk()">
<option value="nothing">アンケートを使用しない</option>
<option value="votedon">votedon.</option>
<option value="mastodon-poll">Mastodon(2.8~)</option>
</select>
<div id="votedon" class="poll-provider hide">
WIP
</div>
<div id="mastodon-poll" class="poll-provider hide">
<input type="text" class="mastodon-choice" placeholder="選択肢1">
<input type="text" class="mastodon-choice" placeholder="選択肢2">
@@ -276,7 +317,7 @@ var tlid=0;
<label for="poll-until">投票するまで票数を隠す</label><br>
<input type="number" style="width:50px" id="days_poll" placeholder="d" value="0">
<input type="number" style="width:50px" id="hours_poll" placeholder="h" value="0">時間
<input type="number" style="width:50px" id="mins_poll" placeholder="m" value="0">
<input type="number" style="width:50px" id="mins_poll" placeholder="m" value="6">
</div>
</div>
</div>
@@ -285,6 +326,27 @@ var tlid=0;
<div id="tootmodal" class="modal modal-fixed-footer">
<div class="modal-content">
<ul class="collapsible" data-collapsible="accordion" id="det-col">
<li class="dm-hide">
<div class="collapsible-header">
<i class="material-icons">people_outline</i>これより後のLocal TL(言及確認)
</div>
<div class="collapsible-body toot-reset" id="ltl-after">
</div>
</li>
<li class="dm-hide">
<div class="collapsible-header">
<i class="material-icons">person_outline</i>これより後のユーザーTL(言及確認)
</div>
<div class="collapsible-body toot-reset" id="user-after">
</div>
</li>
<li class="dm-hide">
<div class="collapsible-header">
<i class="material-icons">language</i>これより後の連合TL(言及確認)
</div>
<div class="collapsible-body toot-reset" id="ftl-after">
</div>
</li>
<li>
<div class="collapsible-header">
<i class="material-icons">arrow_upward</i>これより前の会話
@@ -330,26 +392,29 @@ var tlid=0;
</li>
<li class="dm-hide">
<div class="collapsible-header">
<i class="text-darken-3 fa fa-retweet"></i>このトゥートをブーストした人
<i class="text-darken-3 false fas fa-retweet"></i>このトゥートをブーストした人
</div>
<div class="collapsible-body toot-reset" id="toot-rt">
</div>
</li>
</ul>
<div class="dm-hide">
他のアカウントを使用(<i class="fa fa-retweet"></i>/<i class="fa fa-star"></i>の解除はできません)<br>
他のアカウントを使用(<i class="fas fa-retweet"></i>/<i class="fas fa-star"></i>の解除はできません)<br>
<div class="row">
<div class="col s6">
<select id="status-acct-sel" class="acct-sel"></select>
</div>
<div class="col s2">
<button class="dropdown-button btn waves-effect" style="width:100%;" onclick="staEx('reply')"><i class="fa fa-share"></i>/button>
<button class="dropdown-button btn waves-effect" style="width:100%;" onclick="staEx('reply')"><i
class="fas fa-share"></i></button>
</div>
<div class="col s2">
<button class="dropdown-button btn waves-effect indigo" style="width:100%;" onclick="staEx('rt')"><i class="fa fa-retweet"></i></button>
<button class="dropdown-button btn waves-effect indigo" style="width:100%;"
onclick="staEx('rt')"><i class="fas fa-retweet"></i></button>
</div>
<div class="col s2">
<button class="dropdown-button btn waves-effect orange" style="width:100%;" onclick="staEx('fav')"><i class="fa fa-star"></i></button>
<button class="dropdown-button btn waves-effect orange" style="width:100%;"
onclick="staEx('fav')"><i class="fas fa-star"></i></button>
</div>
</div>
<div id="toot-tools">
@@ -360,7 +425,6 @@ var tlid=0;
</div>
<div class="modal-footer">
<a href="#!" class="waves-effect waves-green btn-flat dm-hide" onclick="brws()">ブラウザで開く</a>
<a href="#!" class="waves-effect waves-green btn-flat dm-hide" onclick="shot()">スクリーンショット</a>
<a href="#!" class="waves-effect waves-green btn-flat dm-hide" onclick="cbCopy()">URLをコピー</a>
<a href="#!" class="waves-effect waves-green btn-flat dm-hide" onclick="cbCopy('emb')">埋め込む</a>
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">Close</a>
@@ -372,7 +436,7 @@ var tlid=0;
<div id="his-data-show">
<div class="his-float" id="his-float-data">
<div id="his-basic-prof">
<img src="../../img/loading.svg" id="his-prof">
<img src="../../img/loading.svg" id="his-prof" draggable="false">
<span id="his-name">Loading...</span><span class="gray" id="his-bot"></span>
<br>@
<span id="his-acct"></span><br>
@@ -390,12 +454,16 @@ var tlid=0;
<span class="cbadge" style="max-width:150px; width:150px; ">Since:
<span id="his-since"></span>
</span>
<div id="his-proof-prof"></div>
</div>
<div id="his-des"></div><br>
<div id="his-des" data-acct=""></div><br>
<div id="his-plus-action">
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-emp-btn" onclick="empUser()">ユーザー強調</a>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat only-his-data" id="his-end-btn" onclick="pinUser()">紹介する</a><br>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-openin" onclick="profbrws()">ブラウザで開く</a><br>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-emp-btn"
onclick="empUser()">ユーザー強調</a>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat only-his-data"
id="his-end-btn" onclick="pinUser()">紹介する</a><br>
<a href="#!" class="btn waves-effect waves-effect blue-grey btn-flat" id="his-openin"
onclick="profbrws()">ブラウザで開く</a><br>
</div><br>
<div id="his-matching-list">
似ているユーザーを取得できます。<br>
@@ -414,10 +482,12 @@ var tlid=0;
<a go="#his-follow-list" title="フォロー"><i class="material-icons">people</i></a>
</li>
<li class="custom-tab col my-data-width">
<a go="#his-follower-list" title="フォロワー"><i class="material-icons">people</i></a>
<a go="#his-follower-list" title="フォロワー"><i
class="material-icons">people</i></a>
</li>
<li class="custom-tab col my-data-width only-his-data">
<a go="#his-action" title="他のアカウントで操作"><i class="material-icons">account_box</i></a>
<a go="#his-action" title="他のアカウントで操作"><i
class="material-icons">account_box</i></a>
</li>
<li class="custom-tab col my-data-width only-his-data">
<a go="#his-list" title="リスト"><i class="material-icons">list</i></a>
@@ -429,43 +499,52 @@ var tlid=0;
<a go="#his-blocking-list" title="ブロック"><i class="material-icons">block</i></a>
</li>
<li class="custom-tab col my-data-width only-my-data">
<a go="#his-blocking-list" title="ブロック"><i class="material-icons">voice_over_off</i></a>
<a go="#his-blocking-list" title="ブロック"><i
class="material-icons">voice_over_off</i></a>
</li>
<li class="custom-tab col my-data-width only-my-data">
<a go="#his-domain-list" title="ドメインブロック"><i class="material-icons">language</i><i class="material-icons">block</i></a>
<a go="#his-domain-list" title="ドメインブロック"><i
class="material-icons">language</i><i class="material-icons">block</i></a>
</li>
<li class="custom-tab col my-data-width only-my-data">
<a go="#his-prof-list" title="プロフィール編集"><i class="material-icons">create</i></a>
</li>
<li class="custom-tab col my-data-width only-my-data">
<a go="#his-request-list" title="フォローリクエスト"><i class="material-icons">how_to_reg</i></a>
<a go="#his-request-list" title="フォローリクエスト"><i
class="material-icons">how_to_reg</i></a>
</li>
<li class="custom-tab col my-data-width only-my-data">
<a go="#his-follow-recom-list" title="おすすめ"><i class="material-icons">recent_actors</i></a>
<a go="#his-follow-recom-list" title="おすすめ"><i
class="material-icons">recent_actors</i></a>
</li>
</ul>
</div>
<div id="his-tl" class="tab-content">
<div id="his-tl-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="utl('--now','more')">もっと</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="utl('--now','more')">もっと</button>
</div>
<div id="his-follow-list" class="tab-content">
<div id="his-follow-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="flw('--now','more')">もっと</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="flw('--now','more')">もっと</button>
</div>
<div id="his-follower-list" class="tab-content">
<div id="his-follower-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="fer('--now','more')">もっと</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="fer('--now','more')">もっと</button>
</div>
<div id="his-action" class="tab-content">
他のアカウントを使用するフォロー((解除はできません。))<br>
<div style="max-width:500px;"><select id="user-acct-sel" class="acct-sel"></select></div>
<div style="max-width:500px;"><select id="user-acct-sel" class="acct-sel"></select></div>
<a href="#!" class="waves-effect btn" onclick="follow('selector','true')">フォロー</a><br>
または<br>
<a href="#!" class="waves-effect btn" onclick="udgEx('selector', 'selector')">プロフィールを表示</a><br>
<a href="#!" class="waves-effect btn"
onclick="udgEx('selector', 'selector')">プロフィールを表示</a><br>
</div>
<div id="his-list" class="tab-content">
<div id="his-lists-a">リストに追加するためにはフォローが必要です。</div>
@@ -475,22 +554,26 @@ var tlid=0;
<div id="his-fav-list" class="tab-content">
<div id="his-fav-list-contents" class="cont-series">
</div>
<button class="btn waves-effect" style="width:100%; padding:0;" onclick="showFav('more')">もっと</button>
<button class="btn waves-effect" style="width:100%; padding:0;"
onclick="showFav('more')">もっと</button>
</div>
<div id="his-blocking-list" class="tab-content">
<div id="his-blocking-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="showBlo('more')">もっと</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="showBlo('more')">もっと</button>
</div>
<div id="his-muting-list" class="tab-content">
<div id="his-muting-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="showMut('more')">もっと</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="showMut('more')">もっと</button>
</div>
<div id="his-domain-list" class="tab-content">
<div id="his-domain-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="showDom('more')">もっと</button>ブロックするドメイン
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="showDom('more')">もっと</button>ブロックするドメイン
<br>
<input type="text" placeholder="example.com" id="domainblock">
<button class="btn waves-effect" onclick="addDomainblock()">追加</button>
@@ -505,7 +588,8 @@ var tlid=0;
<textarea placeholder="自己紹介" id="his-des-val" class="materialize-textarea"></textarea>
<label for="his-des-val">自己紹介</label>
</div>
<button class="btn waves-effect" style="width:100%; padding:0;" onclick="profedit()">変更</button>
<button class="btn waves-effect" style="width:100%; padding:0;"
onclick="profedit()">変更</button>
<br>アバターを変更:
<span id="prof-change">
<input type="file" onchange="imgChange(this,'avatar')">
@@ -518,20 +602,28 @@ var tlid=0;
<div id="his-request-list" class="tab-content">
<div id="his-request-list-contents" class="cont-series">
</div>
<button class="btn waves-effect " style="width:100%; padding:0;" onclick="showReq('more')">もっと</button>
<button class="btn waves-effect " style="width:100%; padding:0;"
onclick="showReq('more')">もっと</button>
</div>
<div id="his-follow-recom-list" class="tab-content">
<div id="his-follow-recom-contents" class="cont-series">
</div>
</div>
</div>
<div class="his-float" id="his-float-blocked">
<div>ブロックされています。なぜでしょう?</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="modal-action waves-effect waves-green btn-flat" id="his-history-btn" onclick="historyShow()">一つ前のユーザーデータ</button>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-follow-btn" onclick="follow()">フォロー</a>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-mute-btn" onclick="mute()">ミュート</a>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-block-btn" onclick="block()">ブロック</a>
<button class="modal-action waves-effect waves-green btn-flat" id="his-history-btn"
onclick="historyShow()">一つ前のユーザーデータ</button>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-follow-btn"
onclick="follow()">フォロー</a>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-mute-btn"
onclick="mute()">ミュート</a>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" id="his-block-btn"
onclick="block()">ブロック</a>
<a href="#!" class="modal-action waves-effect waves-green btn-flat" onclick="hisclose()">Close</a>
</div>
</div>
@@ -583,39 +675,49 @@ var tlid=0;
<a href="https://thedesk.top" target="_blank">HP</a><br>
<a href="https://github.com/cutls/TheDesk" target="_blank">GitHub</a><br>
<br>
<div id="release-Usamin_18-1-1" class="release-do" style="display:none; ">
<div id="release-Usamin_18-5-0" class="release-do" style="display:none; ">
<a href="https://code.cutls.com/thedesk-log/" target="_blank">開発の経緯</a><br>
<a href="https://ja.mstdn.wiki/TheDesk" target="_blank">機能一覧</a><br>
Entyでは支援者様限定で様々なTheDeskに関する記事をご覧いただけます。<br>
Pixiv Fanboxでは支援者様限定で様々なTheDeskに関する記事をご覧いただけます。最低月一更新。<br>
困ったときは、<a href="https://docs.thedesk.top">TheDesk Docs</a>をご覧ください。
<h5>Release Note Usamin (18.1.1)</h5>
・お知らせ機能改善<br>
・Integrated TLで一部挙動改善(Thanks to <a href="https://www.kr-kp.com/">kPherox</a>)<br>
--以下18.1.0--<br>
・iTunes NowPlaying(macOS)にアルバムアートワークを付ける(Thanks to <a href="https://www.kr-kp.com/">kPherox</a>)<br>
・カラムを<b>縦に並べられる</b>ように(2つ目以降のカラム毎の設定の「左に重ねる」「右に出す」を押す)<br>
・画像を個別に削除する(画像をクリックして)<br>
・何個もアルバムアートワークが投稿されるバグを修正<br>
・Misskeyでログインしたまま何もできないバグを修正(権限回り)
<h5>Release Note Usamin (18.5.0)</h5>
・macOSでのアップデータについて修正。<br>
・本来不要なところにフォロリク許可画面が出るようになっていたのを修正。<br>
・不明なメディアに対するリンクを表示します。<br>
・PleromaでのVideoの挙動について修正しました。<br>
・Patreonでの支援を開始しました。<br>
・アスタルテの新しいBBCodeに対応しました。<br>
・タイムライン下の方が切れてしまう不具合の修正<br>
・通知をユーザーごとにフィルターする機能(最新のMastodonのみ)。<br>
・Electron 5.0.1になりました。<br>
<br>
<h5>ThinkingDeskラベル</h5>
<img src="../../img/thinkingdesk.png" style="width:100px;" draggable="false"><br>
手作りマットラベル。貼ってはがせる。300円なのでポイントの余りでどうぞ。<br>
<a href="https://item.mercari.com/jp/m822743330" target="_blank">メルカリ</a>へ。
</div>
<div id="release-en">
<div id="release-en" style="display:none">
<h5>Let's make it native!</h5>
<a href="https://translate.thedesk.top">Crowdin translation project</a>
</div>
<br><br>
<h3>ご支援ください。</h3>
TheDeskは営利目的ではないため、有料機能や広告は一切ありません。<br>皆様のあたたかいご支援のもとで製作されています。<br>
<a class="btn-share btn waves-effect waves-light purple lighten-2" href="https://enty.jp/Cutls" target="_blank">
Entyで支援
</a>
<a class="btn-share btn waves-effect waves-light red lighten-2" href="https://www.pixiv.net/fanbox/creator/28105985" target="_blank">
<a class="btn-share btn waves-effect waves-light red lighten-2"
href="https://www.pixiv.net/fanbox/creator/28105985" target="_blank">
Pixiv FANBOXで支援
</a>
<a class="btn-share btn waves-effect waves-light blue" href="https://www.amazon.co.jp/registry/wishlist/2TV35ZHHJPDSB" target="_blank">
<a class="btn-share btn waves-effect waves-light red darken-2"
href="https://www.patreon.com/cutls" target="_blank">
Patreonで支援
</a>
<a class="btn-share btn waves-effect waves-light blue"
href="https://www.amazon.co.jp/registry/wishlist/2TV35ZHHJPDSB" target="_blank">
Amazonほしいものリスト
</a>
<br>
<a href="mailto:mstdn@thedesk.top" target="_blank">mstdn@thedesk.top</a>にAmazonギフトカードを送る<br>
<a href="mailto:web-pro@cutls.com"
target="_blank">web-pro@cutls.com</a>にAmazonギフトカードを送る<br>
Kyash<br>
<img src="../../img/kyash.png" width="100"><br>
</div>
@@ -639,13 +741,20 @@ var tlid=0;
</span>
<div id="menu-wrapper">
<div id="left-menu">
<div class="waves-effect active" onclick="addColumnMenu()" id="addColumnMenu"><i class="material-icons">add</i><span>カラム追加</span></div>
<div class="waves-effect" onclick="sortMenu()" id="sortMenu"><i class="material-icons">sort</i><span>カラム一覧/並べ替え</span></div>
<div class="waves-effect" onclick="searchMenu()" id="searchMenu"><i class="material-icons">search</i><span>検索</span></div>
<div class="waves-effect" onclick="listMenu()" id="listMenu"><i class="material-icons">view_headline</i><span>リスト</span></div>
<div class="waves-effect" onclick="filterMenu()" id="filterMenu"><i class="material-icons">filter_list</i><span>フィルター</span></div>
<div class="waves-effect" onclick="help()"><i class="material-icons">help_outline</i><span>ヘルプ</span></div>
<div class="waves-effect" onclick="location.href='index.html'"><i class="material-icons">refresh</i><span>TL再読込</span></div>
<div class="waves-effect active" onclick="addColumnMenu()" id="addColumnMenu"><i
class="material-icons">add</i><span>カラム追加</span></div>
<div class="waves-effect" onclick="sortMenu()" id="sortMenu"><i
class="material-icons">sort</i><span>カラム一覧/並べ替え</span></div>
<div class="waves-effect" onclick="searchMenu()" id="searchMenu"><i
class="material-icons">search</i><span>検索</span></div>
<div class="waves-effect" onclick="listMenu()" id="listMenu"><i
class="material-icons">view_headline</i><span>リスト</span></div>
<div class="waves-effect" onclick="filterMenu()" id="filterMenu"><i
class="material-icons">filter_list</i><span>フィルター</span></div>
<div class="waves-effect" onclick="help()"><i
class="material-icons">help_outline</i><span>ヘルプ</span></div>
<div class="waves-effect" onclick="location.href='index.html'"><i
class="material-icons">refresh</i><span>TL再読込</span></div>
</div>
<div id="right-menu">
<!--カラム追加-->
@@ -660,24 +769,50 @@ var tlid=0;
<input type="hidden" value="local" id="type-sel">
表示するタイムライン
<div id="tltype">
<div class="type waves-effect active" data-type="local"><div><i class="material-icons">people_outline</i></div><span>ローカル</span></div>
<div class="type waves-effect" data-type="local-media"><div><i class="material-icons">people_outline</i><i class="material-icons sub-icon">perm_media</i></div><span>ローカル(メディア)</span></div>
<div class="type waves-effect" data-type="home"><div><i class="material-icons">home</i></div><span>ホーム</span></div>
<div class="type waves-effect" data-type="pub"><div><i class="material-icons">language</i></div><span>連合</span></div>
<div class="type waves-effect" data-type="pub-media"><div><i class="material-icons">language</i><i class="material-icons sub-icon">perm_media</i></div><span>連合(メディア)</span></div>
<div class="type waves-effect" data-type="dm"><div><i class="material-icons">mail_outline</i></div><span>ダイレクトメッセージ</span></div>
<div class="type waves-effect" data-type="mix"><div><i class="material-icons">merge_type</i></div><span>統合(ローカルとホーム)</span></div>
<div class="type waves-effect" data-type="plus"><div><i class="material-icons">merge_type</i><i class="material-icons sub-icon">reply</i></div><span>統合(LTL+BT+返信)</span></div>
<div class="type waves-effect" data-type="notf"><div><i class="material-icons">notifications</i></div><span>通知</span></div>
<div class="type waves-effect active" data-type="local">
<div><i class="material-icons">people_outline</i></div><span>ローカル</span>
</div>
<div class="type waves-effect" data-type="local-media">
<div><i class="material-icons">people_outline</i><i
class="material-icons sub-icon">perm_media</i>
</div><span>ローカル(メディア)</span>
</div>
<div class="type waves-effect" data-type="home">
<div><i class="material-icons">home</i></div><span>ホーム</span>
</div>
<div class="type waves-effect" data-type="pub">
<div><i class="material-icons">language</i></div><span>連合</span>
</div>
<div class="type waves-effect" data-type="pub-media">
<div><i class="material-icons">language</i><i
class="material-icons sub-icon">perm_media</i></div>
<span>連合(メディア)</span>
</div>
<div class="type waves-effect" data-type="dm">
<div><i class="material-icons">mail_outline</i></div><span>ダイレクトメッセージ</span>
</div>
<div class="type waves-effect" data-type="mix">
<div><i class="material-icons">merge_type</i></div><span>統合(ローカルとホーム)</span>
</div>
<div class="type waves-effect" data-type="plus">
<div><i class="material-icons">merge_type</i><i
class="material-icons sub-icon">reply</i></div>
<span>統合(LTL+BT+返信)</span>
</div>
<div class="type waves-effect" data-type="notf">
<div><i class="material-icons">notifications</i></div><span>通知</span>
</div>
</div>
</div>
<div id="noauth" class="hide">表示するタイムライン
<input id="noauth-url" type="text" class="validate" style="width:calc( 70% - 40px);" placeholder="e.g:mstdn.jp">
<input id="noauth-url" type="text" class="validate" style="width:calc( 70% - 40px);"
placeholder="e.g:mstdn.jp">
</div>
<div id="webview-add" class="hide">TweetDeckを表示します。TJDeckをカスタムしたものが読み込まれます(<a href='https://gist.github.com/cutls/8787a55d2c1c53274e68a427966046a6' target='_blank'>Code</a>/<a href='https://gist.github.com/totoraj930/d1394dadb51d75666a76829f61e7280c' target='_blank'>TJDeck</a>)。キーボードショートカットが邪魔をするので、文字入力時はカラムの「WebView優先」にチェックを入れてください。
</div>
</div>
<button class="btn waves-effect blue " style="width:calc( 100% - 10px);" onclick="addColumn()" data-trans-i="add">
<button class="btn waves-effect blue " style="width:calc( 100% - 10px);" onclick="addColumn()"
data-trans-i="add">
<i class="material-icons left">add</i>追加
</button>
<br>
@@ -687,12 +822,13 @@ var tlid=0;
<div id="src-box" class="hide menu-content">
<div class="input-field">
<select id="src-acct-sel" class="acct-sel" onchange="trend()"></select>
</div><div class="input-field">
<i class="material-icons prefix">search</i>
<input id="src" type="text" class="validate" style="width:calc( 60% - 40px);">
</div>
<div class="input-field">
<input id="src" type="text" class="validate" style="width:60%">
<label for="src" data-trans="src">検索</label>
<button class="btn waves-effect indigo" style="width:calc( 40% - 40px);" onclick="src()" data-trans-i="src">
<i class="material-icons left">search</i>検索
<button class="btn waves-effect indigo" style="width: 36%;padding: 0;padding-left: 15px;"
onclick="src()" data-trans-i="src">
<i class="material-icons left" style="margin:0">search</i>検索
</button>
<br>
<br>
@@ -706,7 +842,7 @@ var tlid=0;
<div id="sort-box" class="hide menu-content">
<ul id="sort"></ul>
<div>
<button onclick="sort()" class="btn waves-effect nex" style="width:100%; max-width:300px;" data-trans-i="sort">
<button onclick="sort()" class="btn waves-effect nex" style="width:97.5%;" data-trans-i="sort">
<i class="material-icons left">sort</i>並べ替え設定
</button>
</div>
@@ -718,7 +854,8 @@ var tlid=0;
<label>選択(スクロールで全選択肢表示)</label>
</div>
<div style="float:left; padding-top:8px; padding-bottom:28px;">
<button class="btn waves-effect indigo" style="width:80px;" onclick="list()" data-trans-i="lists">
<button class="btn waves-effect indigo" style="width:80px;" onclick="list()"
data-trans-i="lists">
一覧
</button>
</div>
@@ -735,7 +872,8 @@ var tlid=0;
<label>選択(スクロールで全選択肢表示)</label>
</div>
<div style="float:left; padding-top:8px; padding-bottom:28px;">
<button class="btn waves-effect indigo" style="width:80px;" onclick="filter()" data-trans-i="filters">
<button class="btn waves-effect indigo" style="width:80px;" onclick="filter()"
data-trans-i="filters">
一覧
</button>
</div>
@@ -758,11 +896,19 @@ var tlid=0;
<input type="checkbox" class="filled-in" id="except_filter" value="1" />
<label for="except_filter">除外</label><br>
<span class="sml">「除外」時マッチしたトゥートは非可逆的に除外され、削除後も閲覧できません。</span><br>
有効期限(あと)<span class="sml">未指定(または0分)で「無限」になります。<b>仕様上数値の正確性を保証できません。</b></span><br><br>
有効期限(あと)<span class="sml">未指定(または0分)で「無限」になります。<b>仕様上数値の正確性を保証できません。</b></span><br><br>
<input type="number" style="width:50px" id="days_filter" placeholder="d" value="0">
<input type="number" style="width:50px" id="hours_filter" placeholder="h" value="0">時間
<input type="number" style="width:50px" id="mins_filter" placeholder="m" value="0">
<button class="btn waves-effect" style="width:120px;" onclick="makeNewFilter()" id="add-filter-btn">追加</button><br>
<input type="number" style="width:50px" id="mins_filter" placeholder="m" value="0"><br>
Quick:<a onclick="filterTime(0,0,30)" class="pointer">30分</a>/
<a onclick="filterTime(0,1,0)" class="pointer">1時間</a>/
<a onclick="filterTime(0,6,0)" class="pointer">6時間</a>/
<a onclick="filterTime(0,12,0)" class="pointer">12時間</a>/
<a onclick="filterTime(1,0,0)" class="pointer">1日</a>/
<a onclick="filterTime(7,0,0)" class="pointer">7日</a>/
<a onclick="filterTime(0,0,0)" class="pointer">無期限</a><br>
<button class="btn waves-effect" style="width:120px;" onclick="makeNewFilter()"
id="add-filter-btn">追加</button><br>
<span class="sml">Integrated TL/Plus TLは、公開/ホームのフィルターワードが合算されて適応されます。どちらか一方の指定でも非表示になります。</span>
</div>
</div>
@@ -772,12 +918,18 @@ var tlid=0;
</a>&nbsp;|&nbsp;
<a onclick="bottomReverse()" class="nex waves-effect">
<i class="material-icons" style="font-size: 1rem;">swap_horiz</i>トゥートボタンの左右入れ替え
</a>&nbsp;|&nbsp;
<a onclick="openRN()" class="nex waves-effect">
<i class="material-icons" style="font-size: 1rem;">new_releases</i>Release Note
</a>
</div>
<div id="main">
<!--TLのTL-->
<div id="timeline-container">
<h3>Welcome to TheDesk</h3><br><a href="acct.html">アカウントを追加</a>するか下の<i class="material-icons">apps</i>ボタンよりカラムを追加してください。
<div id="something-wrong">
<img src="" style="width:150px;margin:5px;display:none;" draggable="false">
<div>内部エラーです。再読込して治らない場合は初期化(全データ削除)をしてください。(事前に設定をエクスポートしておくことをおすすめします。)</div>
</div>
</div>
</div>
</div>
@@ -785,8 +937,10 @@ var tlid=0;
<div id="bottom" class="reverse">
<div class="leftside reverse">
<div id="dambox">
<button id="posttgl" class="btn waves-effect indigo" style="width: 100%;height: 2.5rem;line-height: 0;margin: 0;">
<i class="material-icons" style="position: relative; top: 5px; font-size: 1.5rem; text-align: center; margin-right: 10px;">edit</i>トゥート
<button id="posttgl" class="btn waves-effect indigo"
style="width: 100%;height: 2.5rem;line-height: 0;margin: 0;">
<i class="material-icons"
style="position: relative; top: 5px; font-size: 1.5rem; text-align: center; margin-right: 10px;">edit</i>トゥート
</button>
</div>
<div class="leftside reverse" id="group">
@@ -798,13 +952,16 @@ var tlid=0;
<i class="material-icons nex" title="設定(Ctrl+Shift+S)">settings</i>
</a>
<a onclick="nano()" class="nex waves-effect">
<i class="material-icons" title="最小のマストドン。TheDesk Nano" data-trans-title="nano_desp">remove_from_queue</i>
<i class="material-icons" title="最小のマストドン。TheDesk Nano"
data-trans-title="nano_desp">remove_from_queue</i>
</a>
<a onclick="menu()" class="nex waves-effect" id="list-tgl">
<i class="material-icons" title="リスト">apps</i>
</a>
<span id="fukidashi">←ここからTL追加</span>
</div>
</div>
</div>
</div></div>
<div>
<div id="tips-menu">
<div class="btnsgroup" style="height:34px"><span class="grouptitle">Tips:</span>
@@ -821,7 +978,7 @@ var tlid=0;
<i class="material-icons nex" title="アイマストドントレンド" data-trans-title="trendtip">whatshot</i>
</a>
<a onclick="tips('spotify')" class="nex waves-effect">
<i class="fa fa-spotify nex" title="Spotify" data-trans-title="spotifytips"></i>
<i class="fab fa-spotify nex" title="Spotify" data-trans-title="spotifytips"></i>
</a>
</div>
</div>
@@ -860,6 +1017,7 @@ var tlid=0;
<script type="text/javascript" src="../../js/tl/speech.js"></script>
<script type="text/javascript" src="../../js/ui/post-box.js"></script>
<script type="text/javascript" src="../../js/ui/layout.js"></script>
<script type="text/javascript" src="../../js/post/emoji.js"></script>
<script type="text/javascript" src="../../js/login/instance.js"></script>
<script type="text/javascript" src="../../js/login/login.js"></script>
<script type="text/javascript" src="../../js/ui/img.js"></script>
@@ -873,7 +1031,6 @@ var tlid=0;
<script type="text/javascript" src="../../js/post/img.js"></script>
<script type="text/javascript" src="../../js/post/status.js"></script>
<script type="text/javascript" src="../../js/post/misskeystatus.js"></script>
<script type="text/javascript" src="../../js/post/emoji.js"></script>
<script type="text/javascript" src="../../js/post/suggest.js"></script>
<script type="text/javascript" src="../../js/post/bb-md.js"></script>
<script type="text/javascript" src="../../js/userdata/showOnTL.js"></script>

View File

@@ -1,5 +1,6 @@
<!doctype html>
<html lang="ja">
<html lang="ja" style="overflow:scroll">
<head>
<title>Settings - TheDesk</title>
<!--
@@ -17,8 +18,17 @@
<link href='../../css/font-awesome.css' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
<meta charset="utf-8">
<style>input{max-height:50px!important} .pcr-result{height:1rem !important;}</style>
<style>
input {
max-height: 50px !important
}
.pcr-result {
height: 1rem !important;
}
</style>
</head>
<body id="mainView" style="overflow-y:scroll">
<script type="text/javascript" src="../../js/common/jquery.js"></script>
<script type="text/javascript" src="../../js/platform/first.js"></script>
@@ -37,36 +47,45 @@
<div class="collapsible-body">
<h5>言語</h5>
To translate with Crowdin, you have to login Crowdin and restart TheDesk when login is finished.<br>
<a href="../ja/setting.html" onclick="changelang('ja')">日本語(Japanese)</a>/<a href="../en/setting.html" onclick="changelang('en')">English</a>/<a href="../ps/setting.html" onclick="changelang('ps')">Crowdin web translate</a>/
<a onclick="changelang('ja')" class="pointer" style="margin-right:5px;">日本語</a><a onclick="changelang('en')" class="pointer" style="margin-right:5px;">English</a><a onclick="changelang('ps')" class="pointer" style="margin-right:5px;">Crowdin translate system(beta)</a>
<h5>設定のインポートとエクスポート</h5>
<button onclick="exportSettings()" class="btn waves-effect lime darken-3" style="width:100%; max-width:200px;">エクスポート</button>
<button onclick="importSettings()" class="btn waves-effect cyan darken-3" style="width:100%; max-width:200px;">インポート</button>
<button onclick="exportSettings()" class="btn waves-effect lime darken-3"
style="width:100%; max-width:200px;">エクスポート</button>
<button onclick="importSettings()" class="btn waves-effect cyan darken-3"
style="width:100%; max-width:200px;">インポート</button>
<div id="envView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.id=='notf'"><a onclick="notftest()" class="pointer">通知テスト</a><br></template>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.id=='notf'"><a onclick="notftest()"
class="pointer">通知テスト</a><br></template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue" type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue"
type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<label v-bind:for="item.id+check.value">{{check.text}}</label>
</template>
</template>
<template v-else>
<template v-if="item.doubleText">
<template v-for="(textbox, j) in item.data">
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id" v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id"
v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
</template>
</template>
<template v-else>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id" v-bind:style="{ width: item.width+'px'}"/>{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;" v-on:click="complete(i)">変更</button>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id"
v-bind:style="{ width: item.width+'px'}" />{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;"
v-on:click="complete(i)">変更</button>
</template><br>
</template>
</div>
<h5>フォント</h5>
「選択」を押してフォントを選んでください。<br>
「選択」を押してフォントを選んでください。(Linuxでは動きません)<br>
<button class="btn waves-effect" style="width:100px;" onclick="font()">選択</button><br>
<div id="fonts" class="hide" style="overflow-y:scroll; width:300px; height:500px;"></div>
<br>
@@ -109,40 +128,52 @@
<h5>名前</h5>
<input type="text" style="width:300px" id="custom_name" placeholder="名前...">
<h5>説明</h5>
<div class="input-field"><textarea style="width:300px" id="custom_desc" class="materialize-textarea" placeholder="説明..."></textarea></div>
<div class="input-field"><textarea style="width:300px" id="custom_desc" class="materialize-textarea"
placeholder="説明..."></textarea></div>
<h5>色の系統</h5>
<input class="with-gap" name="derection" type="radio" id="dark" value="dark" checked="true" />
<input class="with-gap" name="direction" type="radio" id="dark" value="dark" checked="true" />
<label for="dark">Dark</label>
<input class="with-gap" name="derection" type="radio" id="light" value="light" />
<input class="with-gap" name="direction" type="radio" id="light" value="light" />
<label for="light">Light</label>
<div id="pickers">
<div>
<h5>Primary</h5>補助要素に使われる背景色
<div id="color-picker0-wrap"><div class="color-picker" id="color-picker0"></div></div>
<div id="color-picker0-wrap">
<div class="color-picker" id="color-picker0"></div>
</div>
<input type="hidden" id="color-picker0_value">
</div>
<div>
<h5>Secondary</h5>全体の背景色など
<div id="color-picker1-wrap"><div class="color-picker" id="color-picker1"></div></div>
<div id="color-picker1-wrap">
<div class="color-picker" id="color-picker1"></div>
</div>
<input type="hidden" id="color-picker1_value">
</div>
<div>
<h5>Texts</h5>テキストの色
<div id="color-picker2-wrap"><div class="color-picker" id="color-picker2"></div></div>
<div id="color-picker2-wrap">
<div class="color-picker" id="color-picker2"></div>
</div>
<input type="hidden" id="color-picker2_value">
</div>
<div>
<h5>Accent</h5>ブーストの背景色など
<div id="color-picker3-wrap"><div class="color-picker" id="color-picker3"></div></div>
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
</div>
</div>
<button class="btn-large waves-effect" onclick="customComp()">変更</button>&nbsp;<button class="btn waves-effect red disabled" id="delTheme" onclick="deleteIt()">削除</button><br><br>
<input type="text" style="width:300px" id="custom_json" class="materialize-textarea" placeholder="JSON style" readonly><br>
<button class="btn-large waves-effect" onclick="customComp()">変更</button>&nbsp;<button
class="btn waves-effect red disabled" id="delTheme" onclick="deleteIt()">削除</button><br><br>
<input type="text" style="width:300px" id="custom_json" class="materialize-textarea"
placeholder="JSON style" readonly><br>
このコードは他のTheDeskなどとシェアできます。このコードをMiASに貼ることはご遠慮ください。詳細:<a href="https://thedesk.top/mias.html" target="_blank">テーマ互換性</a>
<h4>カスタムテーマのインポート</h4>
<a href="https://assets.msky.cafe/" target="_blank">MiAS</a>上の80を超えるテーマを張り付けることもできます。<br>
<input type="text" style="width:300px" id="custom_import" class="materialize-textarea" placeholder="JSON/JSON5 style">
<input type="text" style="width:300px" id="custom_import" class="materialize-textarea"
placeholder="JSON/JSON5 style">
<button class="btn waves-effect" onclick="customImp()">インポート</button><br>
</li>
<li>
@@ -153,26 +184,41 @@
<div id="tlView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
{{item.text.desc}}<br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue" type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue"
type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<label v-bind:for="item.id+check.value">{{check.text}}</label>
</template>
</template>
<template v-else>
<template v-if="item.doubleText">
<template v-for="(textbox, j) in item.data">
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id" v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id"
v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
</template>
</template>
<template v-else>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id" v-bind:style="{ width: item.width+'px'}"/>{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;" v-on:click="complete(i)">変更</button>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id"
v-bind:style="{ width: item.width+'px'}" />{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;"
v-on:click="complete(i)">変更</button>
</template><br>
</template>
</div>
<h5>カスタム通知音</h5>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(1)">Custom 1</button><span
id="c1-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(2)">Custom 2</button><span
id="c2-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(3)">Custom 3</button><span
id="c3-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(4)">Custom 4</button><span
id="c4-file"></span><br>
</div>
</li>
<li>
@@ -183,11 +229,14 @@
<div id="postView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
{{item.text.desc}}<br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
<template v-if="!check.kirishima || (check.kirishima && kirishima)">
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue" type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue"
type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<label v-bind:for="item.id+check.value">{{check.text}}</label>
<span v-if="check.kirishimaText">{{check.kirishimaText}}</span>
</template>
@@ -196,14 +245,17 @@
<template v-else>
<template v-if="item.doubleText">
<template v-for="(textbox, j) in item.data">
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id" v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id"
v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
</template>
</template>
<template v-else>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id" v-bind:style="{ width: item.width+'px'}"/>{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;" v-on:click="complete(i)">変更</button>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id"
v-bind:style="{ width: item.width+'px'}" />{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;"
v-on:click="complete(i)">変更</button>
</template><br>
</template>
</div>
</div>
@@ -270,9 +322,14 @@
<i class="material-icons" style="font-size:24px;">music_note</i>ボタンから簡単にNowPlayingができます。<br>
<h5>アカウントの連携</h5>
APIの性質上thedesk.topへアクセスします。<br>
<div id="spotify-code-show" class="hide"><input type="text" id="spotify-code"><button onclick="spotifyAuth()" class="btn waves-effect" style="width:100px;">設定</button></div>
<a onclick="spotifyConnect()" class="btn waves-effect nex" style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-enable"><i class="fa fa-spotify left"></i>接続</a>
<a onclick="spotifyDisconnect()" class="btn waves-effect nex disabled" style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-disable"><i class="fa fa-spotify left"></i>切断</a>
<div id="spotify-code-show" class="hide"><input type="text" id="spotify-code"><button
onclick="spotifyAuth()" class="btn waves-effect" style="width:100px;">設定</button></div>
<a onclick="spotifyConnect()" class="btn waves-effect nex"
style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-enable"><i
class="fa fa-spotify left"></i>接続</a>
<a onclick="spotifyDisconnect()" class="btn waves-effect nex disabled"
style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-disable"><i
class="fa fa-spotify left"></i>切断</a>
<h5>テンプレートの編集</h5>
以下を編集してテンプレートを変更できます。<br>
<textarea id="np-temp" class="materialize-textarea" data-length="500">#NowPlaying {song} / {album} / {artist}
@@ -280,11 +337,8 @@
Spotify:{song}:曲名/{album}:アルバム名/{artist}:アーティスト名/{url}:各曲のSpotifyのURL<br>
macOS:{song}:曲名/{album}:アルバム名/{artist}:アーティスト名/作曲家{composer}/サンプルレート{hz}/ビットレート{bitRate}/ジャンル{genre}<br>
Windows:{song}:曲名/{album}:アルバム名/{artist}:アーティスト名<br>
<span class="imas hide">CINDERELLA NowPlaying(imastodon.net限定)では作曲家{composer}/作詞家{lyricist}/BPM{bpm}が有効です。<br>
CINDERELLA NowPlayingはimastodon.netにログインしているとき、トゥート欄に「//」を入力し、その後に曲名を入れることで可能です。</span><br>
<button onclick="spotifySave()" class="btn waves-effect" style="width:100px;">設定</button>
<h5>アルバムアートワークを添付する(Spotify/Windows)</h5>
<span class="imas hide">この設定はCINDERELLA NowPlaying(imastodon.net限定)にも適用されます。</span><br>
<input class="with-gap" onchange="spotifyFlagSave()" name="awk" type="radio" id="awk_yes" value="yes" />
<label for="awk_yes">はい</label>
<input class="with-gap" onchange="spotifyFlagSave()" name="awk" type="radio" id="awk_no" value="no" />
@@ -299,23 +353,28 @@
<div class="collapsible-body">
<h5>読み上げの速さ</h5>
1-100まで、デフォルトは10。<br>
<p class="range-field"><input type="range" id="voicespeed" min="1" max="100" value="10" style="width:500px; max-width:100%"/></p>
<p class="range-field"><input type="range" id="voicespeed" min="1" max="100" value="10"
style="width:500px; max-width:100%" /></p>
<h5>読み上げの高さ</h5>
0-100まで、デフォルトは50。(大きくなるほど高い)<br>
<p class="range-field"><input type="range" id="voicepitch" min="0" max="100" value="50" style="width:500px; max-width:100%"/></p>
<p class="range-field"><input type="range" id="voicepitch" min="0" max="100" value="50"
style="width:500px; max-width:100%" /></p>
<h5>読み上げの音量</h5>
0-100まで、デフォルトは100。<br>
<p class="range-field"><input type="range" id="voicevol" min="0" max="100" value="100" style="width:500px; max-width:100%"/></p>
<p class="range-field"><input type="range" id="voicevol" min="0" max="100" value="100"
style="width:500px; max-width:100%" /></p>
<h5>テスト</h5>
<input type="text" style="width:350px" id="voicetxt" value="これはテスト音声です。TheDeskはオープンソースのPC向けマストドンクライアントです。マルチサーバーやマルチカラムに対応しています。">
<button class="btn waves-effect blue" style="width:150px;" onclick="voicePlay()" id="testplay">再生/停止</button><br>
<button class="btn waves-effect blue" style="width:150px;" onclick="voicePlay()"
id="testplay">再生/停止</button><br>
<br>
<button class="btn waves-effect" style="width:100px;" onclick="voiceSettings()">設定</button>
</div>
</li>
</ul>
<br>
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;"><i class="material-icons left">undo</i>戻る</a>
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;"><i
class="material-icons left">undo</i>戻る</a>
<br>
<br>キーボードショートカット一覧
<li>Ctrl+1-9:1番目9番目のTLにスクロール</li>
@@ -346,23 +405,36 @@
<a href="https://astarte.thedesk.top">アスタルテ暇人ランキング</a>を開く
</li><br>
</div>
<button class="btn waves-effect red" style="width:100%; max-width:500px;" onclick="if(confirm('全てのデータを削除します。この操作は取り消せません。')){ localStorage.clear(); location.href='index.html'; }"><i class="material-icons left">delete</i>初期化</button><br><br>
<button class="btn waves-effect indigo" onclick="about()" style="width:100%; max-width:500px;"><i class="material-icons left">info</i>このソフトについて</button>
<a href="https://thedesk.top" class="btn waves-effect deep-purple lighten-2" style="width:100%; max-width:500px;"><i class="material-icons left">web</i>公式HP</a>
<a href="https://enty.jp/Cutls" class="btn waves-effect purple lighten-2" style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>支援(Enty)</a>
<a href="https://www.pixiv.net/fanbox/creator/28105985" class="btn waves-effect red lighten-2" style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>支援(Pixiv FANBOX)</a>
<a href="https://docs.thedesk.top" class="btn waves-effect blue darken-2" style="width:100%; max-width:500px;"><i class="material-icons left">list</i>ヘルプ/Docs(Constructing)</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2" style="width:100%; max-width:500px;"><i class="fa fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@kirishima.cloud" class="btn waves-effect blue lighten-2" style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25" style="padding-top:5px;">Developer: Cutls@kirishima.cloud</a>
<button class="btn waves-effect red" style="width:100%; max-width:500px;"
onclick="if(confirm('全てのデータを削除します。この操作は取り消せません。')){ localStorage.clear(); location.href='index.html'; }"><i
class="material-icons left">delete</i>初期化</button><br><br>
<button class="btn waves-effect indigo" onclick="about()" style="width:100%; max-width:500px;"><i
class="material-icons left">info</i>このソフトについて</button>
<a href="https://thedesk.top" class="btn waves-effect deep-purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">web</i>公式HP</a>
<a href="https://www.pixiv.net/fanbox/creator/28105985" class="btn waves-effect red lighten-2"
style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>支援(Pixiv FANBOX)</a>
<a href="https://www.patreon.com/cutls" class="btn waves-effect red darken-2"
style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>支援(Patreon)</a>
<a href="https://docs.thedesk.top" class="btn waves-effect blue darken-2" style="width:100%; max-width:500px;"><i
class="material-icons left">list</i>ヘルプ/Docs(Constructing)</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2"
style="width:100%; max-width:500px;"><i class="fa fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@cutls.com" class="btn waves-effect blue lighten-2"
style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25"
style="padding-top:5px;">Developer: Cutls@cutls.com</a>
<br>
Kyash<br>
<img src="../../img/kyash.png" width="100"><br>
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';" class="pointer">アップデートを確認</a><br>
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';"
class="pointer">アップデートを確認</a><br>
<a href="oss.html">OSS License(オープンソースライセンス)</a><br>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018 All Rights Reserved.
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy Policy</a>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a
href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy
Policy</a>
<br>Developer: Cutls P(
<a href="index.html?mode=user&code=Cutls@kirishima.cloud">@Cutls@kirishima.cloud</a>)
<a href="index.html?mode=user&code=Cutls@cutls.com">@Cutls@cutls.com</a>)
<br>
</span><br>
TheDeskおよびCutls Pは<a href="https://donken.org/">被災地支援のためのマストドン研究会</a>をログイン機能提供等の形で応援しています。<br>

View File

@@ -7,6 +7,27 @@ var yesno=[
value: "no"
}
];
var sound = [
{
text: "なし",
value: "none"
}, {
text: "既定",
value: "default"
}, {
text: "Custom 1",
value: "c1"
}, {
text: "Custom 2",
value: "c2"
}, {
text: "Custom 3",
value: "c3"
}, {
text: "Custom 4",
value: "c4"
}
];
var envConstruction = [
{
id: "popup",
@@ -286,6 +307,46 @@ var tlConstruction=[
desc: "",
checkbox: yesno
}
}, {
id: "replySound",
storage: "replySound",
checkbox: true,
setValue: "none",
text: {
head: "リプライの通知音",
desc: "",
checkbox: sound
}
}, {
id: "favSound",
storage: "favSound",
checkbox: true,
setValue: "none",
text: {
head: "お気に入り登録の通知音",
desc: "",
checkbox: sound
}
}, {
id: "btSound",
storage: "btSound",
checkbox: true,
setValue: "none",
text: {
head: "ブーストの通知音",
desc: "",
checkbox: sound
}
}, {
id: "followSound",
storage: "followSound",
checkbox: true,
setValue: "none",
text: {
head: "フォローの通知音",
desc: "",
checkbox: sound
}
}
];
var postConstruction = [
@@ -476,5 +537,16 @@ var postConstruction=[
}
]
}
}, {
id: "zero",
storage: "emoji-zero-width",
checkbox: true,
setValue: "normal",
setValue: "no",
text: {
head: "絵文字にゼロ幅スペースを使う",
desc: "",
checkbox: yesno
}
}
]

View File

@@ -1,5 +1,6 @@
<!doctype html>
<html lang="en">
<html lang="ja">
<head>
<title>Update - TheDesk</title>
<link href="../../css/materialize.css" type="text/css" rel="stylesheet">
@@ -14,6 +15,7 @@
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
-->
</head>
<body>
<style>
body {
@@ -23,6 +25,7 @@ body{
padding: 10px;
text-align: right;
}
#start {
display: flex;
justify-content: center;
@@ -31,17 +34,25 @@ body{
height: calc(100vh - 2.5rem);
text-align: center;
}
#checkbox {
text-align: left;
}
a,button,input,label,i{
a,
button,
input,
label,
i {
-webkit-app-region: no-drag;
}
#updskip {
display: flex;
justify-content: center;
align-items: center;
}
.skipbtn {
display: block;
float: left;
@@ -55,10 +66,12 @@ a,button,input,label,i{
border: 1px solid;
overflow: hidden;
}
.skipbtn:hover {
background-color: #b3e5fc;
transition: all 0.3s ease-in-out;
}
#prog {
font-size: 200%;
}
@@ -75,10 +88,14 @@ a,button,input,label,i{
<p>アップデートがあります</p>
<span id="now"></span><b id="ver"></b><br>
<span id="det"></span><br>
<button class="waves-effect btn windows hide" onclick="update('install')" style="margin-left:15px;">インストーラー版(推奨)</button>
<button class="waves-effect btn windows hide" onclick="update('portable')" style="margin-left:15px;">ポータブル版</button>
<button class="waves-effect btn linux hide" onclick="update('linux')" style="margin-left:15px;">開始</button>
<button class="waves-effect btn mac hide" onclick="update('mac')" style="margin-left:15px;">開始</button>
<button class="waves-effect btn windows hide" onclick="update('install')"
style="margin-left:15px;">インストーラー版(推奨)</button>
<button class="waves-effect btn windows hide" onclick="update('portable')"
style="margin-left:15px;">ポータブル版</button>
<button class="waves-effect btn linux hide" onclick="update('linux')"
style="margin-left:15px;">開始</button>
<button class="waves-effect btn mac hide" onclick="update('mac')"
style="margin-left:15px;">開始</button>
<br>
問題が発生しますか?<br><a href="https://thedesk.top">公式HP</a>からダウンロードをお試しください。
</div>
@@ -86,14 +103,21 @@ a,button,input,label,i{
<h4>アップデートは必ず行ってください</h4>
アップデートをスキップする<br>
<div id="updskip">
<a onclick="window.close();" class="pointer skipbtn waves-effect waves-light"><div>次回TL表示時まで</div></a>
<a onclick="nextv();" class="pointer skipbtn waves-effect waves-light"><div>のバージョンが出るまで</div></a>
<a onclick="window.close();" class="pointer skipbtn waves-effect waves-light">
<div>回TL表示時まで</div>
</a>
<a onclick="nextv();" class="pointer skipbtn waves-effect waves-light">
<div>次のバージョンが出るまで</div>
</a>
</div>
<a class="pointer waves-effect" onclick="skipper();" style="margin-top:5px">アップデートを続行</a>
</div>
<div id="dlnow" class="hide">
<h4>ダウンロード中</h4>
<h4 id="prog"></h4>
<div class="progress">
<div class="determinate" style="width: 0%"></div>
</div>
</div>
</div>
<script type="text/javascript" src="../../js/common/about.js"></script>
@@ -113,6 +137,7 @@ function skipper(){
}
var electron = require("electron");
var ipc = electron.ipcRenderer;
//var shell = electron.shell;
verck();
function update(sel) {
$("#box").toggleClass("show");
@@ -158,7 +183,8 @@ function update(sel){
}
} else if (sel == "mac") {
var url = json["mac"];
var file="TheDesk-darwin-x64.zip";
shell.openExternal(url);
return false;
}
ipc.send('download-btn', [url, file]);
});
@@ -169,7 +195,7 @@ function update(sel){
}
ipc.on('prog', function (event, arg) {
console.log(arg);
$("body").css('background','linear-gradient(#fff 0%,#fff '+(1-arg)*100+'%, #d7ccc8 '+(1-arg)*100+'%, #d7ccc8 100%)');
$(".determinate").css("width",arg*100+"%");
$("#prog").text(Math.floor(arg * 100) + "%");
})
ipc.on('mess', function (event, arg) {
@@ -198,9 +224,23 @@ function verck(){
console.error(error);
}).then(function (json) {
console.log(json);
if (platform == "win32") {
$("#ver").text(json.desk);
localStorage.setItem("next-ver", json.desk);
} else if (platform == "linux") {
$("#ver").text(json.desk_linux);
localStorage.setItem("next-ver", json.desk_linux);
} else if (platform == "darwin") {
$("#ver").text(json.desk_mac);
localStorage.setItem("next-ver", json.desk_mac);
}
var lang = "ja";
if (lang == "ja") {
$("#det").html(json.detail);
} else {
$("#det").html(json.detail_en);
}
$("#now").text(localStorage.getItem("ver"));
});

View File

@@ -1,5 +1,6 @@
<!doctype html>
<html lang="{{lang}}">
<html lang="@@lang@@">
<head>
<title>Account Manager - TheDesk</title>
<meta content="width=device-width,initial-scale=1.0" name="viewport">
@@ -10,71 +11,122 @@
<link href='../../css/tl.css' rel='stylesheet' type='text/css'>
<link href='../../css/userdata.css' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
<style>.acct{display:flex; justify-content:space-around;}
.card{width:400px; background-color: #9e9e9e; margin:10px; }
body,html{overflow-y: scroll;}
#acct-list{display:flex; flex-wrap:wrap; color:white; align-items: flex-start}
.lts{font-size:150%}
.colorsel{ display:flex; }
.card .colorsel div:not(.exc){width:20px;height:20px;}
.card .colorsel div.exc{width:40px;height:20px;}
<style>
.acct {
display: flex;
justify-content: space-around;
}
.card {
width: 400px;
background-color: #9e9e9e;
margin: 10px;
}
body,
html {
overflow-y: scroll;
}
#acct-list {
display: flex;
flex-wrap: wrap;
color: white;
align-items: flex-start
}
.lts {
font-size: 150%
}
.colorsel {
display: flex;
}
.card .colorsel div:not(.exc) {
width: 20px;
height: 20px;
}
.card .colorsel div.exc {
width: 40px;
height: 20px;
}
.first {
display: flex;
justify-content: center;
align-items: center
}
.first .hide-first {
display: none;
}
</style>
<meta charset="utf-8">
{{comment-start}}
@@comment-start@@
<script type="text/javascript">
var _jipt = [];
_jipt.push(['project', 'thedesk']);
</script>
<script type="text/javascript" src="https://cdn.crowdin.com/jipt/jipt.js"></script>
{{comment-end}}
@@comment-end@@
</head>
<body id="mainView">
<script type="text/javascript" src="../../js/common/jquery.js"></script>
<script type="text/javascript" src="../../js/platform/first.js"></script>
<script type="text/javascript" src="../../js/common/materialize.js"></script>
<script type="text/javascript" src="../../js/lang/lang.{{lang}}.js"></script>
<script type="text/javascript" src="../../js/lang/lang.@@lang@@.js"></script>
<script>
var misskeytoken = false;
</script>
<script type="text/javascript" src="../../js/ui/tips.js"></script>
<script type="text/javascript" src="../../js/common/time.js"></script>
<script type="text/javascript" src="../../js/common/modal.js"></script>
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;">{{back}}</a><br>
<h5>{{list}}</h5>
<div class="hide-first">
<a href="index.html" class="btn waves-effect orange nex"
style="width:100%; max-width:200px;">@@back@@</a><br>
<h5>@@list@@</h5>
<div id="acct-list"></div>
<div class="divider"></div>
<h5>{{add}}</h5><br>
</div>
<div>
<h5>@@add@@</h5><br>
<div id="add">
<div class="row">
<div class="col s6">
<div class="col s8">
<input type="text" id="url" style="width:70%" placeholder="ex)mstdn.jp">
<div id="ins-suggest"></div>
{{codesetupwarn}}<br>
@@codesetupwarn@@<br>
<input type="checkbox" class="filled-in" id="linux" />
<label for="linux">{{codesetup}}</label><br>
<label for="linux">@@codesetup@@</label><br>
<input type="checkbox" class="filled-in" id="misskey" />
<label for="misskey">{{thisismisskey}}</label><br>
<label for="misskey">@@thisismisskey@@</label><br>
<button class="btn waves-effect" onclick="instance()">Login</button><br>
</div>
<div class="col s6">
<div class="col s4">
<span style="font-family:Open Sans;">Supports</span>
<div id="support" class="collection transparent"></div>
</div>
</div></div>
</div>
</div>
<div id="auth" style="display:none">
{{codepastewarn}}<br>
<input type="text" id="code" placeholder="{{codepaste}}">
@@codepastewarn@@<br>
<input type="text" id="code" placeholder="@@codepaste@@">
<button class="btn waves-effect" onclick="code()">Auth</button><br>
</div>
<div id="misskeylogin" style="display:none">
<h5>AppSecret</h5>
{{misskeylogin}}<br>
@@misskeylogin@@<br>
<input type="hidden" id="misskey-url">
<input type="text" id="misskey-key" placeholder="{{codepaste}}">
<input type="text" id="misskey-key" placeholder="@@codepaste@@">
<button class="btn waves-effect" onclick="misskeyLogin()">Auth</button><br>
</div>
<h5>{{mainacct}}</h5>
<div class="input-field" style="width:300px"><span data-trans="your_acct">{{selacct}}</span>
</div>
<div class="hide-first">
<h5>@@mainacct@@</h5>
<div class="input-field" style="width:300px"><span data-trans="your_acct">@@selacct@@</span>
<br>
<select id="main-acct-sel" class="acct-sel" style="color:black" onchange="mainacct()"></select>
<label></label>
@@ -85,12 +137,13 @@ Administered by:<a id="ins-admin"></a><br>
<span id="ins-desc"></span><br>
<img src="../../img/loading.svg" id="ins-prof" width="200"><br>
<br>
{{domain}}:<span id="ins-name"></span><br>
{{connect}}:<span id="ins-connect"></span>{{ko}}<br>
{{toots}}:<span id="ins-toot"></span>{{ko}}<br>
{{users}}:<span id="ins-user"></span>{{users}}<br>
{{safety}}:<span id="ins-per"></span>%<br>
{{ver}}:<span id="ins-ver"></span>@<span id="ins-upd"></span><br>
@@domain@@:<span id="ins-name"></span><br>
@@connect@@:<span id="ins-connect"></span>@@ko@@<br>
@@toots@@:<span id="ins-toot"></span>@@ko@@<br>
@@users@@:<span id="ins-user"></span>@@users@@<br>
@@safety@@:<span id="ins-per"></span>%<br>
@@ver@@:<span id="ins-ver"></span>@<span id="ins-upd"></span><br>
</div>
<script type="text/javascript" src="../../js/ui/theme.js"></script>
<script type="text/javascript" src="../../js/platform/end.js"></script>
<script type="text/javascript" src="../../js/common/sha256.js"></script>

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
"list":"List of accounts",
"back":"Back",
"add":"Add an account",
"codesetupwarn":"Check if TheDesk is not working on Windows, you want to login Pleroma servers, you cannot login when it checked.",
"codesetupwarn":"Uncheck it to skip pasiting code.(login to Mastodon on Windows or macOS) (Recommended: pcheck)",
"codesetup":"Code setup",
"mainacct":"Main an account",
"selacct":"Select an account",
@@ -17,5 +17,6 @@
"ver":"Mastodon version",
"ko":"",
"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"
}

View File

@@ -2,7 +2,7 @@
"list":"アカウント一覧",
"back":"戻る",
"add":"アカウントを追加",
"codesetupwarn":"Windows以外でご使用の方やPleromaにログインされる方はチェックを入れて下さい。ログインできない場合、チェックを外してください。",
"codesetupwarn":"チェックを外すとコード貼り付けをスキップできます。(<u>Mastodon</u>にWindowsやmacOSからログインする場合)失敗する場合はチェックを入れてください。",
"codesetup":"コードセットアップ",
"mainacct":"メインアカウント",
"selacct":"アカウントを選択",
@@ -17,5 +17,6 @@
"ver":"Mastodonバージョン",
"ko":"個",
"thisismisskey":"Misskeyとしてログイン",
"misskeylogin":"<a href=\"https://thedesk.top/how-to-misskey-login.html\">ドキュメント</a>を参照して正しいコードを入れてください。"
"misskeylogin":"<a href=\"https://thedesk.top/how-to-misskey-login.html\">ドキュメント</a>を参照して正しいコードを入れてください。",
"nodata":"アカウントがありません"
}

View File

@@ -56,6 +56,9 @@
"contextAfter":"Context after this toot",
"beforeLTL":"Local TL before this toot",
"beforeUTL":"User TL before this toot",
"afterLTL":"Local TL after this toot)",
"afterUTL":"User TL before this toot",
"afterFTL":"Federated TL after this toot",
"favedPeople":"People who favourited it",
"btedPeople":"People who boosted it",
"useOtherAcct1":"Use other account",
@@ -98,13 +101,14 @@
"note":"Note",
"editProfImg":"Change avataor",
"editHeader":"Change header image",
"blocked":"You are blocked. Why?",
"likeUserDes":"Get people resembling this user.",
"get":"Get",
"historyBack":"Back",
"empUser":"Emphasize this user",
"supportme":"Support TheDesk!",
"TheDeskDes":"TheDesk has no ad, you need no charge to unlock premium features. We need your friendly support!",
"EntySupport":"Support on Enty",
"PatreonSupport":"Support on Patreon",
"PixivSupport":"Support on Pixiv FANBOX",
"AWLSupport":"Amazon Wish List",
"SendAmazonGift1":"Give me Amazon Gift Card:",
@@ -137,12 +141,13 @@
"avalableBefore":"Expire after",
"warnAvBefore":"Unset or \"0\" means \"Never\"",
"warnAvBefore2":"This value may contain some error",
"days":"days",
"hours":"hours",
"mins":"minutes",
"secs":"seconds",
"unlimited":"Never",
"days":"day(s)",
"hours":"hour(s)",
"mins":"minute(s)",
"secs":"second(s)",
"warnOnIntegratedTL":"Integrated TL/Plus TL will hide both Home-filtering words and Local-filtering words.",
"helloTheDesk":"<h3>Welcome to TheDesk</h3><br><a href=\"acct.html\">Add an account</a> or click <i class=\"material-icons\">apps</i> to add a column.",
"helloTheDesk":"Internal error: please clear all data(at setting page) <b>All data will be deleted.</b>",
"addColumn":"Add a column",
"sortColumns":"Sort",
"acctMan":"Account Manager",
@@ -156,5 +161,6 @@
"ramTips":"RAM status",
"changeTips":"Change Tips",
"help":"Help",
"about":"About TheDesk"
"about":"About TheDesk",
"hereAddColumns":"<- Add TL"
}

View File

@@ -56,6 +56,9 @@
"contextAfter":"これより後の会話",
"beforeLTL":"これより前のLocal TL(エアリプソース確認)",
"beforeUTL":"これより前のユーザーTL(BTソース確認)",
"afterLTL":"これより後のLocal TL(言及確認)",
"afterUTL":"これより後のユーザーTL(言及確認)",
"afterFTL":"これより後の連合TL(言及確認)",
"favedPeople":"このトゥートをお気に入りに登録した人",
"btedPeople":"このトゥートをブーストした人",
"useOtherAcct1":"他のアカウントを使用",
@@ -98,13 +101,14 @@
"note":"自己紹介",
"editProfImg":"アバターを変更",
"editHeader":"ヘッダーを変更",
"blocked":"ブロックされています。なぜでしょう?",
"likeUserDes":"似ているユーザーを取得できます。",
"get":"取得",
"historyBack":"一つ前のユーザーデータ",
"empUser":"ユーザー強調",
"supportme":"ご支援ください。",
"TheDeskDes":"TheDeskは営利目的ではないため、有料機能や広告は一切ありません。<br>皆様のあたたかいご支援のもとで製作されています。",
"EntySupport":"Entyで支援",
"PatreonSupport":"Patreonで支援",
"PixivSupport":"Pixiv FANBOXで支援",
"AWLSupport":"Amazonほしいものリスト",
"SendAmazonGift1":"",
@@ -135,14 +139,15 @@
"except":"除外",
"exceptWorn":"「除外」時マッチしたトゥートは非可逆的に除外され、削除後も閲覧できません。",
"avalableBefore":"有効期限(あと)",
"warnAvBefore":"未指定(または0分)で「無限」になります。",
"warnAvBefore":"未指定(または0分)で「無限」になります。",
"warnAvBefore2":"仕様上数値の正確性を保証できません。",
"unlimited":"無期限",
"days":"日",
"hours":"時間",
"mins":"分",
"secs":"秒",
"warnOnIntegratedTL":"Integrated TL/Plus TLは、公開/ホームのフィルターワードが合算されて適応されます。どちらか一方の指定でも非表示になります。",
"helloTheDesk":"<h3>Welcome to TheDesk</h3><br><a href=\"acct.html\">アカウントを追加</a>するか下の<i class=\"material-icons\">apps</i>ボタンよりカラムを追加してください。",
"helloTheDesk":"内部エラーです。再読込して治らない場合は初期化(全データ削除)をしてください。(事前に設定をエクスポートしておくことをおすすめします。)",
"addColumn":"カラム追加",
"sortColumns":"カラム一覧/並べ替え",
"acctMan":"アカウントマネージャー",
@@ -156,5 +161,6 @@
"ramTips":"システムメモリ容量",
"changeTips":"Tips変更",
"help":"ヘルプ",
"about":"このソフトについて"
"about":"このソフトについて",
"hereAddColumns":"←ここからTL追加"
}

View File

@@ -3,6 +3,8 @@
"set":"Save",
"yes":"Yes",
"no":"No",
"none":"None",
"default":"Default",
"change":"Change",
"select":"Select",
"env":"System Preferences",
@@ -25,7 +27,7 @@
"fixwidthwarn":"",
"above":"above",
"font":"Font",
"fontwarn":"Select your favorite font to 'Select'",
"fontwarn":"Select your favorite font to 'Select'(Windows/ macOS only)",
"fontsize":"Font size",
"savefolder":"Folder to save",
"savefolderwarn":"TheDesk uses this value when it try to save pictures or take screenshots.",
@@ -85,6 +87,11 @@
"ticker":"Enable #InstanceTicker",
"tickerwarn":"Show colorful stickers about the server. <a href=\"https://cdn.weep.me/mastodon/\">About #InstanceTicker</a> Copyright 2018 weepjp, kyori19.",
"animation":"Animation of timelines",
"replySound":"Sound(Reply)",
"favSound":"Sound(Fav)",
"btSound":"Sound(Boost)",
"followSound":"Sound(Follow)",
"customSound":"Custom sound",
"post":"Posting Preferences",
"autocw":"Alert before posting a long toot.",
"autocwwarn":"Show dialog whether you make too-long text hidden.",
@@ -114,6 +121,7 @@
"secwarn":"Toot with other visibility setting",
"nothing":"Hidden",
"localonly":"Local Only",
"zeroWidthEmoji":"Zero-width space when inserting emojis",
"keysc":"Keyboard shortcut Preferences",
"iks":"Easy inserter",
"okswarn":"You can insert any letters and emojis with only 3 keys",

View File

@@ -3,6 +3,8 @@
"set":"設定",
"yes":"はい",
"no":"いいえ",
"none":"なし",
"default":"既定",
"change":"変更",
"select":"選択",
"env":"環境設定",
@@ -25,7 +27,7 @@
"fixwidthwarn":"",
"above":"以上",
"font":"フォント",
"fontwarn":"「選択」を押してフォントを選んでください。",
"fontwarn":"「選択」を押してフォントを選んでください。(Linuxでは動きません)",
"fontsize":"フォントサイズ",
"savefolder":"デフォルトの保存先",
"savefolderwarn":"画像ダウンロードやスクリーンショットに影響します。",
@@ -85,6 +87,11 @@
"ticker":"#InstanceTickerを使う",
"tickerwarn":"トゥートした人の所属サーバーをわかりやすく彩ります(自サーバー以外のトゥート向け)。<a href=\"https://cdn.weep.me/mastodon/\">#InstanceTickerについて</a> Copyright 2018 weepjp, kyori19.",
"animation":"タイムラインのアニメーション",
"replySound":"リプライの通知音",
"favSound":"お気に入り登録の通知音",
"btSound":"ブーストの通知音",
"followSound":"フォローの通知音",
"customSound":"カスタム通知音",
"post":"投稿設定",
"autocw":"長文投稿時に警告",
"autocwwarn":"下で指定した以上のトゥートを投稿するときにCWするかのダイアログを表示します。",
@@ -114,6 +121,7 @@
"secwarn":"公開範囲の変更とトゥートを一発でできます。",
"nothing":"表示しない",
"localonly":"ローカル限定",
"zeroWidthEmoji":"絵文字にゼロ幅スペースを使う",
"keysc":"キーボードショートカットの設定",
"iks":"簡単文字入力",
"okswarn":"絵文字やタグ、&gt;BTなどを登録しておくとすぐに入力できます。",

37
app/view/make/make.js Normal file
View File

@@ -0,0 +1,37 @@
const fs = require("fs")
const ver = "Usamin (18.5.0)"
const langs = ["ja", "en", "ps"]
const langsh = ["日本語", "English", "Crowdin translate system(beta)"]
const simples = ["acct", "index", "setting", "update", "setting"]
const samples = ["acct.sample.html", "index.sample.html", "setting.sample.html", "update.sample.html", "setting.sample.js"]
const pages = ["acct.html", "index.html", "setting.html", "update.html", "setting.vue.js"]
let langstr = ""
for (let n = 0; n < langs.length; n++) {
let lang = langs[n]
langstr = langstr + '<a onclick="changelang(\'' + lang + '\')" class="pointer" style="margin-right:5px;">' + langsh[n] + '</a>'
}
for (let i = 0; i < samples.length; i++) {
let sample = samples[i]
let sourceParent = fs.readFileSync(sample, 'utf8')
for (let j = 0; j < langs.length; j++) {
let source = sourceParent
let lang = langs[j]
let target = JSON.parse(fs.readFileSync("language/" + simples[i] + "." + lang + ".json", 'utf8'))
Object.keys(target).forEach(function (key) {
let str = target[key]
var regExp = new RegExp("@@" + key + "@@", "g")
source = source.replace(regExp, str)
})
if (lang == "ps") {
source = source.replace(/@@comment-start@@/g, "")
source = source.replace(/@@comment-end@@/g, "")
} else {
source = source.replace(/@@comment-start@@/g, "<!--")
source = source.replace(/@@comment-end@@/g, "-->")
}
source = source.replace(/@@versionLetter@@/g, ver)
source = source.replace(/@@lang@@/g, lang)
source = source.replace(/@@langlist@@/g, langstr)
fs.writeFileSync("../" + lang + "/" + pages[i], source)
}
}

View File

@@ -1,5 +1,6 @@
<!doctype html>
<html lang="@@lang@@">
<html lang="@@lang@@" style="overflow:scroll">
<head>
<title>Settings - TheDesk</title>
@@comment-start@@
@@ -17,8 +18,17 @@
<link href='../../css/font-awesome.css' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
<meta charset="utf-8">
<style>input{max-height:50px!important} .pcr-result{height:1rem !important;}</style>
<style>
input {
max-height: 50px !important
}
.pcr-result {
height: 1rem !important;
}
</style>
</head>
<body id="mainView" style="overflow-y:scroll">
<script type="text/javascript" src="../../js/common/jquery.js"></script>
<script type="text/javascript" src="../../js/platform/first.js"></script>
@@ -39,30 +49,39 @@
To translate with Crowdin, you have to login Crowdin and restart TheDesk when login is finished.<br>
@@langlist@@
<h5>@@backup@@</h5>
<button onclick="exportSettings()" class="btn waves-effect lime darken-3" style="width:100%; max-width:200px;">@@export@@</button>
<button onclick="importSettings()" class="btn waves-effect cyan darken-3" style="width:100%; max-width:200px;">@@import@@</button>
<button onclick="exportSettings()" class="btn waves-effect lime darken-3"
style="width:100%; max-width:200px;">@@export@@</button>
<button onclick="importSettings()" class="btn waves-effect cyan darken-3"
style="width:100%; max-width:200px;">@@import@@</button>
<div id="envView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
<templete v-html=item.text.desc></templete><br>
<template v-if="item.id=='notf'"><a onclick="notftest()" class="pointer">@@nntest@@</a><br></template>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.id=='notf'"><a onclick="notftest()"
class="pointer">@@nntest@@</a><br></template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue" type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue"
type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<label v-bind:for="item.id+check.value">{{check.text}}</label>
</template>
</template>
<template v-else>
<template v-if="item.doubleText">
<template v-for="(textbox, j) in item.data">
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id" v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id"
v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
</template>
</template>
<template v-else>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id" v-bind:style="{ width: item.width+'px'}"/>{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;" v-on:click="complete(i)">@@change@@</button>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id"
v-bind:style="{ width: item.width+'px'}" />{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;"
v-on:click="complete(i)">@@change@@</button>
</template><br>
</template>
</div>
<h5>@@font@@</h5>
@@ -109,40 +128,52 @@
<h5>@@name@@</h5>
<input type="text" style="width:300px" id="custom_name" placeholder="@@name@@...">
<h5>@@desc@@</h5>
<div class="input-field"><textarea style="width:300px" id="custom_desc" class="materialize-textarea" placeholder="@@desc@@..."></textarea></div>
<div class="input-field"><textarea style="width:300px" id="custom_desc" class="materialize-textarea"
placeholder="@@desc@@..."></textarea></div>
<h5>@@customthemeDirection@@</h5>
<input class="with-gap" name="derection" type="radio" id="dark" value="dark" checked="true" />
<input class="with-gap" name="direction" type="radio" id="dark" value="dark" checked="true" />
<label for="dark">Dark</label>
<input class="with-gap" name="derection" type="radio" id="light" value="light" />
<input class="with-gap" name="direction" type="radio" id="light" value="light" />
<label for="light">Light</label>
<div id="pickers">
<div>
<h5>Primary</h5>@@secondarycolor@@
<div id="color-picker0-wrap"><div class="color-picker" id="color-picker0"></div></div>
<div id="color-picker0-wrap">
<div class="color-picker" id="color-picker0"></div>
</div>
<input type="hidden" id="color-picker0_value">
</div>
<div>
<h5>Secondary</h5>@@primary@@
<div id="color-picker1-wrap"><div class="color-picker" id="color-picker1"></div></div>
<div id="color-picker1-wrap">
<div class="color-picker" id="color-picker1"></div>
</div>
<input type="hidden" id="color-picker1_value">
</div>
<div>
<h5>Texts</h5>@@text@@
<div id="color-picker2-wrap"><div class="color-picker" id="color-picker2"></div></div>
<div id="color-picker2-wrap">
<div class="color-picker" id="color-picker2"></div>
</div>
<input type="hidden" id="color-picker2_value">
</div>
<div>
<h5>Accent</h5>@@accent@@
<div id="color-picker3-wrap"><div class="color-picker" id="color-picker3"></div></div>
<div id="color-picker3-wrap">
<div class="color-picker" id="color-picker3"></div>
</div>
<input type="hidden" id="color-picker3_value">
</div>
</div>
<button class="btn-large waves-effect" onclick="customComp()">@@change@@</button>&nbsp;<button class="btn waves-effect red disabled" id="delTheme" onclick="deleteIt()">@@delete@@</button><br><br>
<input type="text" style="width:300px" id="custom_json" class="materialize-textarea" placeholder="JSON style" readonly><br>
<button class="btn-large waves-effect" onclick="customComp()">@@change@@</button>&nbsp;<button
class="btn waves-effect red disabled" id="delTheme" onclick="deleteIt()">@@delete@@</button><br><br>
<input type="text" style="width:300px" id="custom_json" class="materialize-textarea"
placeholder="JSON style" readonly><br>
@@customShare@@
<h4>@@customImport@@</h4>
@@cImpWarn@@<br>
<input type="text" style="width:300px" id="custom_import" class="materialize-textarea" placeholder="JSON/JSON5 style">
<input type="text" style="width:300px" id="custom_import" class="materialize-textarea"
placeholder="JSON/JSON5 style">
<button class="btn waves-effect" onclick="customImp()">@@import@@</button><br>
</li>
<li>
@@ -153,26 +184,41 @@
<div id="tlView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
{{item.text.desc}}<br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue" type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue"
type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<label v-bind:for="item.id+check.value">{{check.text}}</label>
</template>
</template>
<template v-else>
<template v-if="item.doubleText">
<template v-for="(textbox, j) in item.data">
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id" v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id"
v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
</template>
</template>
<template v-else>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id" v-bind:style="{ width: item.width+'px'}"/>{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;" v-on:click="complete(i)">@@change@@</button>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id"
v-bind:style="{ width: item.width+'px'}" />{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;"
v-on:click="complete(i)">@@change@@</button>
</template><br>
</template>
</div>
<h5>@@customSound@@</h5>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(1)">Custom 1</button><span
id="c1-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(2)">Custom 2</button><span
id="c2-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(3)">Custom 3</button><span
id="c3-file"></span><br>
<button class="btn waves-effect" style="width:120px;" onclick="customSound(4)">Custom 4</button><span
id="c4-file"></span><br>
</div>
</li>
<li>
@@ -183,11 +229,14 @@
<div id="postView">
<template v-for="(item, i) in config">
<h5>{{item.text.head}}</h5>
{{item.text.desc}}<br>
<template v-if="item.text.desc">
<templete v-html="item.text.desc"></templete><br>
</template>
<template v-if="item.checkbox">
<template v-for="(check, j) in item.text.checkbox">
<template v-if="!check.kirishima || (check.kirishima && kirishima)">
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue" type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<input class="with-gap" v-on:click="complete(i,check.value)" v-model="item.setValue"
type="radio" v-bind:id="item.id+check.value" v-bind:value="check.value" />
<label v-bind:for="item.id+check.value">{{check.text}}</label>
<span v-if="check.kirishimaText">{{check.kirishimaText}}</span>
</template>
@@ -196,14 +245,17 @@
<template v-else>
<template v-if="item.doubleText">
<template v-for="(textbox, j) in item.data">
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id" v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
<input type="text" v-model="textbox.setValue" type="radio" v-bind:id="textbox.id"
v-bind:style="{ width: textbox.width+'px'}" />{{textbox.text.after}}
</template>
</template>
<template v-else>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id" v-bind:style="{ width: item.width+'px'}"/>{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;" v-on:click="complete(i)">@@change@@</button>
<input type="text" v-model="item.setValue" type="radio" v-bind:id="item.id"
v-bind:style="{ width: item.width+'px'}" />{{item.text.after}}
</template>
<button class="btn waves-effect" style="width:100px;"
v-on:click="complete(i)">@@change@@</button>
</template><br>
</template>
</div>
</div>
@@ -270,9 +322,14 @@
@@spotifynote1@@<i class="material-icons" style="font-size:24px;">music_note</i>@@spotifynote2@@<br>
<h5>@@link@@</h5>
@@linkwarn@@<br>
<div id="spotify-code-show" class="hide"><input type="text" id="spotify-code"><button onclick="spotifyAuth()" class="btn waves-effect" style="width:100px;">@@set@@</button></div>
<a onclick="spotifyConnect()" class="btn waves-effect nex" style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-enable"><i class="fa fa-spotify left"></i>@@connect@@</a>
<a onclick="spotifyDisconnect()" class="btn waves-effect nex disabled" style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-disable"><i class="fa fa-spotify left"></i>@@disconnect@@</a>
<div id="spotify-code-show" class="hide"><input type="text" id="spotify-code"><button
onclick="spotifyAuth()" class="btn waves-effect" style="width:100px;">@@set@@</button></div>
<a onclick="spotifyConnect()" class="btn waves-effect nex"
style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-enable"><i
class="fa fa-spotify left"></i>@@connect@@</a>
<a onclick="spotifyDisconnect()" class="btn waves-effect nex disabled"
style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-disable"><i
class="fa fa-spotify left"></i>@@disconnect@@</a>
<h5>@@templeteedit@@</h5>
@@templeteeditwarn@@<br>
<textarea id="np-temp" class="materialize-textarea" data-length="500">#NowPlaying {song} / {album} / {artist}
@@ -280,11 +337,8 @@
@@templete1@@<br>
@@templete2@@<br>
@@templete3@@<br>
<span class="imas hide">CINDERELLA NowPlaying(imastodon.net限定)では作曲家{composer}/作詞家{lyricist}/BPM{bpm}が有効です。<br>
CINDERELLA NowPlayingはimastodon.netにログインしているとき、トゥート欄に「//」を入力し、その後に曲名を入れることで可能です。</span><br>
<button onclick="spotifySave()" class="btn waves-effect" style="width:100px;">@@set@@</button>
<h5>@@postartwork@@</h5>
<span class="imas hide">この設定はCINDERELLA NowPlaying(imastodon.net限定)にも適用されます。</span><br>
<input class="with-gap" onchange="spotifyFlagSave()" name="awk" type="radio" id="awk_yes" value="yes" />
<label for="awk_yes">@@yes@@</label>
<input class="with-gap" onchange="spotifyFlagSave()" name="awk" type="radio" id="awk_no" value="no" />
@@ -299,23 +353,28 @@
<div class="collapsible-body">
<h5>@@speed@@</h5>
@@speedwarn@@<br>
<p class="range-field"><input type="range" id="voicespeed" min="1" max="100" value="10" style="width:500px; max-width:100%"/></p>
<p class="range-field"><input type="range" id="voicespeed" min="1" max="100" value="10"
style="width:500px; max-width:100%" /></p>
<h5>@@pitch@@</h5>
@@pitchwarn@@<br>
<p class="range-field"><input type="range" id="voicepitch" min="0" max="100" value="50" style="width:500px; max-width:100%"/></p>
<p class="range-field"><input type="range" id="voicepitch" min="0" max="100" value="50"
style="width:500px; max-width:100%" /></p>
<h5>@@vol@@</h5>
@@volwarn@@<br>
<p class="range-field"><input type="range" id="voicevol" min="0" max="100" value="100" style="width:500px; max-width:100%"/></p>
<p class="range-field"><input type="range" id="voicevol" min="0" max="100" value="100"
style="width:500px; max-width:100%" /></p>
<h5>@@test@@</h5>
<input type="text" style="width:350px" id="voicetxt" value="@@sample@@">
<button class="btn waves-effect blue" style="width:150px;" onclick="voicePlay()" id="testplay">@@playstop@@</button><br>
<button class="btn waves-effect blue" style="width:150px;" onclick="voicePlay()"
id="testplay">@@playstop@@</button><br>
<br>
<button class="btn waves-effect" style="width:100px;" onclick="voiceSettings()">@@set@@</button>
</div>
</li>
</ul>
<br>
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;"><i class="material-icons left">undo</i>@@back@@</a>
<a href="index.html" class="btn waves-effect orange nex" style="width:100%; max-width:200px;"><i
class="material-icons left">undo</i>@@back@@</a>
<br>
<br>@@keyscs@@
<li>Ctrl+1-9:@@keyscr@@</li>
@@ -346,23 +405,36 @@
<a href="https://astarte.thedesk.top">アスタルテ暇人ランキング</a>を開く
</li><br>
</div>
<button class="btn waves-effect red" style="width:100%; max-width:500px;" onclick="if(confirm('@@resetconfirm@@')){ localStorage.clear(); location.href='index.html'; }"><i class="material-icons left">delete</i>@@reset@@</button><br><br>
<button class="btn waves-effect indigo" onclick="about()" style="width:100%; max-width:500px;"><i class="material-icons left">info</i>@@about@@</button>
<a href="https://thedesk.top" class="btn waves-effect deep-purple lighten-2" style="width:100%; max-width:500px;"><i class="material-icons left">web</i>@@hp@@</a>
<a href="https://enty.jp/Cutls" class="btn waves-effect purple lighten-2" style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>@@support@@(Enty)</a>
<a href="https://www.pixiv.net/fanbox/creator/28105985" class="btn waves-effect red lighten-2" style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>@@support@@(Pixiv FANBOX)</a>
<a href="https://docs.thedesk.top" class="btn waves-effect blue darken-2" style="width:100%; max-width:500px;"><i class="material-icons left">list</i>@@help@@/Docs(Constructing)</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2" style="width:100%; max-width:500px;"><i class="fa fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@kirishima.cloud" class="btn waves-effect blue lighten-2" style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25" style="padding-top:5px;">Developer: Cutls@kirishima.cloud</a>
<button class="btn waves-effect red" style="width:100%; max-width:500px;"
onclick="if(confirm('@@resetconfirm@@')){ localStorage.clear(); location.href='index.html'; }"><i
class="material-icons left">delete</i>@@reset@@</button><br><br>
<button class="btn waves-effect indigo" onclick="about()" style="width:100%; max-width:500px;"><i
class="material-icons left">info</i>@@about@@</button>
<a href="https://thedesk.top" class="btn waves-effect deep-purple lighten-2" style="width:100%; max-width:500px;"><i
class="material-icons left">web</i>@@hp@@</a>
<a href="https://www.pixiv.net/fanbox/creator/28105985" class="btn waves-effect red lighten-2"
style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>@@support@@(Pixiv FANBOX)</a>
<a href="https://www.patreon.com/cutls" class="btn waves-effect red darken-2"
style="width:100%; max-width:500px;"><i class="material-icons left">trending_up</i>@@support@@(Patreon)</a>
<a href="https://docs.thedesk.top" class="btn waves-effect blue darken-2" style="width:100%; max-width:500px;"><i
class="material-icons left">list</i>@@help@@/Docs(Constructing)</a>
<a href="https://github.com/cutls/TheDesk" class="btn waves-effect black lighten-2"
style="width:100%; max-width:500px;"><i class="fa fa-github left"></i>GitHub</a>
<a href="index.html?mode=user&code=Cutls@cutls.com" class="btn waves-effect blue lighten-2"
style="width:100%; max-width:500px;"><img src="../../img/desk_full.svg" class="left" width="25"
style="padding-top:5px;">Developer: Cutls@cutls.com</a>
<br>
Kyash<br>
<img src="../../img/kyash.png" width="100"><br>
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';" class="pointer">@@checkup@@</a><br>
<a onclick="localStorage.removeItem('new-ver-skip'); location.href='index.html';"
class="pointer">@@checkup@@</a><br>
<a href="oss.html">OSS License@@ossJP@@</a><br>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018 All Rights Reserved.
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy Policy</a>
<span style="font-family:Open Sans;">Copyright &copy; TheDesk 2018
Under <a href="https://github.com/cutls/TheDesk/blob/master/LICENSE">GNU General Public License v3.0</a> and <a
href="https://thedesk.top/tos.html">Terms of Use</a>/<a href="https://thedesk.top/priv.html">Privacy
Policy</a>
<br>Developer: Cutls P(
<a href="index.html?mode=user&code=Cutls@kirishima.cloud">@Cutls@kirishima.cloud</a>)
<a href="index.html?mode=user&code=Cutls@cutls.com">@Cutls@cutls.com</a>)
<br>
</span><br>
TheDeskおよびCutls Pは<a href="https://donken.org/">被災地支援のためのマストドン研究会</a>をログイン機能提供等の形で応援しています。<br>

View File

@@ -7,6 +7,27 @@ var yesno=[
value: "no"
}
];
var sound = [
{
text: "@@none@@",
value: "none"
}, {
text: "@@default@@",
value: "default"
}, {
text: "Custom 1",
value: "c1"
}, {
text: "Custom 2",
value: "c2"
}, {
text: "Custom 3",
value: "c3"
}, {
text: "Custom 4",
value: "c4"
}
];
var envConstruction = [
{
id: "popup",
@@ -286,6 +307,46 @@ var tlConstruction=[
desc: "",
checkbox: yesno
}
}, {
id: "replySound",
storage: "replySound",
checkbox: true,
setValue: "none",
text: {
head: "@@replySound@@",
desc: "",
checkbox: sound
}
}, {
id: "favSound",
storage: "favSound",
checkbox: true,
setValue: "none",
text: {
head: "@@favSound@@",
desc: "",
checkbox: sound
}
}, {
id: "btSound",
storage: "btSound",
checkbox: true,
setValue: "none",
text: {
head: "@@btSound@@",
desc: "",
checkbox: sound
}
}, {
id: "followSound",
storage: "followSound",
checkbox: true,
setValue: "none",
text: {
head: "@@followSound@@",
desc: "",
checkbox: sound
}
}
];
var postConstruction = [
@@ -476,5 +537,16 @@ var postConstruction=[
}
]
}
}, {
id: "zero",
storage: "emoji-zero-width",
checkbox: true,
setValue: "normal",
setValue: "no",
text: {
head: "@@zeroWidthEmoji@@",
desc: "",
checkbox: yesno
}
}
]

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