Compare commits

..

1179 Commits

Author SHA1 Message Date
cutls
81c476c1bb TheDesk 21.2.2 (Mayu) 2020-09-09 22:04:24 +09:00
cutls
ccc44ca769 bump 2020-09-09 20:54:31 +09:00
cutls
82c5a853cb fix 2020-09-09 20:54:07 +09:00
cutls
e11af25ba6 TheDesk 21.2.1 (Mayu) 2020-09-09 20:46:52 +09:00
cutls
16b68bb190 TheDesk 21.2.0 (Mayu) 2020-09-09 17:15:19 +09:00
cutls
051dbb3b1b For store only build 2020-09-09 16:59:18 +09:00
cutls
bdf2b9be71 disabled version checker for MS Store 2020-09-09 16:58:41 +09:00
cutls
0b6a76d01a travis trial 6 2020-09-09 16:53:44 +09:00
cutls
bd1e1f7ee8 travis trial 5 2020-09-09 16:49:00 +09:00
cutls
e9c7ffe825 travis trial 4 2020-09-09 16:45:32 +09:00
cutls
9e735bc7df travis trial 3 2020-09-09 16:42:12 +09:00
cutls
eefc03c4f3 travis trial 2 2020-09-09 16:37:17 +09:00
cutls
135caffaec travis trial 1 2020-09-09 16:34:45 +09:00
cutls
c1f7abac58 not to ban for MS Store 2020-09-09 16:33:11 +09:00
cutls
a325c50f1f pwa exp 2020-09-08 23:56:35 +09:00
cutls
37daa5638b to pwa 2020-09-08 23:46:55 +09:00
cutls
8118806f4e fix input type color css 2020-09-08 23:39:06 +09:00
cutls
3f7aaa7e99 new custom/default css 2020-09-08 23:35:30 +09:00
cutls
700de676d0 to streaming notifications with new subscription type streaming 2020-09-08 23:35:13 +09:00
cutls
52a8ec8033 to fix translate btn design 2020-09-08 23:34:42 +09:00
cutls
40a884b4f5 Redesign of column setting 2020-09-08 18:50:05 +09:00
cutls
62df4e2fac bug of custom sound 2020-09-08 18:49:55 +09:00
cutls
69d60a7372 I8d TL streaming 2020-09-07 19:06:57 +09:00
cutls
9623b79197 #317 dropdown menu with library 2020-09-07 16:36:25 +09:00
cutls
ec1481aed0 fix 2020-09-07 00:58:26 +09:00
cutls
1e76867fd1 TheDesk 21.1.1 (Mayu) 2020-09-07 00:55:47 +09:00
cutls
7ff01413e5 some fix 2020-09-07 00:23:10 +09:00
cutls
48b3ed3aca some fix 2020-09-07 00:14:51 +09:00
cutls
e75d52f985 TheDesk 21.1.0 (Mayu) 2020-09-07 00:08:30 +09:00
cutls
3f95e755b5 cannot get next fav/flw/fler 2020-09-06 23:29:12 +09:00
cutls
9d0f4096f8 #317 nice reload 2020-09-06 22:57:20 +09:00
cutls
e402e0e7a7 materialize-css update 2020-09-06 21:39:16 +09:00
cutls
38c77fb39e streaming disconnect warrior 2020-09-06 21:38:15 +09:00
cutls
3020adbe9d #317 annoucement 2020-09-06 21:37:50 +09:00
cutls
4df390713c #317 announcement bug 2020-09-04 23:54:49 +09:00
cutls
bec4444388 #307 #317 margin between timelines 2020-09-04 23:43:04 +09:00
cutls
2d249f6f19 max/min width of column 2020-09-03 23:17:01 +09:00
cutls
4d1053ce99 Use proxy media url for unknown media 2020-09-03 22:57:53 +09:00
cutls
0522331977 Channel subscription type streaming 2020-09-03 11:21:20 +09:00
cutls
eb9520397c z-index 2020-09-03 11:20:57 +09:00
cutls
f0c93b8fce #342 emoji 2020-09-03 11:20:36 +09:00
cutls
b3e9c3d6ce wip: channel subscription type streaming 2020-09-02 13:24:59 +09:00
cutls
99793f2e20 TheDesk Nano fixed 2020-09-02 12:11:02 +09:00
cutls
f43bd64be2 minimum hashtag streaming 2020-09-02 12:02:31 +09:00
cutls
fa440e8d9b fix some CSS 2020-08-30 22:42:49 +09:00
cutls
91bc8c8bdd WIP #317 last.fm 2020-08-12 10:01:14 +09:00
cutls
74d756d43b #317 for a11y 2020-08-12 09:48:28 +09:00
cutls
2281d0ca35 #317 WebView prefer 2020-08-05 12:46:10 +09:00
cutls
31cc929c68 #317 last_status type 2020-08-05 12:38:51 +09:00
cutls
80ce93785a #317 context menu 2020-08-05 12:26:59 +09:00
cutls
1710ab0035 [WIP] linting 2020-08-02 16:08:07 +09:00
cutls
dafc50bbd7 TheDesk 21.0.5 (Mayu) 2020-08-02 13:26:18 +09:00
cutls
50f58f8d3b Merge branch 'master' of github.com:cutls/TheDesk 2020-08-02 13:16:45 +09:00
cutls
b9be1529cc Change InstanceTicker to OpenSticker 2020-08-02 13:16:31 +09:00
Cutls
fb3a89b547 Merge pull request #318 from cutls/dependabot/npm_and_yarn/app/sweetalert2-9.17.0
Bump sweetalert2 from 9.15.2 to 9.17.0 in /app
2020-07-21 09:21:23 +09:00
Cutls
c01915c397 Merge pull request #319 from cutls/dependabot/npm_and_yarn/app/fortawesome/fontawesome-free-5.14.0
Bump @fortawesome/fontawesome-free from 5.13.1 to 5.14.0 in /app
2020-07-21 09:20:57 +09:00
Cutls
e9a774c1d4 Merge pull request #315 from cutls/dependabot/npm_and_yarn/app/lodash-4.17.19
[Security] Bump lodash from 4.17.15 to 4.17.19 in /app
2020-07-21 09:20:20 +09:00
Cutls
04d08ae6c1 Merge pull request #320 from cutls/dependabot/npm_and_yarn/app/chokidar-3.4.1
Bump chokidar from 3.4.0 to 3.4.1 in /app
2020-07-21 09:19:54 +09:00
dependabot-preview[bot]
0585f95a85 Bump @fortawesome/fontawesome-free from 5.13.1 to 5.14.0 in /app
Bumps [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) from 5.13.1 to 5.14.0.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/5.13.1...5.14.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-21 00:19:39 +00:00
dependabot-preview[bot]
2300e02a12 Bump chokidar from 3.4.0 to 3.4.1 in /app
Bumps [chokidar](https://github.com/paulmillr/chokidar) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/paulmillr/chokidar/releases)
- [Commits](https://github.com/paulmillr/chokidar/compare/3.4.0...3.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-21 00:19:24 +00:00
Cutls
fec4b61cb6 Merge pull request #321 from cutls/dependabot/npm_and_yarn/app/custom-electron-titlebar-3.2.3
Bump custom-electron-titlebar from 3.2.2-hotfix62 to 3.2.3 in /app
2020-07-21 09:18:00 +09:00
Cutls
e1941ce621 Merge pull request #322 from cutls/dependabot/npm_and_yarn/app/electron-9.1.1
Bump electron from 9.0.5 to 9.1.1 in /app
2020-07-21 09:17:44 +09:00
dependabot-preview[bot]
3aeb47b039 Bump electron from 9.0.5 to 9.1.1 in /app
Bumps [electron](https://github.com/electron/electron) from 9.0.5 to 9.1.1.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/master/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v9.0.5...v9.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-20 23:53:38 +00:00
dependabot-preview[bot]
73701be7c9 Bump custom-electron-titlebar from 3.2.2-hotfix62 to 3.2.3 in /app
Bumps [custom-electron-titlebar](https://github.com/AlexTorresSk/custom-electron-titlebar) from 3.2.2-hotfix62 to 3.2.3.
- [Release notes](https://github.com/AlexTorresSk/custom-electron-titlebar/releases)
- [Commits](https://github.com/AlexTorresSk/custom-electron-titlebar/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-17 20:58:08 +00:00
Cutls
7941eb7e9d Update FUNDING.yml 2020-07-17 11:17:25 +09:00
dependabot-preview[bot]
a8dedc94e9 Bump sweetalert2 from 9.15.2 to 9.17.0 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.15.2 to 9.17.0.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.15.2...v9.17.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-14 21:03:09 +00:00
cutls
26fd6a72d6 InstanceTicker URL 2020-07-10 14:22:55 +09:00
dependabot-preview[bot]
9d6f06cbde Bump lodash from 4.17.15 to 4.17.19 in /app
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-08 21:41:51 +00:00
cutls
b0bd85ccc6 Merge branch 'master' of github.com:cutls/TheDesk 2020-07-05 19:32:44 +09:00
cutls
9fc570e183 maxim 2020-07-05 19:32:31 +09:00
Cutls
695d812ecb Update README.md 2020-07-04 18:25:49 +09:00
cutls
ef6db98da5 revert like 2020-07-04 18:20:35 +09:00
cutls
cd38819a7a add maxim 2020-07-04 18:03:04 +09:00
cutls
f207ed274b TheDesk 21.0.4 (Mayu) 2020-07-04 11:38:51 +09:00
cutls
c3691783de Merge branch 'master' of github.com:cutls/TheDesk 2020-07-04 11:32:25 +09:00
Cutls
7171831b14 Merge pull request #274 from cutls/dependabot/npm_and_yarn/app/chokidar-3.4.0
Bump chokidar from 3.3.1 to 3.4.0 in /app
2020-07-04 11:32:04 +09:00
dependabot-preview[bot]
fa14921421 Bump chokidar from 3.3.1 to 3.4.0 in /app
Bumps [chokidar](https://github.com/paulmillr/chokidar) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/paulmillr/chokidar/releases)
- [Commits](https://github.com/paulmillr/chokidar/compare/3.3.1...3.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-04 02:31:27 +00:00
Cutls
475a80acdd New Crowdin translations (#278)
* New translations index.json (Greek)

* New translations setting.json (Czech)

* New translations index.json (Danish)

* New translations setting.json (Danish)

* New translations index.json (German)

* New translations setting.json (German)

* New translations index.json (Finnish)

* New translations setting.json (Finnish)

* New translations index.json (Hebrew)

* New translations setting.json (Hebrew)

* New translations index.json (Hungarian)

* New translations index.json (Romanian)

* New translations index.json (Czech)

* New translations setting.json (Greek)

* New translations setting.json (Catalan)

* New translations index.json (Afrikaans)

* New translations setting.json (Romanian)

* New translations index.json (French)

* New translations setting.json (French)

* New translations index.json (Spanish)

* New translations setting.json (Spanish)

* New translations setting.json (Bulgarian)

* New translations index.json (Catalan)

* New translations index.json (Bulgarian)

* New translations setting.json (Arabic)

* New translations index.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations index.json (Chinese Traditional)

* New translations setting.json (Chinese Simplified)

* New translations index.json (Chinese Simplified)

* New translations setting.json (Turkish)

* New translations setting.json (Ukrainian)

* New translations index.json (Ukrainian)

* New translations index.json (Turkish)

* New translations setting.json (Chinese Traditional)

* New translations setting.json (Spanish, Argentina)

* New translations index.json (Vietnamese)

* New translations setting.json (Vietnamese)

* New translations index.json (Portuguese, Brazilian)

* New translations setting.json (Portuguese, Brazilian)

* New translations index.json (Spanish, Argentina)

* New translations index.json (English)

* New translations setting.json (Swedish)

* New translations index.json (Polish)

* New translations setting.json (Hungarian)

* New translations index.json (Italian)

* New translations setting.json (Italian)

* New translations index.json (Dutch)

* New translations setting.json (Dutch)

* New translations index.json (Norwegian)

* New translations setting.json (Norwegian)

* New translations index.json (Swedish)

* New translations setting.json (Polish)

* New translations index.json (Portuguese)

* New translations setting.json (Portuguese)

* New translations index.json (Russian)

* New translations setting.json (Russian)

* New translations index.json (Serbian (Cyrillic))

* New translations setting.json (Serbian (Cyrillic))

* New translations setting.json (English)

* New translations index.json (Afrikaans)

* New translations index.json (Romanian)

* New translations index.json (Bulgarian)

* New translations index.json (Arabic)

* New translations index.json (Spanish)

* New translations index.json (French)

* New translations index.json (Ukrainian)

* New translations index.json (Turkish)

* New translations index.json (Swedish)

* New translations index.json (Serbian (Cyrillic))

* New translations index.json (Russian)

* New translations index.json (Portuguese, Brazilian)

* New translations index.json (English)

* New translations index.json (Spanish, Argentina)

* New translations index.json (Chinese Simplified)

* New translations index.json (Vietnamese)

* New translations index.json (Chinese Traditional)

* New translations index.json (Portuguese)

* New translations index.json (Greek)

* New translations index.json (German)

* New translations index.json (Danish)

* New translations index.json (Finnish)

* New translations index.json (Czech)

* New translations index.json (Catalan)

* New translations index.json (Polish)

* New translations index.json (Norwegian)

* New translations index.json (Dutch)

* New translations index.json (Italian)

* New translations index.json (Hungarian)

* New translations index.json (Hebrew)

* New translations main.json (Catalan)

* New translations main.json (Czech)

* New translations main.json (Bulgarian)

* New translations main.json (Danish)

* New translations main.json (German)

* New translations main.json (Spanish)

* New translations main.json (Romanian)

* New translations main.json (French)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Chinese Simplified)

* New translations main.json (Ukrainian)

* New translations main.json (Turkish)

* New translations main.json (Swedish)

* New translations main.json (English)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Vietnamese)

* New translations main.json (Chinese Traditional)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Italian)

* New translations main.json (Finnish)

* New translations main.json (Greek)

* New translations main.json (Russian)

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Dutch)

* New translations main.json (Swedish)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Russian)

* New translations main.json (Turkish)

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Vietnamese)

* New translations main.json (English)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Ukrainian)

* New translations main.json (Dutch)

* New translations main.json (Catalan)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Spanish)

* New translations main.json (French)

* New translations main.json (Romanian)

* New translations main.json (Czech)

* New translations main.json (Finnish)

* New translations main.json (Italian)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (German)

* New translations main.json (Danish)

* New translations main.json (Swedish)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Russian)

* New translations main.json (Turkish)

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Vietnamese)

* New translations main.json (English)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Ukrainian)

* New translations main.json (Dutch)

* New translations main.json (Catalan)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Spanish)

* New translations main.json (French)

* New translations main.json (Romanian)

* New translations main.json (Czech)

* New translations main.json (Finnish)

* New translations main.json (Italian)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (German)

* New translations main.json (Danish)

* New translations acct.json (Romanian)

* New translations acct.json (Danish)

* New translations acct.json (German)

* New translations acct.json (Greek)

* New translations acct.json (Finnish)

* New translations acct.json (Hebrew)

* New translations acct.json (Czech)

* New translations acct.json (Afrikaans)

* New translations acct.json (French)

* New translations acct.json (Spanish)

* New translations acct.json (Bulgarian)

* New translations acct.json (Arabic)

* New translations acct.json (Catalan)

* New translations acct.json (Chinese Simplified)

* New translations acct.json (Chinese Traditional)

* New translations acct.json (Ukrainian)

* New translations acct.json (Turkish)

* New translations acct.json (Spanish, Argentina)

* New translations acct.json (English)

* New translations acct.json (Vietnamese)

* New translations acct.json (Portuguese, Brazilian)

* New translations acct.json (Dutch)

* New translations acct.json (Hungarian)

* New translations acct.json (Italian)

* New translations acct.json (Norwegian)

* New translations acct.json (Polish)

* New translations acct.json (Swedish)

* New translations acct.json (Serbian (Cyrillic))

* New translations acct.json (Russian)

* New translations acct.json (Portuguese)

* New translations index.json (German)
2020-07-04 11:31:09 +09:00
Cutls
9826c3f33e Merge pull request #279 from cutls/dependabot/npm_and_yarn/app/jquery-3.5.1
Bump jquery from 3.5.0 to 3.5.1 in /app
2020-07-04 11:30:50 +09:00
Cutls
ecee949547 Merge pull request #281 from cutls/dependabot/npm_and_yarn/app/electron-rebuild-1.11.0
Bump electron-rebuild from 1.10.1 to 1.11.0 in /app
2020-07-04 11:30:36 +09:00
Cutls
95eea7051f Merge branch 'master' into dependabot/npm_and_yarn/app/electron-rebuild-1.11.0 2020-07-04 11:30:21 +09:00
Cutls
74e3ea41a7 Merge pull request #293 from cutls/dependabot/npm_and_yarn/app/electron-builder-22.7.0
Bump electron-builder from 22.5.1 to 22.7.0 in /app
2020-07-04 11:29:46 +09:00
dependabot-preview[bot]
dc27db920a Bump electron-builder from 22.5.1 to 22.7.0 in /app
Bumps [electron-builder](https://github.com/electron-userland/electron-builder) from 22.5.1 to 22.7.0.
- [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/v22.5.1...v22.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-04 02:28:57 +00:00
dependabot-preview[bot]
b2724fe362 Bump jquery from 3.5.0 to 3.5.1 in /app
Bumps [jquery](https://github.com/jquery/jquery) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/jquery/jquery/releases)
- [Commits](https://github.com/jquery/jquery/compare/3.5.0...3.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-04 02:28:47 +00:00
Cutls
5d43a5b159 Merge pull request #304 from cutls/dependabot/npm_and_yarn/app/electron-dl-3.0.1
Bump electron-dl from 3.0.0 to 3.0.1 in /app
2020-07-04 11:28:34 +09:00
Cutls
7435f3ddfd Merge branch 'master' into dependabot/npm_and_yarn/app/electron-dl-3.0.1 2020-07-04 11:28:18 +09:00
Cutls
94b6de6d3f Merge pull request #309 from cutls/dependabot/npm_and_yarn/app/fortawesome/fontawesome-free-5.13.1
Bump @fortawesome/fontawesome-free from 5.13.0 to 5.13.1 in /app
2020-07-04 11:27:36 +09:00
Cutls
1eb49e9a26 Merge pull request #311 from cutls/dependabot/npm_and_yarn/app/sweetalert2-9.15.2
Bump sweetalert2 from 9.10.12 to 9.15.2 in /app
2020-07-04 11:27:23 +09:00
Cutls
0893aa4ee1 Merge pull request #313 from cutls/dependabot/npm_and_yarn/app/jimp-0.14.0
Bump jimp from 0.10.3 to 0.14.0 in /app
2020-07-04 11:27:10 +09:00
cutls
ccdd9fba88 Introduce Electron 9.0.5 2020-07-04 11:26:46 +09:00
dependabot-preview[bot]
01dc5ff700 Bump electron-rebuild from 1.10.1 to 1.11.0 in /app
Bumps [electron-rebuild](https://github.com/electron/electron-rebuild) from 1.10.1 to 1.11.0.
- [Release notes](https://github.com/electron/electron-rebuild/releases)
- [Changelog](https://github.com/electron/electron-rebuild/blob/master/.releaserc.json)
- [Commits](https://github.com/electron/electron-rebuild/compare/v1.10.1...v1.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-04 02:12:00 +00:00
Cutls
346e8319df Merge pull request #310 from cutls/dependabot/npm_and_yarn/app/electron-9.0.5
Bump electron from 8.2.3 to 9.0.5 in /app
2020-07-04 11:10:08 +09:00
Cutls
5ca7046d5c Merge pull request #312 from heguro/fix-quote-muted
Fix quote_muted
2020-06-30 14:19:11 +09:00
dependabot-preview[bot]
f39e851211 Bump jimp from 0.10.3 to 0.14.0 in /app
Bumps [jimp](https://github.com/oliver-moran/jimp) from 0.10.3 to 0.14.0.
- [Release notes](https://github.com/oliver-moran/jimp/releases)
- [Changelog](https://github.com/oliver-moran/jimp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oliver-moran/jimp/compare/v0.10.3...v0.14.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-29 20:15:35 +00:00
heguro
3747020876 Fix quote_muted 2020-06-26 14:22:30 +09:00
dependabot-preview[bot]
5ed5a9ade3 Bump sweetalert2 from 9.10.12 to 9.15.2 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.10.12 to 9.15.2.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.10.12...v9.15.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-24 03:48:09 +00:00
dependabot-preview[bot]
04f157353f Bump electron from 8.2.3 to 9.0.5 in /app
Bumps [electron](https://github.com/electron/electron) from 8.2.3 to 9.0.5.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/master/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v8.2.3...v9.0.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-23 05:46:03 +00:00
dependabot-preview[bot]
a1bbcc9be2 Bump @fortawesome/fontawesome-free from 5.13.0 to 5.13.1 in /app
Bumps [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) from 5.13.0 to 5.13.1.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/5.13.0...5.13.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-19 20:18:38 +00:00
cutls
1266ef44ee Beta: fedibird expires_at 2020-06-16 15:08:27 +09:00
dependabot-preview[bot]
0da36709d5 Bump electron-dl from 3.0.0 to 3.0.1 in /app
Bumps [electron-dl](https://github.com/sindresorhus/electron-dl) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sindresorhus/electron-dl/releases)
- [Commits](https://github.com/sindresorhus/electron-dl/compare/v3.0.0...v3.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-16 02:57:33 +00:00
cutls
2b5637f388 netlify 2020-06-16 11:36:03 +09:00
cutls
6d478906a0 width mistake 2020-06-16 11:22:58 +09:00
cutls
e436aed6c5 TheDesk 21.0.3 (Mayu) 2020-06-16 11:06:22 +09:00
cutls
25867690f3 re-challenge 2020-06-16 11:00:12 +09:00
cutls
b5efbebadb TheDesk 21.0.2 (Mayu) 2020-06-16 10:42:10 +09:00
cutls
e93f860c0c directly import setting 2020-06-13 01:59:05 +09:00
cutls
df04ebca4c quote_muted param 2020-06-13 01:46:26 +09:00
cutls
d2aaf2c2cf timeline delete bug 2020-06-13 01:40:32 +09:00
cutls
8386cd675c votebutton-fixed, and <pre> fixed 2020-06-13 01:33:30 +09:00
cutls
ad7b3cf485 follow request 2020-06-12 22:13:06 +09:00
cutls
f9f2aeab23 font change error 2020-06-12 21:06:12 +09:00
cutls
ea735d279f font-change bug 2020-06-12 20:58:10 +09:00
cutls
fa616d56fd Merge branch 'master' of github.com:cutls/TheDesk 2020-06-10 12:09:32 +09:00
cutls
907e55e6d7 column deleting 2020-06-10 12:09:17 +09:00
Cutls
874be5bca8 Merge pull request #292 from heguro/fix-could-not-see-column-list
Fix: cannot sort column if using some kind of TL
2020-05-24 16:07:14 +09:00
heguro
f49907e5e5 Fix: cannot sort column when using some kind of TL 2020-05-24 05:45:15 +09:00
cutls
da197340ec Flexible font-size 2020-05-23 13:54:51 +09:00
cutls
cf6e5b5dd5 Improve: font-size-change 2020-05-15 12:47:01 +09:00
cutls
917cd322fc bug of emoji 2020-05-15 11:15:01 +09:00
cutls
bc616ba118 TheDesk 21.0.1 (Mayu) 2020-05-11 19:03:55 +09:00
cutls
ea26648619 delete user matching 2020-05-11 18:59:28 +09:00
cutls
c2f1aec8b6 Fix: cannot show when dled imga 2020-05-11 18:42:52 +09:00
cutls
c005b546ba Fix: cannot upload 2020-05-11 18:42:43 +09:00
cutls
783ceec8de typo 2020-05-10 22:02:51 +09:00
cutls
b1ccfa85ba TheDesk 21.0.0(Mayu) 2020-05-10 21:59:25 +09:00
cutls
7e6d03fd53 fix: utl loading 2020-05-10 21:52:01 +09:00
cutls
dd0e1279c4 icon, en-splash, add remote-only pub 2020-05-10 19:39:49 +09:00
cutls
1b3e676b30 Add splash screen 2020-05-10 17:32:49 +09:00
cutls
a4582bb18a splash animation 2020-05-10 13:26:07 +09:00
cutls
25e99725d2 Add: show utl as a column 2020-05-07 00:31:11 +09:00
cutls
da011cd302 pwa compat 2020-05-06 18:09:00 +09:00
cutls
53010751ee pwa compat 2020-05-06 18:06:05 +09:00
cutls
19401b61cb del asterte-compat 2020-05-06 18:03:33 +09:00
cutls
82271f1c17 platform compat 2020-05-06 18:02:14 +09:00
cutls
a74d0ecf8d Bug wo mitsuketa 2020-05-05 23:37:58 +09:00
cutls
7ee4205f8a Add: Last.fm 2020-05-05 23:36:31 +09:00
cutls
9aef043344 cors 2020-05-03 22:46:55 +09:00
cutls
4dbc673719 fix 2020-05-03 22:32:41 +09:00
cutls
d44cecf21f show 2020-05-03 22:27:11 +09:00
cutls
3c0ea8f40d test 2020-05-03 22:23:59 +09:00
cutls
06b806532e test fin 2020-05-03 22:20:28 +09:00
cutls
1983864294 mv 2020-05-03 22:16:36 +09:00
cutls
c523a274e1 headers 2020-05-03 22:14:39 +09:00
cutls
03563eb1f2 mv 2020-05-03 22:11:23 +09:00
cutls
2f14d18126 toml 2020-05-03 22:06:41 +09:00
cutls
d1309a82ec np 2020-05-03 22:05:55 +09:00
cutls
2a2607eb4b follow request 2020-05-03 22:05:45 +09:00
cutls
e9b5221f05 TheDesk 20.3.3 2020-05-03 00:30:41 +09:00
cutls
bb71a28375 Add filesize 2020-05-02 23:32:46 +09:00
cutls
af3e87b0e3 Merge branch 'master' of github.com:cutls/TheDesk 2020-04-29 15:08:57 +09:00
cutls
4728a59c33 Accessibility (Screen Reader Optimized mode) 2020-04-29 15:08:42 +09:00
Cutls
f9a9c13dc5 Merge pull request #272 from cutls/dependabot/npm_and_yarn/app/electron-8.2.3
Bump electron from 8.0.0 to 8.2.3 in /app
2020-04-27 17:48:21 +09:00
Cutls
1fa6abccf7 Merge branch 'master' into dependabot/npm_and_yarn/app/electron-8.2.3 2020-04-27 17:48:12 +09:00
dependabot-preview[bot]
9aa68b8ee6 Bump electron from 8.0.0 to 8.2.3 in /app
Bumps [electron](https://github.com/electron/electron) from 8.0.0 to 8.2.3.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/master/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v8.0.0...v8.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-27 08:47:46 +00:00
Cutls
f90cfe221f Merge pull request #273 from cutls/dependabot/npm_and_yarn/app/jimp-0.10.3
Bump jimp from 0.10.1 to 0.10.3 in /app
2020-04-27 17:47:40 +09:00
Cutls
b70a5d0053 Merge branch 'master' into dependabot/npm_and_yarn/app/jimp-0.10.3 2020-04-27 17:47:27 +09:00
Cutls
9c4ba4da80 Merge pull request #271 from cutls/dependabot/npm_and_yarn/app/electron-builder-22.5.1
Bump electron-builder from 22.4.1 to 22.5.1 in /app
2020-04-27 17:46:36 +09:00
Cutls
591dc1ba3c Merge pull request #270 from cutls/dependabot/npm_and_yarn/app/sweetalert2-9.10.12
Bump sweetalert2 from 9.10.9 to 9.10.12 in /app
2020-04-27 17:46:18 +09:00
Cutls
841afc5a33 Merge pull request #267 from cutls/dependabot/npm_and_yarn/app/jquery-3.5.0
Bump jquery from 3.4.1 to 3.5.0 in /app
2020-04-27 17:46:01 +09:00
Cutls
3a2e3c7895 New Crowdin translations (#263)
* New translations setting.json (Russian)

* New translations setting.json (Portuguese)

* New translations setting.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations setting.json (Polish)

* New translations setting.json (Norwegian)

* New translations setting.json (Italian)

* New translations setting.json (Serbian (Cyrillic))

* New translations setting.json (Vietnamese)

* New translations setting.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations setting.json (Swedish)

* New translations setting.json (Spanish, Argentina)

* New translations setting.json (Spanish)

* New translations setting.json (Hungarian)

* New translations setting.json (Chinese Traditional)

* New translations setting.json (Chinese Simplified)

* New translations setting.json (Catalan)

* New translations setting.json (Bulgarian)

* New translations setting.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations setting.json (Czech)

* New translations setting.json (Hebrew)

* New translations setting.json (Greek)

* New translations setting.json (German)

* New translations setting.json (French)

* New translations setting.json (Finnish)

* New translations setting.json (Dutch)

* New translations setting.json (Danish)

* New translations setting.json (English)

* New translations main.json (Russian)

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Portuguese)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Italian)

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations main.json (Catalan)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (German)

* New translations main.json (Danish)

* New translations main.json (French)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations acct.json (Serbian (Cyrillic))

* New translations main.json (Russian)

* New translations acct.json (Russian)

* New translations main.json (Romanian)

* New translations acct.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations acct.json (Portuguese, Brazilian)

* New translations main.json (Portuguese)

* New translations main.json (Serbian (Cyrillic))

* New translations acct.json (Portuguese)

* New translations main.json (Polish)

* New translations acct.json (Polish)

* New translations main.json (Norwegian)

* New translations acct.json (Norwegian)

* New translations main.json (Italian)

* New translations acct.json (Italian)

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations acct.json (English)

* New translations main.json (Vietnamese)

* New translations acct.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations acct.json (Ukrainian)

* New translations acct.json (Spanish)

* New translations acct.json (Turkish)

* New translations main.json (Swedish)

* New translations acct.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations acct.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations acct.json (Afrikaans)

* New translations main.json (Catalan)

* New translations main.json (Czech)

* New translations acct.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations acct.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations acct.json (Chinese Simplified)

* New translations acct.json (Danish)

* New translations acct.json (Catalan)

* New translations main.json (Bulgarian)

* New translations acct.json (Bulgarian)

* New translations main.json (Arabic)

* New translations acct.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Hungarian)

* New translations acct.json (Hungarian)

* New translations main.json (Hebrew)

* New translations acct.json (Hebrew)

* New translations main.json (Greek)

* New translations acct.json (Greek)

* New translations main.json (German)

* New translations acct.json (German)

* New translations main.json (Danish)

* New translations main.json (French)

* New translations acct.json (French)

* New translations main.json (Finnish)

* New translations acct.json (Finnish)

* New translations main.json (Dutch)

* New translations acct.json (Dutch)

* New translations index.json (Italian)

* New translations index.json (Hungarian)

* New translations index.json (Hebrew)

* New translations index.json (Finnish)

* New translations index.json (Romanian)

* New translations index.json (Russian)

* New translations index.json (Portuguese)

* New translations index.json (Polish)

* New translations index.json (Dutch)

* New translations index.json (Norwegian)

* New translations index.json (Greek)

* New translations index.json (Spanish)

* New translations index.json (Arabic)

* New translations index.json (Afrikaans)

* New translations index.json (French)

* New translations index.json (German)

* New translations index.json (Bulgarian)

* New translations index.json (Danish)

* New translations index.json (Czech)

* New translations index.json (Catalan)

* New translations index.json (Vietnamese)

* New translations index.json (Chinese Traditional)

* New translations index.json (Portuguese, Brazilian)

* New translations index.json (English)

* New translations index.json (Spanish, Argentina)

* New translations index.json (Serbian (Cyrillic))

* New translations index.json (Swedish)

* New translations index.json (Chinese Simplified)

* New translations index.json (Turkish)

* New translations index.json (Ukrainian)
2020-04-27 17:45:32 +09:00
cutls
5e035dc239 tag add all/none/any 2020-04-26 17:55:03 +09:00
cutls
2761cc23b0 css of announcement 2020-04-26 16:34:58 +09:00
cutls
cf00fefa6b Accessibility 2020-04-21 23:56:04 +09:00
cutls
039799083d depend 2020-04-21 22:18:40 +09:00
dependabot-preview[bot]
f6f53f9729 Bump jimp from 0.10.1 to 0.10.3 in /app
Bumps [jimp](https://github.com/oliver-moran/jimp) from 0.10.1 to 0.10.3.
- [Release notes](https://github.com/oliver-moran/jimp/releases)
- [Changelog](https://github.com/oliver-moran/jimp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oliver-moran/jimp/compare/v0.10.1...v0.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-20 21:05:16 +00:00
cutls
219695f9ae TheDesk 20.3.2 (Kawaii) 2020-04-18 11:00:56 +09:00
dependabot-preview[bot]
34c189b3ed Bump electron-builder from 22.4.1 to 22.5.1 in /app
Bumps [electron-builder](https://github.com/electron-userland/electron-builder) from 22.4.1 to 22.5.1.
- [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/commits/v22.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-16 20:14:21 +00:00
dependabot-preview[bot]
4a704bc257 Bump sweetalert2 from 9.10.9 to 9.10.12 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.10.9 to 9.10.12.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.10.9...v9.10.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-14 20:16:52 +00:00
cutls
2dc3ca51a3 Mastodon 3.1.3 2020-04-11 16:09:46 +09:00
cutls
b2564cfabb Fix: Pleroma image upload 2020-04-11 10:41:04 +09:00
dependabot-preview[bot]
d0734ed5fe Bump jquery from 3.4.1 to 3.5.0 in /app
Bumps [jquery](https://github.com/jquery/jquery) from 3.4.1 to 3.5.0.
- [Release notes](https://github.com/jquery/jquery/releases)
- [Commits](https://github.com/jquery/jquery/compare/3.4.1...3.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-10 20:16:32 +00:00
cutls
6ddc613b5a fix 2020-04-08 18:12:58 +09:00
cutls
3373ff417f TheDesk 20.3.1 (Kawaii) 2020-04-08 17:58:37 +09:00
cutls
9bee8afe95 misc 2020-04-08 15:30:20 +09:00
cutls
f79da2b692 tips versioning and Spotify player bug 2020-04-08 15:28:04 +09:00
cutls
fedb1ee858 misskey login 2020-04-08 15:27:47 +09:00
cutls
50e11ec035 v1 media bug 2020-04-08 14:54:25 +09:00
cutls
233442936a Fix: delete when unreblog 2020-04-08 14:54:14 +09:00
cutls
b68ae81782 TheDesk 20.3.0 (Usamin) 2020-04-07 17:44:59 +09:00
cutls
835234885b Add: v2/media uploader 2020-04-07 17:41:57 +09:00
cutls
6995155392 preparing: TheDesk 20.3.0 (Usamin) 2020-04-07 16:13:36 +09:00
cutls
2d7d127266 Some bugs, quality up on #208 2020-04-07 15:53:53 +09:00
cutls
ee6cbf922e Fix loader 2020-04-07 15:06:29 +09:00
Cutls
2c2ba89434 Merge pull request #241 from cutls/dependabot/npm_and_yarn/app/electron-rebuild-1.10.1
Bump electron-rebuild from 1.10.0 to 1.10.1 in /app
2020-04-07 15:03:23 +09:00
Cutls
68b23dc25a Merge branch 'master' into dependabot/npm_and_yarn/app/electron-rebuild-1.10.1 2020-04-07 15:03:17 +09:00
Cutls
181e8b47fd Merge pull request #242 from cutls/dependabot/npm_and_yarn/app/electron-builder-22.4.1
Bump electron-builder from 22.1.0 to 22.4.1 in /app
2020-04-07 15:02:39 +09:00
Cutls
8004643768 Merge branch 'master' into dependabot/npm_and_yarn/app/electron-builder-22.4.1 2020-04-07 15:02:30 +09:00
Cutls
681b2f207a Merge pull request #251 from cutls/dependabot/npm_and_yarn/app/fortawesome/fontawesome-free-5.13.0
Bump @fortawesome/fontawesome-free from 5.12.1 to 5.13.0 in /app
2020-04-07 15:01:22 +09:00
dependabot-preview[bot]
8ba1fa5e18 Bump electron-builder from 22.1.0 to 22.4.1 in /app
Bumps [electron-builder](https://github.com/electron-userland/electron-builder) from 22.1.0 to 22.4.1.
- [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/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-07 06:01:02 +00:00
dependabot-preview[bot]
3b4fe169d0 Bump @fortawesome/fontawesome-free from 5.12.1 to 5.13.0 in /app
Bumps [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) from 5.12.1 to 5.13.0.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/5.12.1...5.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-07 06:01:02 +00:00
Cutls
8ea7cde8e6 Merge pull request #258 from cutls/dependabot/npm_and_yarn/app/sweetalert2-9.10.9
Bump sweetalert2 from 9.10.3 to 9.10.9 in /app
2020-04-07 15:00:29 +09:00
Cutls
db23b2b016 Merge branch 'master' into dependabot/npm_and_yarn/app/sweetalert2-9.10.9 2020-04-07 15:00:14 +09:00
Cutls
e8b0fb3e6c Merge pull request #259 from cutls/dependabot/npm_and_yarn/app/json5-2.1.3
Bump json5 from 2.1.2 to 2.1.3 in /app
2020-04-07 14:59:30 +09:00
Cutls
b47079e4c8 Merge pull request #260 from cutls/dependabot/npm_and_yarn/app/jimp-0.10.1
Bump jimp from 0.9.6 to 0.10.1 in /app
2020-04-07 14:59:15 +09:00
Cutls
bae2d84d81 New Crowdin translations (#261)
* New translations setting.json (Russian)

* New translations setting.json (Portuguese)

* New translations setting.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations setting.json (Polish)

* New translations setting.json (Norwegian)

* New translations setting.json (Italian)

* New translations setting.json (Serbian (Cyrillic))

* New translations setting.json (Vietnamese)

* New translations setting.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations setting.json (Swedish)

* New translations setting.json (Spanish, Argentina)

* New translations setting.json (Spanish)

* New translations setting.json (Hungarian)

* New translations setting.json (Chinese Traditional)

* New translations setting.json (Chinese Simplified)

* New translations setting.json (Catalan)

* New translations setting.json (Bulgarian)

* New translations setting.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations setting.json (Czech)

* New translations setting.json (Hebrew)

* New translations setting.json (Greek)

* New translations setting.json (German)

* New translations setting.json (French)

* New translations setting.json (Finnish)

* New translations setting.json (Dutch)

* New translations setting.json (Danish)

* New translations setting.json (English)
2020-04-07 14:58:55 +09:00
cutls
73a57c86cb use API #208 2020-04-07 14:58:30 +09:00
cutls
50a2ce1470 Add: #208 Apple Music artwork request 2020-04-07 14:40:27 +09:00
cutls
429a5c764f Add, Fix: percent, versioning, start 2020-04-07 14:00:20 +09:00
cutls
6fbfdf0323 Fix: cannot list fonts up 2020-04-07 13:20:50 +09:00
cutls
7822b2c740 Fix: CW toggle 2020-04-07 13:02:20 +09:00
cutls
0014890881 Fix: hidden titlebar with frameless mode on macOS 2020-04-07 12:52:42 +09:00
dependabot-preview[bot]
8e909cf3b2 Bump jimp from 0.9.6 to 0.10.1 in /app
Bumps [jimp](https://github.com/oliver-moran/jimp) from 0.9.6 to 0.10.1.
- [Release notes](https://github.com/oliver-moran/jimp/releases)
- [Changelog](https://github.com/oliver-moran/jimp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oliver-moran/jimp/compare/v0.9.6...v0.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-06 20:16:21 +00:00
dependabot-preview[bot]
f7be9e9143 Bump json5 from 2.1.2 to 2.1.3 in /app
Bumps [json5](https://github.com/json5/json5) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/master/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.1.2...v2.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-06 20:15:46 +00:00
dependabot-preview[bot]
e44fee2165 Bump sweetalert2 from 9.10.3 to 9.10.9 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.10.3 to 9.10.9.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.10.3...v9.10.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-02 20:20:11 +00:00
Cutls
940514c97d Merge pull request #244 from cutls/dependabot/npm_and_yarn/app/json5-2.1.2
Bump json5 from 2.1.1 to 2.1.2 in /app
2020-03-22 01:11:08 +09:00
Cutls
4839c64878 Merge pull request #246 from cutls/dependabot/npm_and_yarn/app/jimp-0.9.6
Bump jimp from 0.9.3 to 0.9.6 in /app
2020-03-22 01:10:49 +09:00
Cutls
8c660d8499 Merge pull request #248 from cutls/dependabot/npm_and_yarn/app/sweetalert2-9.10.3
Bump sweetalert2 from 9.7.2 to 9.10.3 in /app
2020-03-22 01:10:24 +09:00
Cutls
2d0c7bdcea New Crowdin translations (#247)
* New translations setting.json (Russian)

* New translations setting.json (Portuguese)

* New translations index.json (Russian)

* New translations setting.json (Romanian)

* New translations index.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations index.json (Portuguese, Brazilian)

* New translations index.json (Portuguese)

* New translations setting.json (Polish)

* New translations index.json (Polish)

* New translations setting.json (Norwegian)

* New translations index.json (Norwegian)

* New translations setting.json (Italian)

* New translations index.json (Serbian (Cyrillic))

* New translations setting.json (Serbian (Cyrillic))

* New translations index.json (English)

* New translations setting.json (Vietnamese)

* New translations index.json (Vietnamese)

* New translations setting.json (Ukrainian)

* New translations index.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations index.json (Turkish)

* New translations setting.json (Swedish)

* New translations index.json (Swedish)

* New translations setting.json (Spanish, Argentina)

* New translations index.json (Spanish, Argentina)

* New translations setting.json (Spanish)

* New translations index.json (Spanish)

* New translations index.json (Italian)

* New translations setting.json (Hungarian)

* New translations index.json (Czech)

* New translations setting.json (Chinese Traditional)

* New translations index.json (Chinese Traditional)

* New translations setting.json (Chinese Simplified)

* New translations index.json (Chinese Simplified)

* New translations setting.json (Catalan)

* New translations index.json (Catalan)

* New translations setting.json (Bulgarian)

* New translations index.json (Bulgarian)

* New translations setting.json (Arabic)

* New translations index.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations index.json (Afrikaans)

* New translations setting.json (Czech)

* New translations index.json (Danish)

* New translations index.json (German)

* New translations index.json (Hungarian)

* New translations setting.json (Hebrew)

* New translations index.json (Hebrew)

* New translations setting.json (Greek)

* New translations index.json (Greek)

* New translations setting.json (German)

* New translations setting.json (French)

* New translations index.json (French)

* New translations setting.json (Finnish)

* New translations index.json (Finnish)

* New translations setting.json (Dutch)

* New translations index.json (Dutch)

* New translations setting.json (Danish)

* New translations setting.json (English)
2020-03-22 01:08:11 +09:00
dependabot-preview[bot]
9ecdb4fdb6 Bump sweetalert2 from 9.7.2 to 9.10.3 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.7.2 to 9.10.3.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.7.2...v9.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-19 21:02:51 +00:00
cutls
b03b387707 TheDesk 20.2.0 (Usamin) 2020-03-19 13:58:15 +09:00
Cutls
3df827cbeb Merge pull request #236 from kPherox/fix-l10n
Fix menu l10n
2020-03-19 22:19:42 +09:00
Cutls
0af7e1da9f New translations setting.json (Russian) (#245) 2020-03-19 22:19:04 +09:00
cutls
3531c338de Add: cool frame of the window, default: off 2020-03-19 13:17:02 +09:00
cutls
d44724d784 Add tips for developers not to fail to fail to constructing 2020-03-19 12:30:14 +09:00
dependabot-preview[bot]
2d67a7df23 Bump jimp from 0.9.3 to 0.9.6 in /app
Bumps [jimp](https://github.com/oliver-moran/jimp) from 0.9.3 to 0.9.6.
- [Release notes](https://github.com/oliver-moran/jimp/releases)
- [Changelog](https://github.com/oliver-moran/jimp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oliver-moran/jimp/compare/v0.9.3...v0.9.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-18 20:12:41 +00:00
dependabot-preview[bot]
38db36602c Bump json5 from 2.1.1 to 2.1.2 in /app
Bumps [json5](https://github.com/json5/json5) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/master/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.1.1...v2.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-16 20:14:26 +00:00
dependabot-preview[bot]
2e1264173e Bump electron-rebuild from 1.10.0 to 1.10.1 in /app
Bumps [electron-rebuild](https://github.com/electron/electron-rebuild) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/electron/electron-rebuild/releases)
- [Changelog](https://github.com/electron/electron-rebuild/blob/master/.releaserc.json)
- [Commits](https://github.com/electron/electron-rebuild/compare/v1.10.0...v1.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-11 20:16:06 +00:00
cutls
365918bb94 Merge branch 'master' of github.com:cutls/TheDesk 2020-03-06 01:51:21 +09:00
cutls
db7c471ec5 WIP: introduce new titlebar(ofcouce, it is optional opt-in; now it is as opt-out) 2020-03-06 01:51:06 +09:00
kPherox
b67ac5e48b Fix menu l10n
Rename `listDesc` to `menuDesc`
Add `menu` to other than japanese
2020-03-05 20:15:15 +09:00
Cutls
0f72db8e9c New translations index.json (German) (#228) 2020-03-01 16:57:22 +09:00
cutls
3bff41f3d9 Merge branch 'master' of github.com:cutls/TheDesk 2020-03-01 12:47:19 +09:00
cutls
b02b031d97 own_votes Nullable 2020-03-01 12:47:07 +09:00
Cutls
ecda811835 Update README.md 2020-02-24 11:20:10 +09:00
Cutls
0b573e3825 Update README.md 2020-02-24 11:18:48 +09:00
Cutls
dc42ac6fce Update README_ja.md 2020-02-24 11:17:30 +09:00
Cutls
f345e1e33b Update README_ja.md 2020-02-24 10:57:13 +09:00
Cutls
5ffa9bc732 Update README.md 2020-02-24 10:52:42 +09:00
cutls
343b02bf19 Fix: #227 2020-02-11 02:15:54 +09:00
cutls
c8786ca00f Fix: img modal when window is too narrow 2020-02-11 01:55:40 +09:00
cutls
2732161dd2 package update 2020-02-10 12:54:23 +09:00
cutls
8db9c438c4 Merge branch 'master' of github.com:cutls/TheDesk 2020-02-10 12:48:41 +09:00
cutls
50a32d75d3 new theme 2020-02-10 12:48:35 +09:00
Cutls
d32c3c7866 Merge pull request #172 from cutls/dependabot/npm_and_yarn/app/materialize-css-e3eb698
Bump materialize-css from `2387ea3` to `e3eb698` in /app
2020-02-10 01:37:00 +09:00
Cutls
a8390a0f2a Merge pull request #189 from cutls/dependabot/npm_and_yarn/app/jimp-0.9.3
Bump jimp from 0.9.1 to 0.9.3 in /app
2020-02-10 01:36:37 +09:00
Cutls
9ad0e3e2c0 Merge pull request #200 from cutls/dependabot/npm_and_yarn/app/vue-2.6.11
Bump vue from 2.6.10 to 2.6.11 in /app
2020-02-10 01:36:12 +09:00
Cutls
03b08b7c71 Merge pull request #202 from cutls/dependabot/npm_and_yarn/app/chokidar-3.3.1
Bump chokidar from 3.3.0 to 3.3.1 in /app
2020-02-10 01:35:50 +09:00
Cutls
aa30072848 Merge pull request #222 from cutls/dependabot/npm_and_yarn/app/electron-rebuild-1.10.0
Bump electron-rebuild from 1.8.8 to 1.10.0 in /app
2020-02-10 01:34:33 +09:00
dependabot-preview[bot]
528e7ea61c Bump jimp from 0.9.1 to 0.9.3 in /app
Bumps [jimp](https://github.com/oliver-moran/jimp) from 0.9.1 to 0.9.3.
- [Release notes](https://github.com/oliver-moran/jimp/releases)
- [Changelog](https://github.com/oliver-moran/jimp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oliver-moran/jimp/compare/v0.9.1...v0.9.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-09 16:33:36 +00:00
dependabot-preview[bot]
89abea0706 Bump vue from 2.6.10 to 2.6.11 in /app
Bumps [vue](https://github.com/vuejs/vue) from 2.6.10 to 2.6.11.
- [Release notes](https://github.com/vuejs/vue/releases)
- [Commits](https://github.com/vuejs/vue/compare/v2.6.10...v2.6.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-09 16:33:09 +00:00
Cutls
3c45752ce1 Merge pull request #225 from cutls/dependabot/npm_and_yarn/app/fortawesome/fontawesome-free-5.12.1
Bump @fortawesome/fontawesome-free from 5.11.2 to 5.12.1 in /app
2020-02-10 01:31:51 +09:00
Cutls
b6cf6158f8 Merge pull request #226 from cutls/dependabot/npm_and_yarn/app/sweetalert2-9.7.2
Bump sweetalert2 from 9.5.4 to 9.7.2 in /app
2020-02-10 01:31:33 +09:00
Cutls
b4eaa6a849 New Crowdin translations (#219)
* New translations index.json (Spanish, Argentina)

* New translations main.json (Spanish, Argentina)

* New translations setting.json (Spanish, Argentina)

* New translations setting.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations setting.json (Portuguese)

* New translations setting.json (Russian)

* New translations setting.json (Polish)

* New translations setting.json (Norwegian)

* New translations setting.json (Italian)

* New translations setting.json (Vietnamese)

* New translations setting.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations setting.json (Swedish)

* New translations setting.json (Spanish)

* New translations setting.json (Serbian (Cyrillic))

* New translations setting.json (Hungarian)

* New translations setting.json (Chinese Traditional)

* New translations setting.json (Chinese Simplified)

* New translations setting.json (Catalan)

* New translations setting.json (Bulgarian)

* New translations setting.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations setting.json (Spanish, Argentina)

* New translations setting.json (Czech)

* New translations setting.json (French)

* New translations setting.json (Hebrew)

* New translations setting.json (Greek)

* New translations setting.json (German)

* New translations setting.json (Finnish)

* New translations setting.json (Dutch)

* New translations setting.json (Danish)

* New translations main.json (Bulgarian)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Russian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Portuguese)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Spanish)

* New translations main.json (Turkish)

* New translations main.json (Swedish)

* New translations main.json (Polish)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations main.json (Danish)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (French)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Norwegian)

* New translations main.json (Italian)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (German)

* New translations setting.json (Spanish, Argentina)

* New translations acct.json (French)

* New translations index.json (Spanish, Argentina)

* New translations index.json (Portuguese)

* New translations index.json (Russian)

* New translations setting.json (Romanian)

* New translations index.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations index.json (Portuguese, Brazilian)

* New translations setting.json (Portuguese)

* New translations setting.json (Russian)

* New translations setting.json (Polish)

* New translations index.json (Polish)

* New translations setting.json (Norwegian)

* New translations index.json (Norwegian)

* New translations setting.json (Italian)

* New translations index.json (Italian)

* New translations index.json (English)

* New translations setting.json (Vietnamese)

* New translations index.json (Vietnamese)

* New translations setting.json (Ukrainian)

* New translations index.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations index.json (Turkish)

* New translations index.json (Serbian (Cyrillic))

* New translations setting.json (Swedish)

* New translations index.json (Swedish)

* New translations setting.json (Spanish)

* New translations index.json (Spanish)

* New translations setting.json (Serbian (Cyrillic))

* New translations setting.json (Hungarian)

* New translations index.json (Hungarian)

* New translations setting.json (Chinese Traditional)

* New translations index.json (Chinese Traditional)

* New translations setting.json (Chinese Simplified)

* New translations index.json (Chinese Simplified)

* New translations setting.json (Catalan)

* New translations index.json (Catalan)

* New translations setting.json (Bulgarian)

* New translations index.json (Bulgarian)

* New translations setting.json (Arabic)

* New translations index.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations index.json (Afrikaans)

* New translations setting.json (Spanish, Argentina)

* New translations index.json (Czech)

* New translations setting.json (Czech)

* New translations setting.json (French)

* New translations setting.json (Hebrew)

* New translations index.json (Hebrew)

* New translations setting.json (Greek)

* New translations index.json (Greek)

* New translations setting.json (German)

* New translations index.json (German)

* New translations index.json (French)

* New translations setting.json (Finnish)

* New translations index.json (Finnish)

* New translations setting.json (Dutch)

* New translations index.json (Dutch)

* New translations setting.json (Danish)

* New translations index.json (Danish)

* New translations setting.json (English)
2020-02-10 01:31:03 +09:00
cutls
86c83e8b11 update window 2020-02-09 23:35:49 +09:00
cutls
a235e536da TheDesk 20.1.2 (Kawaii) 2020-02-09 23:22:36 +09:00
cutls
56fe5e6345 CP: search when selected or Ctrl+F 2020-02-08 23:51:46 +09:00
cutls
5d9327d3d3 Add: lang 2020-02-08 23:48:31 +09:00
cutls
72daf55e4e Add: show modal when selecting 2020-02-08 23:35:22 +09:00
dependabot-preview[bot]
e5d651365b Bump sweetalert2 from 9.5.4 to 9.7.2 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.5.4 to 9.7.2.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.5.4...v9.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-07 20:14:04 +00:00
cutls
e1a0a69a2a PWA: fix 2020-02-08 01:37:35 +09:00
cutls
a9e5e72ccc PWA: icons 2020-02-08 01:34:07 +09:00
cutls
1d5f73e2ab PWA: service worker 2020-02-08 01:21:31 +09:00
cutls
0f81740562 PWA: manifest.json 2020-02-08 01:16:47 +09:00
cutls
0adb904c86 PWA: manifest.json 2020-02-08 01:14:12 +09:00
cutls
92f8611043 cors 2020-02-08 01:10:45 +09:00
cutls
c24ef878c4 PWA: modal platform 2020-02-08 00:59:56 +09:00
cutls
ba01510c88 pwa: link 2020-02-08 00:58:21 +09:00
cutls
47d69857ba pwa: fix 2020-02-08 00:52:23 +09:00
cutls
8d812fbd2c typo 2020-02-08 00:48:34 +09:00
cutls
790d353b69 typo 2020-02-08 00:46:22 +09:00
cutls
495db60a84 pwa open url 2020-02-08 00:44:16 +09:00
cutls
ce117cca24 pwa: undef 2020-02-08 00:35:13 +09:00
cutls
547a7b7c7c for pwa test 2020-02-08 00:31:06 +09:00
cutls
b6255244ef for pwa test 2020-02-08 00:25:31 +09:00
cutls
04e7088b7d test for pwa 2020-02-08 00:01:11 +09:00
dependabot-preview[bot]
1aefd4a3bb Bump @fortawesome/fontawesome-free from 5.11.2 to 5.12.1 in /app
Bumps [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) from 5.11.2 to 5.12.1.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/5.11.2...5.12.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-05 20:13:45 +00:00
dependabot-preview[bot]
34075000a8 Bump electron-rebuild from 1.8.8 to 1.10.0 in /app
Bumps [electron-rebuild](https://github.com/electron/electron-rebuild) from 1.8.8 to 1.10.0.
- [Release notes](https://github.com/electron/electron-rebuild/releases)
- [Changelog](https://github.com/electron/electron-rebuild/blob/master/.releaserc.json)
- [Commits](https://github.com/electron/electron-rebuild/compare/v1.8.8...v1.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-29 20:14:08 +00:00
cutls
b24d937152 Add: anouncement read counter 2020-01-29 23:22:53 +09:00
cutls
b821724e59 fix 2020-01-29 23:09:02 +09:00
cutls
9a1f7311a6 Change: en translation (from Crowdin report) 2020-01-29 23:08:56 +09:00
cutls
b642d42229 WIP: Add: announcement(except: mark as read) 2020-01-28 02:07:36 +09:00
cutls
ab265fae62 Add: image min-width: 750px against width min 2020-01-26 23:55:42 +09:00
cutls
44b0c6c8fd Fix: src encoding URL for resolve 2020-01-26 23:55:07 +09:00
cutls
ae16bb3525 misc 2020-01-26 23:54:47 +09:00
cutls
7bf5353f05 Add: constructing before build 2020-01-26 23:54:40 +09:00
cutls
64a3440969 TheDesk 20.1.1 (Kawaii) 2020-01-23 01:27:35 +09:00
cutls
6a02d4df6c wip: typo 2020-01-23 00:53:35 +09:00
cutls
4f84ad6c91 wip 2020-01-23 00:51:50 +09:00
cutls
3fe5676f44 Fix: WIP: album artworks 2020-01-23 00:49:36 +09:00
cutls
bc11e75d79 Remove iranai ref 2020-01-23 00:39:06 +09:00
cutls
87f4d86587 Merge branch 'master' of github.com:cutls/TheDesk 2020-01-23 00:30:00 +09:00
cutls
de06c930ea Fix: error when failed upload 2020-01-23 00:29:49 +09:00
cutls
dd056f4c05 Fix: ekkusuesuesu 2020-01-23 00:24:04 +09:00
Cutls
484f320b7f New Crowdin translations (#212)
* New translations setting.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations setting.json (Portuguese)

* New translations setting.json (Polish)

* New translations setting.json (Norwegian)

* New translations setting.json (Italian)

* New translations setting.json (Hungarian)

* New translations setting.json (Russian)

* New translations setting.json (Vietnamese)

* New translations setting.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations setting.json (Swedish)

* New translations setting.json (Serbian (Cyrillic))

* New translations setting.json (Chinese Traditional)

* New translations setting.json (Catalan)

* New translations setting.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations setting.json (Spanish)

* New translations setting.json (Hebrew)

* New translations setting.json (Greek)

* New translations setting.json (Finnish)

* New translations setting.json (Dutch)

* New translations setting.json (Danish)
2020-01-15 21:56:54 +09:00
dependabot-preview[bot]
bf7b38a02e Bump materialize-css from 2387ea3 to e3eb698 in /app
Bumps [materialize-css](https://github.com/cutls/materialize) from `2387ea3` to `e3eb698`.
- [Release notes](https://github.com/cutls/materialize/releases)
- [Commits](2387ea3897...e3eb698a07)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-12 23:50:15 +00:00
dependabot-preview[bot]
bf534f9c79 Bump chokidar from 3.3.0 to 3.3.1 in /app
Bumps [chokidar](https://github.com/paulmillr/chokidar) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/paulmillr/chokidar/releases)
- [Commits](https://github.com/paulmillr/chokidar/compare/3.3.0...3.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-12 23:49:52 +00:00
dependabot-preview[bot]
bf94612e2e Bump sweetalert2 from 9.5.3 to 9.5.4 in /app (#205)
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.5.3 to 9.5.4.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.5.3...v9.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 08:48:47 +09:00
dependabot-preview[bot]
16fe5f07e3 Bump electron-dl from 1.14.0 to 3.0.0 in /app (#209)
Bumps [electron-dl](https://github.com/sindresorhus/electron-dl) from 1.14.0 to 3.0.0.
- [Release notes](https://github.com/sindresorhus/electron-dl/releases)
- [Commits](https://github.com/sindresorhus/electron-dl/compare/v1.14.0...v3.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 08:48:23 +09:00
dependabot-preview[bot]
c85ef3c659 Bump electron from 7.1.1 to 7.1.8 in /app (#210)
Bumps [electron](https://github.com/electron/electron) from 7.1.1 to 7.1.8.
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v7.1.1...v7.1.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-13 08:48:12 +09:00
Cutls
e8910d7e64 New Crowdin translations (#191)
* New translations index.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations index.json (Spanish, Argentina)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Russian)

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations main.json (Italian)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Danish)

* New translations main.json (German)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (French)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations setting.json (Russian)

* New translations index.json (Russian)

* New translations setting.json (Romanian)

* New translations index.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations index.json (Portuguese, Brazilian)

* New translations setting.json (Portuguese)

* New translations index.json (Portuguese)

* New translations setting.json (Polish)

* New translations index.json (Polish)

* New translations setting.json (Norwegian)

* New translations index.json (Norwegian)

* New translations setting.json (Italian)

* New translations index.json (Serbian (Cyrillic))

* New translations setting.json (Serbian (Cyrillic))

* New translations index.json (Italian)

* New translations index.json (English)

* New translations setting.json (Vietnamese)

* New translations index.json (Vietnamese)

* New translations setting.json (Ukrainian)

* New translations index.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations index.json (Turkish)

* New translations setting.json (Swedish)

* New translations index.json (Swedish)

* New translations setting.json (Spanish, Argentina)

* New translations index.json (Spanish, Argentina)

* New translations setting.json (Spanish)

* New translations index.json (Spanish)

* New translations index.json (Afrikaans)

* New translations setting.json (Catalan)

* New translations setting.json (Czech)

* New translations index.json (Czech)

* New translations setting.json (Chinese Traditional)

* New translations index.json (Chinese Traditional)

* New translations setting.json (Chinese Simplified)

* New translations index.json (Chinese Simplified)

* New translations index.json (Danish)

* New translations index.json (Catalan)

* New translations setting.json (Bulgarian)

* New translations index.json (Bulgarian)

* New translations setting.json (Arabic)

* New translations index.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations setting.json (Hungarian)

* New translations index.json (Hungarian)

* New translations setting.json (Hebrew)

* New translations index.json (Hebrew)

* New translations setting.json (Greek)

* New translations index.json (Greek)

* New translations setting.json (German)

* New translations index.json (German)

* New translations setting.json (Danish)

* New translations setting.json (French)

* New translations index.json (French)

* New translations setting.json (Finnish)

* New translations index.json (Finnish)

* New translations setting.json (Dutch)

* New translations index.json (Dutch)

* New translations setting.json (English)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Romanian)

* New translations main.json (Russian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Turkish)

* New translations main.json (Spanish)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Norwegian)

* New translations main.json (Dutch)

* New translations main.json (Danish)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Finnish)

* New translations main.json (Italian)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (German)

* New translations main.json (French)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Italian)

* New translations main.json (Greek)

* New translations main.json (German)

* New translations main.json (French)

* New translations main.json (Portuguese)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Chinese Traditional)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations main.json (Czech)

* New translations main.json (Danish)

* New translations main.json (Turkish)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (English)

* New translations main.json (Swedish)

* New translations main.json (Romanian)

* New translations main.json (Russian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Spanish)

* New translations main.json (Spanish, Argentina)

* New translations acct.json (Spanish)

* New translations index.json (Spanish)

* New translations main.json (Spanish)

* New translations setting.json (Spanish)

* New translations acct.json (Spanish)

* New translations main.json (Spanish)

* New translations setting.json (Spanish)
2020-01-13 08:47:33 +09:00
Cutls
817d159fd9 License of #InstanceTicker (#211)
* Update setting.json

* Japanese

* Japanese(Kansai)
2020-01-13 08:45:29 +09:00
cutls
674ce32a30 revert #208 2020-01-12 22:49:52 +09:00
cutls
8f85016d8c [WIP] fix #208 2020-01-12 20:42:23 +09:00
cutls
ee7ca45b91 npexec #208 2020-01-12 11:38:28 +09:00
cutls
51af1590ad test on #208 2020-01-12 01:23:07 +09:00
cutls
b42b04d769 Revert "Introduce: window-state, with discarded old window size"
This reverts commit ffaa59cf88.
2020-01-08 23:41:32 +09:00
cutls
ffaa59cf88 Introduce: window-state, with discarded old window size 2019-12-23 01:58:24 +09:00
cutls
109170627f Use npx, not global 2019-12-21 11:09:01 +09:00
cutls
553abf90cb Font spacer4 2019-12-20 09:52:57 +09:00
cutls
eccdee7446 Fix: max_toot_chars, Add: custom max_chars, Add: domain list 2019-12-19 01:00:17 +09:00
cutls
b2d98948d2 Add: follow request on notification 2019-12-17 01:11:12 +09:00
cutls
4bcb8104de Update check on setting 2019-12-15 00:52:07 +09:00
cutls
b7c82b4831 add 2019-12-14 23:54:34 +09:00
cutls
626aebef4d TheDesk 20.1.0 (Kawaii) 2019-12-14 23:41:35 +09:00
cutls
32420fecd9 Fix: Poll emoji when refreshed, static emoji #193 2019-12-14 10:29:59 +09:00
cutls
c318803ecd Fix cannot del&red img #185 2019-12-14 10:12:18 +09:00
cutls
adf37f6513 Add: auto resize, auto stamp 2019-12-14 01:54:40 +09:00
cutls
0dcc0ff0ac Fix: import and export 2019-12-14 00:48:34 +09:00
cutls
f30749d752 Fix: unvisible leading choice when shared polls 2019-12-13 02:07:33 +09:00
cutls
af459aa93a Fix: openFinder dialog 2019-12-12 00:17:22 +09:00
cutls
e190cf3393 Merge branch 'master' of github.com:cutls/TheDesk 2019-12-12 00:06:51 +09:00
cutls
9f6c14ced0 WIP: to null-safety app 2019-12-12 00:06:40 +09:00
cutls
320576f288 For Pleroma move type notif 2019-12-12 00:06:12 +09:00
cutls
7366d9ce98 Cannot unfav/unBT 2019-12-12 00:05:40 +09:00
dependabot-preview[bot]
6da37a6cbb Bump sweetalert2 from 9.4.0 to 9.5.3 in /app (#198)
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.4.0 to 9.5.3.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.4.0...v9.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-11 09:43:59 +09:00
cutls
140e47d842 Add unknown notf type of Pleroma, 'move' 2019-12-10 23:24:16 +09:00
cutls
44128d8801 delete and redraft 2019-12-08 14:50:56 +09:00
cutls
046dbc5559 Cannot img <- / -> 2019-12-08 00:51:49 +09:00
cutls
f46b05dca8 TheDesk 20.0.6 (Kawaii) 2019-12-01 20:28:20 +09:00
cutls
8844320fc5 TheDesk 20.0.5 (Kawaii) 2019-11-27 23:13:19 +09:00
cutls
9f1aeb2b58 IDE key 2019-11-27 23:03:18 +09:00
cutls
89ba321890 Merge branch 'master' of github.com:cutls/TheDesk 2019-11-27 21:03:45 +09:00
cutls
0ede195a5a TheDesk 20.0.5 (Kawaii) checking 2019-11-27 21:03:32 +09:00
Cutls
c305ed5627 New Crowdin translations (#188)
* New translations index.json (Hungarian)

* New translations index.json (Hebrew)

* New translations index.json (Greek)

* New translations index.json (German)

* New translations index.json (French)

* New translations index.json (Finnish)

* New translations index.json (Dutch)
2019-11-27 20:58:05 +09:00
Cutls
e58989f021 New Crowdin translations (#182)
* New translations index.json (Spanish, Argentina)

* New translations index.json (Spanish, Argentina)

* New translations main.json (Spanish, Argentina)

* New translations setting.json (Spanish, Argentina)

* New translations update.json (Spanish, Argentina)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Afrikaans)

* New translations main.json (Arabic)

* New translations main.json (Bulgarian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Russian)

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Portuguese)

* New translations main.json (Spanish)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Turkish)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Dutch)

* New translations main.json (French)

* New translations main.json (Finnish)

* New translations main.json (Danish)

* New translations main.json (Czech)

* New translations main.json (German)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Italian)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (German)

* New translations main.json (German)

* New translations index.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations main.json (Russian)

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations main.json (Italian)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Danish)

* New translations main.json (German)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (French)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations acct.json (Russian)

* New translations acct.json (Russian)

* New translations index.json (Russian)

* New translations main.json (Russian)

* New translations setting.json (Russian)

* New translations index.json (Russian)

* New translations main.json (Russian)

* New translations setting.json (Russian)

* New translations index.json (Russian)

* New translations main.json (Russian)

* New translations index.json (Russian)

* New translations main.json (Russian)

* New translations setting.json (Russian)

* New translations index.json (Russian)

* New translations setting.json (Russian)

* New translations setting.json (Russian)

* New translations main.json (Russian)

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations main.json (Italian)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Danish)

* New translations main.json (German)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (French)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations index.json (Russian)

* New translations index.json (Romanian)

* New translations index.json (Portuguese, Brazilian)

* New translations index.json (Portuguese)

* New translations index.json (Polish)

* New translations index.json (Norwegian)

* New translations index.json (Serbian (Cyrillic))

* New translations index.json (Italian)

* New translations index.json (English)

* New translations index.json (Vietnamese)

* New translations index.json (Ukrainian)

* New translations index.json (Turkish)

* New translations index.json (Swedish)

* New translations index.json (Spanish, Argentina)

* New translations index.json (Spanish)

* New translations index.json (Afrikaans)

* New translations index.json (Czech)

* New translations index.json (Chinese Traditional)

* New translations index.json (Chinese Simplified)

* New translations index.json (Danish)

* New translations index.json (Catalan)

* New translations index.json (Bulgarian)

* New translations index.json (Arabic)
2019-11-27 20:56:45 +09:00
Cutls
f88a3169c4 New translations index.json (Arabic) 2019-11-27 20:56:38 +09:00
Cutls
8aa9de05f9 New translations index.json (Bulgarian) 2019-11-27 20:56:35 +09:00
Cutls
e6ee50a6ea New translations index.json (Catalan) 2019-11-27 20:56:33 +09:00
Cutls
802988cb77 New translations index.json (Danish) 2019-11-27 20:56:31 +09:00
Cutls
3afe00e208 New translations index.json (Chinese Simplified) 2019-11-27 20:56:29 +09:00
Cutls
0db238b023 New translations index.json (Chinese Traditional) 2019-11-27 20:56:26 +09:00
Cutls
3c07bbaf38 New translations index.json (Czech) 2019-11-27 20:56:23 +09:00
Cutls
951d4d7251 New translations index.json (Afrikaans) 2019-11-27 20:56:19 +09:00
Cutls
dc789ad9c0 New translations index.json (Spanish) 2019-11-27 20:56:17 +09:00
Cutls
c5cbc07b2b New translations index.json (Spanish, Argentina) 2019-11-27 20:56:14 +09:00
Cutls
101212de01 New translations index.json (Swedish) 2019-11-27 20:56:11 +09:00
Cutls
6a977d6484 New translations index.json (Turkish) 2019-11-27 20:56:07 +09:00
Cutls
4ed28c4d6c New translations index.json (Ukrainian) 2019-11-27 20:56:04 +09:00
dependabot-preview[bot]
136d101588 Bump sweetalert2 from 9.3.16 to 9.4.0 in /app (#184)
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.3.16 to 9.4.0.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.3.16...v9.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 20:56:03 +09:00
Cutls
e55a211269 New translations index.json (Vietnamese) 2019-11-27 20:56:01 +09:00
Cutls
89e01ec6e2 New translations index.json (English) 2019-11-27 20:55:58 +09:00
Cutls
06c9e3437a New translations index.json (Italian) 2019-11-27 20:55:55 +09:00
Cutls
a24d058ee5 New translations index.json (Serbian (Cyrillic)) 2019-11-27 20:55:54 +09:00
Cutls
176c692e46 New translations index.json (Norwegian) 2019-11-27 20:55:52 +09:00
Cutls
17505711d7 New translations index.json (Polish) 2019-11-27 20:55:49 +09:00
Cutls
e359347ae7 New translations index.json (Portuguese) 2019-11-27 20:55:45 +09:00
Cutls
51dbf712f7 New translations index.json (Portuguese, Brazilian) 2019-11-27 20:55:42 +09:00
Cutls
30bd7abec1 New translations index.json (Romanian) 2019-11-27 20:55:39 +09:00
Cutls
370af944d8 New translations index.json (Russian) 2019-11-27 20:55:36 +09:00
dependabot-preview[bot]
ccdd30f372 Bump sumchecker from 3.0.0 to 3.0.1 in /app (#186)
Bumps [sumchecker](https://github.com/malept/sumchecker) from 3.0.0 to 3.0.1.
- [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/v3.0.0...v3.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 20:55:20 +09:00
dependabot-preview[bot]
157aec934d Bump jimp from 0.8.5 to 0.9.1 in /app (#187)
Bumps [jimp](https://github.com/oliver-moran/jimp) from 0.8.5 to 0.9.1.
- [Release notes](https://github.com/oliver-moran/jimp/releases)
- [Changelog](https://github.com/oliver-moran/jimp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oliver-moran/jimp/compare/v0.8.5...v0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 20:55:12 +09:00
cutls
a6d8bfd874 Add: bug arunyakedo button 2019-11-27 20:53:46 +09:00
cutls
ed8dc492c5 Tag trending design 2019-11-27 20:53:34 +09:00
cutls
87aee3764b #185 in reply id 2019-11-26 23:48:22 +09:00
Cutls
692f01885f New translations main.json (Dutch) 2019-11-26 23:29:32 +09:00
Cutls
8b4537f61c New translations main.json (Finnish) 2019-11-26 23:29:29 +09:00
Cutls
74abc5d150 New translations main.json (French) 2019-11-26 23:29:26 +09:00
Cutls
968dd67bda New translations main.json (Greek) 2019-11-26 23:29:17 +09:00
Cutls
08b38f2789 New translations main.json (Hebrew) 2019-11-26 23:29:14 +09:00
Cutls
8c826ccc3f New translations main.json (Hungarian) 2019-11-26 23:29:11 +09:00
Cutls
f76fa5b13a New translations main.json (German) 2019-11-26 23:29:08 +09:00
Cutls
2cc42fd3e0 New translations main.json (Danish) 2019-11-26 23:29:06 +09:00
Cutls
4eabfad002 New translations main.json (Afrikaans) 2019-11-26 23:29:04 +09:00
Cutls
fa6304f244 New translations main.json (Arabic) 2019-11-26 23:29:00 +09:00
Cutls
27b0a6e47e New translations main.json (Bulgarian) 2019-11-26 23:28:56 +09:00
Cutls
6aca5a7b2b New translations main.json (Catalan) 2019-11-26 23:28:51 +09:00
Cutls
c0b9fc96e7 New translations main.json (Chinese Simplified) 2019-11-26 23:28:50 +09:00
Cutls
84b0defe3b New translations main.json (Chinese Traditional) 2019-11-26 23:28:45 +09:00
Cutls
49e6f89015 New translations main.json (Czech) 2019-11-26 23:28:42 +09:00
Cutls
e9abe29fc3 New translations main.json (Italian) 2019-11-26 23:28:37 +09:00
Cutls
4c26a76cd4 New translations main.json (Spanish) 2019-11-26 23:28:35 +09:00
Cutls
ce9bd51a92 New translations main.json (Spanish, Argentina) 2019-11-26 23:28:31 +09:00
Cutls
f6dad03f7f New translations main.json (Swedish) 2019-11-26 23:28:28 +09:00
Cutls
0ee1ca5086 New translations main.json (Ukrainian) 2019-11-26 23:28:23 +09:00
Cutls
088c370d0e New translations main.json (Vietnamese) 2019-11-26 23:28:20 +09:00
Cutls
db934fb96b New translations main.json (English) 2019-11-26 23:28:17 +09:00
Cutls
ef3bae0c0f New translations main.json (Turkish) 2019-11-26 23:28:15 +09:00
Cutls
bcf7d5f6ae New translations main.json (Norwegian) 2019-11-26 23:28:10 +09:00
Cutls
bfaee4533c New translations main.json (Polish) 2019-11-26 23:28:07 +09:00
Cutls
cf24c2042b New translations main.json (Portuguese) 2019-11-26 23:28:03 +09:00
Cutls
be9a52c221 New translations main.json (Serbian (Cyrillic)) 2019-11-26 23:28:01 +09:00
Cutls
142098c4e7 New translations main.json (Portuguese, Brazilian) 2019-11-26 23:27:57 +09:00
Cutls
b4da761c5b New translations main.json (Romanian) 2019-11-26 23:27:54 +09:00
Cutls
48d1dd14c1 New translations main.json (Russian) 2019-11-26 23:27:50 +09:00
cutls
3243602653 Add NSFW on del and redraft #185 2019-11-26 23:26:04 +09:00
cutls
c2cfbd5583 Fix: #183 2019-11-26 23:20:03 +09:00
Cutls
6105152926 New translations setting.json (Russian) 2019-11-26 12:23:35 +09:00
Cutls
7ae073dec4 New translations setting.json (Russian) 2019-11-26 12:13:05 +09:00
Cutls
d6933a05a7 New translations index.json (Russian) 2019-11-26 12:13:03 +09:00
Cutls
aa53700ffd New translations setting.json (Russian) 2019-11-26 12:03:41 +09:00
Cutls
6deec5758d New translations main.json (Russian) 2019-11-26 12:03:40 +09:00
Cutls
ef68d2b421 New translations index.json (Russian) 2019-11-26 12:03:37 +09:00
Cutls
496106476b New translations main.json (Russian) 2019-11-26 11:53:14 +09:00
Cutls
7dd48c6da6 New translations index.json (Russian) 2019-11-26 11:53:12 +09:00
Cutls
6435f55d0b New translations setting.json (Russian) 2019-11-26 11:43:49 +09:00
Cutls
a5c7494ba2 New translations main.json (Russian) 2019-11-26 11:43:48 +09:00
Cutls
ed0e7cc615 New translations index.json (Russian) 2019-11-26 11:43:47 +09:00
Cutls
529a08dd01 New translations setting.json (Russian) 2019-11-26 11:36:32 +09:00
Cutls
3a3e4159d9 New translations main.json (Russian) 2019-11-26 11:36:30 +09:00
Cutls
fbbcf5de7f New translations index.json (Russian) 2019-11-26 11:36:28 +09:00
Cutls
101f0afa07 New translations acct.json (Russian) 2019-11-26 11:36:27 +09:00
Cutls
298ef0547b New translations acct.json (Russian) 2019-11-26 11:23:59 +09:00
cutls
b948608ce3 nice vote 2019-11-26 01:26:17 +09:00
Cutls
ec16bf81ed New translations main.json (Dutch) 2019-11-26 01:15:37 +09:00
Cutls
c6b63d1d0c New translations main.json (Finnish) 2019-11-26 01:15:34 +09:00
Cutls
b7397bccb0 New translations main.json (French) 2019-11-26 01:15:31 +09:00
Cutls
95606ed251 New translations main.json (Greek) 2019-11-26 01:15:26 +09:00
Cutls
5e3a89a654 New translations main.json (Hebrew) 2019-11-26 01:15:22 +09:00
Cutls
2a0a9fd205 New translations main.json (Hungarian) 2019-11-26 01:15:19 +09:00
Cutls
34e6a3bb72 New translations main.json (German) 2019-11-26 01:15:16 +09:00
Cutls
6b44ca625f New translations main.json (Danish) 2019-11-26 01:15:13 +09:00
Cutls
2082bb4662 New translations main.json (Afrikaans) 2019-11-26 01:15:10 +09:00
Cutls
5c5161ed3f New translations main.json (Arabic) 2019-11-26 01:15:06 +09:00
Cutls
3713a06750 New translations main.json (Bulgarian) 2019-11-26 01:15:03 +09:00
Cutls
a897d517cf New translations main.json (Catalan) 2019-11-26 01:14:58 +09:00
Cutls
df9c022563 New translations main.json (Chinese Simplified) 2019-11-26 01:14:56 +09:00
Cutls
3796b79872 New translations main.json (Chinese Traditional) 2019-11-26 01:14:52 +09:00
Cutls
f74eab450f New translations main.json (Czech) 2019-11-26 01:14:50 +09:00
Cutls
493066df76 New translations main.json (Italian) 2019-11-26 01:14:46 +09:00
Cutls
b89b5ea108 New translations main.json (Spanish) 2019-11-26 01:14:43 +09:00
Cutls
3dcfe1812d New translations main.json (Spanish, Argentina) 2019-11-26 01:14:40 +09:00
Cutls
7b9d084cde New translations main.json (Swedish) 2019-11-26 01:14:36 +09:00
Cutls
f80ec5e6c3 New translations main.json (Ukrainian) 2019-11-26 01:14:30 +09:00
Cutls
773e482d56 New translations main.json (Vietnamese) 2019-11-26 01:14:26 +09:00
Cutls
6a1910ec9d New translations main.json (English) 2019-11-26 01:14:23 +09:00
Cutls
a53b8fd884 New translations main.json (Turkish) 2019-11-26 01:14:21 +09:00
Cutls
5d9bb0ff19 New translations main.json (Norwegian) 2019-11-26 01:14:15 +09:00
Cutls
b27c3c0940 New translations main.json (Polish) 2019-11-26 01:14:12 +09:00
Cutls
e8f05ac324 New translations main.json (Portuguese) 2019-11-26 01:14:10 +09:00
Cutls
279c6c3514 New translations main.json (Serbian (Cyrillic)) 2019-11-26 01:14:08 +09:00
Cutls
61a6a0f4d9 New translations main.json (Portuguese, Brazilian) 2019-11-26 01:14:04 +09:00
Cutls
9e84456b46 New translations main.json (Romanian) 2019-11-26 01:14:01 +09:00
Cutls
3d65080e28 New translations main.json (Russian) 2019-11-26 01:13:56 +09:00
cutls
2cc8551386 Improve: vote 2019-11-26 01:02:15 +09:00
Cutls
2140757d5b New translations main.json (Bulgarian) 2019-11-25 21:55:35 +09:00
Cutls
f5226a6a7d New translations main.json (Bulgarian) 2019-11-25 21:45:11 +09:00
Cutls
6addb35131 New translations index.json (Bulgarian) 2019-11-25 21:45:09 +09:00
Cutls
ebba76cb92 New translations main.json (German) 2019-11-25 16:14:20 +09:00
Cutls
e3c6d81a23 New translations main.json (German) 2019-11-25 16:04:32 +09:00
cutls
b35ecbf79c hashtag 2019-11-24 23:07:21 +09:00
Cutls
3e3387e4bd New translations main.json (Greek) 2019-11-24 22:14:56 +09:00
Cutls
4b8c7fdaf3 New translations main.json (Hebrew) 2019-11-24 22:14:53 +09:00
Cutls
07dcf40d13 New translations main.json (Hungarian) 2019-11-24 22:14:50 +09:00
Cutls
1962e9265f New translations main.json (Italian) 2019-11-24 22:14:48 +09:00
Cutls
92b692a958 New translations main.json (Norwegian) 2019-11-24 22:14:44 +09:00
Cutls
a335813b42 New translations main.json (Polish) 2019-11-24 22:14:39 +09:00
Cutls
7579cf6636 New translations main.json (German) 2019-11-24 22:14:38 +09:00
Cutls
25316d8dcf New translations main.json (Czech) 2019-11-24 22:14:36 +09:00
Cutls
b87a28521f New translations main.json (Danish) 2019-11-24 22:14:33 +09:00
Cutls
e67d4e2e4f New translations main.json (Finnish) 2019-11-24 22:14:29 +09:00
Cutls
ea8295bb6b New translations main.json (French) 2019-11-24 22:14:26 +09:00
Cutls
3dfa92e091 New translations main.json (Dutch) 2019-11-24 22:14:24 +09:00
Cutls
9a9907b264 New translations main.json (Spanish, Argentina) 2019-11-24 22:14:20 +09:00
Cutls
e6b711b4b4 New translations main.json (Swedish) 2019-11-24 22:14:17 +09:00
Cutls
3375222582 New translations main.json (Turkish) 2019-11-24 22:14:14 +09:00
Cutls
b6a9284cbf New translations main.json (Ukrainian) 2019-11-24 22:14:11 +09:00
Cutls
7462c2195d New translations main.json (Vietnamese) 2019-11-24 22:14:09 +09:00
Cutls
01b4d0240b New translations main.json (English) 2019-11-24 22:14:05 +09:00
Cutls
663fed681d New translations main.json (Spanish) 2019-11-24 22:14:03 +09:00
Cutls
16d02b5507 New translations main.json (Portuguese) 2019-11-24 22:14:01 +09:00
Cutls
73ba6ff27a New translations main.json (Portuguese, Brazilian) 2019-11-24 22:13:58 +09:00
Cutls
d2b0bf0927 New translations main.json (Romanian) 2019-11-24 22:13:56 +09:00
Cutls
e653beee09 New translations main.json (Russian) 2019-11-24 22:13:52 +09:00
Cutls
3491c9b24b New translations main.json (Serbian (Cyrillic)) 2019-11-24 22:13:49 +09:00
Cutls
e328c0fb6e New translations main.json (Bulgarian) 2019-11-24 22:13:47 +09:00
Cutls
fdf1f34365 New translations main.json (Arabic) 2019-11-24 22:13:44 +09:00
Cutls
9fe22338a9 New translations main.json (Afrikaans) 2019-11-24 22:13:43 +09:00
Cutls
80ac4a55d3 New translations main.json (Catalan) 2019-11-24 22:13:39 +09:00
Cutls
c600009722 New translations main.json (Chinese Simplified) 2019-11-24 22:13:36 +09:00
Cutls
256e7b0f09 New translations main.json (Chinese Traditional) 2019-11-24 22:13:33 +09:00
cutls
ce72432039 Merge branch 'master' of github.com:cutls/TheDesk 2019-11-24 22:12:25 +09:00
cutls
b3689fe297 WIP: tag manager 2019-11-24 22:12:14 +09:00
Cutls
0b58690ddd New translations update.json (Spanish, Argentina) 2019-11-24 20:54:11 +09:00
Cutls
e598ab32cf New translations setting.json (Spanish, Argentina) 2019-11-24 20:54:10 +09:00
Cutls
001892dcee New translations main.json (Spanish, Argentina) 2019-11-24 20:54:09 +09:00
Cutls
a89e1202e1 New translations index.json (Spanish, Argentina) 2019-11-24 20:54:07 +09:00
Cutls
f9c8fb727c New translations index.json (Spanish, Argentina) 2019-11-24 20:44:08 +09:00
Cutls
4a6e8c733f New Crowdin translations (#175)
* New translations main.json (Russian)

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations main.json (Italian)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Danish)

* New translations main.json (German)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (French)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations index.json (Czech)

* New translations main.json (Czech)

* New translations index.json (German)

* New translations main.json (German)

* New translations main.json (German)

* New translations setting.json (German)

* New translations update.json (German)
2019-11-22 01:35:39 +09:00
dependabot-preview[bot]
de2ac24382 Bump electron-rebuild from 1.8.6 to 1.8.8 in /app (#179)
Bumps [electron-rebuild](https://github.com/electron/electron-rebuild) from 1.8.6 to 1.8.8.
- [Release notes](https://github.com/electron/electron-rebuild/releases)
- [Changelog](https://github.com/electron/electron-rebuild/blob/master/.releaserc.json)
- [Commits](https://github.com/electron/electron-rebuild/compare/v1.8.6...v1.8.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-22 01:35:07 +09:00
dependabot-preview[bot]
e7aa01c547 Bump sweetalert2 from 9.3.10 to 9.3.16 in /app (#178)
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.3.10 to 9.3.16.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.3.10...v9.3.16)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-22 01:34:56 +09:00
cutls
72b060e7ae cannnot use font-manager 0.3.1, released today 2019-11-19 01:21:35 +09:00
cutls
2a99a79d37 TheDesk 20.0.4 (Kawaii) 2019-11-19 00:56:40 +09:00
Cutls
d1e6fac1b0 Delete LATEST.md 2019-11-18 02:35:45 +09:00
Cutls
63802c98a3 Delete ver.json 2019-11-18 02:35:32 +09:00
Cutls
3bd8520e7c Delete mastodon_data.json 2019-11-18 02:35:20 +09:00
Cutls
662c15da93 Delete LICENSE.md 2019-11-18 02:35:09 +09:00
dependabot-preview[bot]
dd0fd325b8 Bump sweetalert2 from 9.3.5 to 9.3.10 in /app (#174)
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 9.3.5 to 9.3.10.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v9.3.5...v9.3.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-18 01:13:55 +09:00
Cutls
b772b03ef2 New Crowdin translations (#171)
* New translations main.json (Russian)

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations main.json (Italian)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Danish)

* New translations main.json (German)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (French)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations main.json (Finnish)

* New translations main.json (French)

* New translations main.json (German)

* New translations main.json (Greek)

* New translations main.json (Norwegian)

* New translations main.json (Italian)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Dutch)

* New translations main.json (Afrikaans)

* New translations main.json (Arabic)

* New translations main.json (Bulgarian)

* New translations main.json (Catalan)

* New translations main.json (Czech)

* New translations main.json (Chinese Simplified)

* New translations main.json (Danish)

* New translations main.json (Chinese Traditional)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Turkish)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Spanish)

* New translations main.json (Polish)

* New translations main.json (Portuguese)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Romanian)

* New translations main.json (Russian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Russian)

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations main.json (Italian)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Danish)

* New translations main.json (German)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (French)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations setting.json (Russian)

* New translations main.json (Russian)

* New translations index.json (Russian)

* New translations setting.json (Romanian)

* New translations main.json (Romanian)

* New translations index.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations main.json (Portuguese, Brazilian)

* New translations index.json (Portuguese, Brazilian)

* New translations setting.json (Portuguese)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese)

* New translations index.json (Portuguese)

* New translations setting.json (Polish)

* New translations main.json (Polish)

* New translations index.json (Polish)

* New translations setting.json (Norwegian)

* New translations main.json (Norwegian)

* New translations index.json (Norwegian)

* New translations setting.json (Italian)

* New translations index.json (Serbian (Cyrillic))

* New translations setting.json (Serbian (Cyrillic))

* New translations index.json (Italian)

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations index.json (English)

* New translations setting.json (Vietnamese)

* New translations main.json (Vietnamese)

* New translations index.json (Vietnamese)

* New translations setting.json (Ukrainian)

* New translations main.json (Ukrainian)

* New translations index.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations index.json (Turkish)

* New translations setting.json (Swedish)

* New translations main.json (Swedish)

* New translations index.json (Swedish)

* New translations setting.json (Spanish, Argentina)

* New translations main.json (Spanish, Argentina)

* New translations index.json (Spanish, Argentina)

* New translations setting.json (Spanish)

* New translations main.json (Spanish)

* New translations index.json (Spanish)

* New translations main.json (Italian)

* New translations index.json (Afrikaans)

* New translations setting.json (Catalan)

* New translations setting.json (Czech)

* New translations main.json (Czech)

* New translations index.json (Czech)

* New translations setting.json (Chinese Traditional)

* New translations main.json (Chinese Traditional)

* New translations index.json (Chinese Traditional)

* New translations setting.json (Chinese Simplified)

* New translations main.json (Chinese Simplified)

* New translations index.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations index.json (Danish)

* New translations index.json (Catalan)

* New translations setting.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations index.json (Bulgarian)

* New translations setting.json (Arabic)

* New translations main.json (Arabic)

* New translations index.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations main.json (Afrikaans)

* New translations main.json (Danish)

* New translations setting.json (Hungarian)

* New translations main.json (German)

* New translations main.json (Hungarian)

* New translations index.json (Hungarian)

* New translations setting.json (Hebrew)

* New translations main.json (Hebrew)

* New translations index.json (Hebrew)

* New translations setting.json (Greek)

* New translations main.json (Greek)

* New translations index.json (Greek)

* New translations setting.json (German)

* New translations index.json (German)

* New translations setting.json (Danish)

* New translations setting.json (French)

* New translations main.json (French)

* New translations index.json (French)

* New translations setting.json (Finnish)

* New translations main.json (Finnish)

* New translations index.json (Finnish)

* New translations setting.json (Dutch)

* New translations main.json (Dutch)

* New translations index.json (Dutch)

* New translations setting.json (English)

* New translations main.json (Russian)

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Norwegian)

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations main.json (Italian)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (Bulgarian)

* New translations main.json (Arabic)

* New translations main.json (Afrikaans)

* New translations main.json (Danish)

* New translations main.json (German)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (French)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations acct.json (Norwegian)

* New translations index.json (Norwegian)

* New translations main.json (Norwegian)

* New translations setting.json (Norwegian)

* New translations index.json (Norwegian)

* New translations main.json (Norwegian)

* New translations setting.json (Norwegian)

* New translations acct.json (Norwegian)

* New translations index.json (Norwegian)

* New translations main.json (Norwegian)

* New translations setting.json (Norwegian)

* New translations update.json (Norwegian)

* New translations index.json (Norwegian)

* New translations main.json (Norwegian)

* New translations index.json (Norwegian)

* New translations main.json (Norwegian)

* New translations index.json (Norwegian)

* New translations main.json (Norwegian)

* New translations setting.json (Norwegian)

* New translations update.json (Norwegian)

* New translations index.json (Norwegian)

* New translations main.json (Norwegian)

* New translations setting.json (Norwegian)
2019-11-18 01:13:41 +09:00
cutls
eda554eb8f Fix: fetch remote acct data 2019-11-18 01:08:55 +09:00
cutls
2936bd1e5a fix 2019-11-18 01:08:38 +09:00
cutls
df2f86f577 Fix: translation and fetch toot by URL 2019-11-18 01:08:25 +09:00
cutls
b9d1899cf2 typo 2019-11-18 01:07:59 +09:00
cutls
b01497e391 better coding :) 2019-11-18 01:07:44 +09:00
cutls
af38681293 When IntegTL str closed, icons become red 2019-11-16 23:04:31 +09:00
cutls
022565e176 Fix twitter link flied 2019-11-16 22:55:49 +09:00
cutls
00863d6917 Fix: Link analyzer not working 2019-11-16 22:47:18 +09:00
cutls
e345b3a479 Nice insert emoji and tags yeah 2019-11-16 22:02:42 +09:00
cutls
fe32723ad5 Fix: moreLoading 2019-11-16 21:29:11 +09:00
cutls
b9d562d8f0 www.youtube.com 2019-11-16 14:29:06 +09:00
cutls
83bd9499fd TheDesk20.0.3 (Kawaii) 2019-11-16 14:15:45 +09:00
cutls
d3911792ec details 2019-11-16 13:40:35 +09:00
cutls
5c49715298 Around bookmark 2019-11-16 13:36:16 +09:00
cutls
2b3feb40ad Add bookmark TL 2019-11-16 04:58:37 +09:00
cutls
f7dbeaef84 Add dropdown and bookmark 2019-11-16 03:42:23 +09:00
cutls
31472e3206 gitignore 2019-11-16 00:02:03 +09:00
cutls
2e88a8e0c3 Add: Japanese(Kansai) locale 2019-11-16 00:01:54 +09:00
cutls
224d762bc6 Add twitcasting 2019-11-14 02:48:49 +09:00
cutls
2fa1299391 To improve and secure cards... 2019-11-14 02:42:06 +09:00
cutls
dad459694c Merge branch 'master' of github.com:cutls/TheDesk 2019-11-14 01:42:20 +09:00
cutls
c2fa24c956 Fix: thread 2019-11-14 01:42:09 +09:00
dependabot-preview[bot]
e55ea3bd0c Bump electron-builder from 21.2.0 to 22.1.0 in /app (#154)
Bumps [electron-builder](https://github.com/electron-userland/electron-builder) from 21.2.0 to 22.1.0.
- [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/v21.2.0...v22.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-14 00:53:45 +09:00
dependabot-preview[bot]
ae9e6c4a56 Bump chokidar from 3.2.3 to 3.3.0 in /app (#157)
Bumps [chokidar](https://github.com/paulmillr/chokidar) from 3.2.3 to 3.3.0.
- [Release notes](https://github.com/paulmillr/chokidar/releases)
- [Commits](https://github.com/paulmillr/chokidar/compare/3.2.3...3.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-14 00:53:31 +09:00
dependabot-preview[bot]
2a5bb034ab Bump materialize-css from 2387ea3 to e3eb698 in /app (#169)
Bumps [materialize-css](https://github.com/cutls/materialize) from `2387ea3` to `e3eb698`.
- [Release notes](https://github.com/cutls/materialize/releases)
- [Commits](2387ea3897...e3eb698a07)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-14 00:52:42 +09:00
dependabot-preview[bot]
49f190a471 Bump sweetalert2 from 8.18.6 to 9.3.4 in /app (#170)
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 8.18.6 to 9.3.4.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v8.18.6...v9.3.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-14 00:52:19 +09:00
Cutls
3f5a870877 New Crowdin translations (#167)
* New translations index.json (Russian)

* New translations index.json (Romanian)

* New translations index.json (Portuguese, Brazilian)

* New translations index.json (Portuguese)

* New translations index.json (Polish)

* New translations index.json (Norwegian)

* New translations index.json (Serbian (Cyrillic))

* New translations index.json (Italian)

* New translations index.json (Vietnamese)

* New translations index.json (Ukrainian)

* New translations index.json (Turkish)

* New translations index.json (Swedish)

* New translations index.json (Spanish)

* New translations index.json (Afrikaans)

* New translations index.json (Chinese Traditional)

* New translations index.json (Danish)

* New translations index.json (Catalan)

* New translations index.json (Arabic)

* New translations index.json (Hungarian)

* New translations index.json (Hebrew)

* New translations index.json (Greek)

* New translations index.json (French)

* New translations index.json (Finnish)

* New translations index.json (Dutch)

* New translations acct.json (German)

* New translations index.json (German)

* New translations index.json (German)

* New translations index.json (German)

* New translations index.json (German)
2019-11-14 00:51:39 +09:00
cutls
fd3cf1eb9f TheDesk 20.0.2 (Kawaii) 2019-11-12 00:59:07 +09:00
cutls
9a49979dcb Reconnecting overflow 2019-11-12 00:55:32 +09:00
cutls
6a11099b50 Error on en setting 2019-11-12 00:55:21 +09:00
cutls
5c5c57739a Copy the URL 2019-11-12 00:16:48 +09:00
cutls
8e663391b9 For grapheme cluster compt 2019-11-11 01:20:51 +09:00
cutls
85ccbd1382 For emoji counting 2019-11-11 01:06:46 +09:00
cutls
542ee57f93 Fix: the account color pref. is sometimes losted 2019-11-10 20:37:13 +09:00
cutls
f3fa854074 fix 2019-11-09 14:40:46 +09:00
cutls
714feca455 TheDesk 20.0.1 (Kawaii) 2019-11-09 14:38:43 +09:00
cutls
f0db66d8d8 Merge branch 'master' of github.com:cutls/TheDesk 2019-11-09 14:30:42 +09:00
cutls
cd74236462 test itunes 2019-11-09 14:30:28 +09:00
cutls
955c95e8a8 Fix: spotift tips 2019-11-09 14:19:18 +09:00
Cutls
ebdacc013a New Crowdin translations (#163)
* New translations acct.json (Bulgarian)

* New translations index.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations index.json (Bulgarian)

* New translations setting.json (Russian)

* New translations main.json (Russian)

* New translations setting.json (Romanian)

* New translations main.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations main.json (Portuguese, Brazilian)

* New translations setting.json (Portuguese)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese)

* New translations setting.json (Polish)

* New translations main.json (Polish)

* New translations setting.json (Norwegian)

* New translations main.json (Norwegian)

* New translations setting.json (Italian)

* New translations setting.json (Serbian (Cyrillic))

* New translations main.json (Turkish)

* New translations main.json (English)

* New translations setting.json (Vietnamese)

* New translations main.json (Vietnamese)

* New translations setting.json (Ukrainian)

* New translations main.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations setting.json (Swedish)

* New translations main.json (Swedish)

* New translations setting.json (Spanish, Argentina)

* New translations main.json (Spanish, Argentina)

* New translations setting.json (Spanish)

* New translations main.json (Spanish)

* New translations main.json (Italian)

* New translations setting.json (Catalan)

* New translations setting.json (Czech)

* New translations main.json (Czech)

* New translations setting.json (Chinese Traditional)

* New translations main.json (Chinese Traditional)

* New translations setting.json (Chinese Simplified)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations setting.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations setting.json (Arabic)

* New translations main.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations main.json (Afrikaans)

* New translations main.json (Danish)

* New translations setting.json (Hungarian)

* New translations main.json (German)

* New translations main.json (Hungarian)

* New translations setting.json (Hebrew)

* New translations main.json (Hebrew)

* New translations setting.json (Greek)

* New translations main.json (Greek)

* New translations setting.json (German)

* New translations setting.json (Danish)

* New translations setting.json (French)

* New translations main.json (French)

* New translations setting.json (Finnish)

* New translations main.json (Finnish)

* New translations setting.json (Dutch)

* New translations main.json (Dutch)

* New translations setting.json (English)
2019-11-09 11:15:15 +09:00
cutls
d08c2ecd74 TheDesk 20.0.0 (Kawaii) 2019-11-09 02:24:42 +09:00
cutls
ef9b851309 Fix: Improve: Integrated TL 2019-11-09 02:05:15 +09:00
cutls
083139efa7 fix 2019-11-09 00:15:03 +09:00
cutls
bd11f7da50 Add: get images from remote 2019-11-09 00:09:39 +09:00
cutls
472e9268a1 #162 minor 2019-11-08 23:49:36 +09:00
cutls
e6ce764084 #162 image viewer 2019-11-08 23:46:12 +09:00
cutls
b8fcd11a62 wip 2019-11-08 22:53:52 +09:00
cutls
f35232cc52 Coding style 2019-11-08 22:52:54 +09:00
cutls
615b89be3a Merge branch 'master' of github.com:cutls/TheDesk 2019-11-04 01:10:19 +09:00
cutls
ffa4ecd673 Add: JSON parse miss error-log 2019-11-04 01:10:06 +09:00
cutls
5dfb28f2de Fix: emoji parette 2019-11-04 01:09:43 +09:00
cutls
25d24ddef0 Fix: follow on cross-acct 2019-11-04 01:09:02 +09:00
Cutls
dcc9aba4a8 New Crowdin translations (#153)
* New translations index.json (Russian)

* New translations index.json (Romanian)

* New translations index.json (Portuguese, Brazilian)

* New translations index.json (Portuguese)

* New translations index.json (Polish)

* New translations index.json (Norwegian)

* New translations index.json (Serbian (Cyrillic))

* New translations index.json (Afrikaans)

* New translations index.json (Vietnamese)

* New translations index.json (Ukrainian)

* New translations index.json (Turkish)

* New translations index.json (Swedish)

* New translations index.json (Spanish, Argentina)

* New translations index.json (Spanish)

* New translations index.json (Italian)

* New translations index.json (Czech)

* New translations index.json (Chinese Traditional)

* New translations index.json (Chinese Simplified)

* New translations index.json (Catalan)

* New translations index.json (Bulgarian)

* New translations index.json (Arabic)

* New translations index.json (Danish)

* New translations index.json (Hungarian)

* New translations index.json (Hebrew)

* New translations index.json (Greek)

* New translations index.json (German)

* New translations index.json (French)

* New translations index.json (Finnish)

* New translations index.json (Dutch)

* New translations index.json (English)
2019-11-03 20:27:25 +09:00
cutls
9977c009e0 Add: log viewer 2019-10-31 01:00:06 +09:00
cutls
2fd45f9e31 Merge branch 'master' of github.com:cutls/TheDesk 2019-10-31 00:30:38 +09:00
cutls
4f7eb88a13 Add: logger 2019-10-31 00:30:26 +09:00
dependabot-preview[bot]
1455f04261 Bump chokidar from 3.2.2 to 3.2.3 in /app (#152)
Bumps [chokidar](https://github.com/paulmillr/chokidar) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/paulmillr/chokidar/releases)
- [Commits](https://github.com/paulmillr/chokidar/compare/3.2.2...3.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-30 01:15:21 +09:00
cutls
9f9e4d6d6e travis 2019-10-27 11:59:24 +09:00
cutls
3ab45a57e1 travis 2019-10-27 11:55:36 +09:00
cutls
3d5485072c travis 2019-10-27 11:52:50 +09:00
cutls
8c2083955f TheDesk Usamin (18.11.4) 2019-10-27 11:43:58 +09:00
Cutls
450c6a758f New Crowdin translations (#150)
* New translations update.json (Hebrew)

* New translations update.json (Italian)

* New translations setting.json (Italian)

* New translations update.json (Hungarian)

* New translations setting.json (Hungarian)

* New translations setting.json (Hebrew)

* New translations update.json (Greek)

* New translations setting.json (Greek)

* New translations update.json (German)

* New translations setting.json (German)

* New translations update.json (Romanian)

* New translations setting.json (Romanian)

* New translations update.json (Portuguese, Brazilian)

* New translations setting.json (Portuguese, Brazilian)

* New translations setting.json (Norwegian)

* New translations update.json (Portuguese)

* New translations setting.json (Portuguese)

* New translations update.json (Polish)

* New translations setting.json (Polish)

* New translations update.json (Norwegian)

* New translations update.json (French)

* New translations update.json (Bulgarian)

* New translations update.json (Chinese Simplified)

* New translations setting.json (Chinese Simplified)

* New translations update.json (Catalan)

* New translations setting.json (Catalan)

* New translations setting.json (Bulgarian)

* New translations update.json (Arabic)

* New translations setting.json (Arabic)

* New translations setting.json (French)

* New translations update.json (Afrikaans)

* New translations setting.json (Afrikaans)

* New translations setting.json (Chinese Traditional)

* New translations update.json (Finnish)

* New translations setting.json (Finnish)

* New translations update.json (Dutch)

* New translations setting.json (Dutch)

* New translations setting.json (Czech)

* New translations update.json (Danish)

* New translations update.json (Czech)

* New translations setting.json (Danish)

* New translations update.json (Chinese Traditional)

* New translations update.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations update.json (Turkish)

* New translations setting.json (Ukrainian)

* New translations update.json (Vietnamese)

* New translations setting.json (Vietnamese)

* New translations setting.json (English)

* New translations update.json (Swedish)

* New translations setting.json (Swedish)

* New translations setting.json (Russian)

* New translations update.json (Russian)

* New translations setting.json (Serbian (Cyrillic))

* New translations update.json (Serbian (Cyrillic))

* New translations setting.json (Spanish)

* New translations update.json (Spanish)

* New translations setting.json (Spanish, Argentina)

* New translations update.json (Spanish, Argentina)

* New translations update.json (English)
2019-10-26 02:17:28 +09:00
dependabot-preview[bot]
24f3e1e758 Bump sweetalert2 from 8.18.5 to 8.18.6 in /app (#149)
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 8.18.5 to 8.18.6.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v8.18.5...v8.18.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-26 02:16:48 +09:00
cutls
b9103abe96 Merge branch 'master' of github.com:cutls/TheDesk 2019-10-26 02:15:58 +09:00
cutls
a7f8793454 Improve: speed on setting load 2019-10-26 02:14:32 +09:00
cutls
7b28981e9c JP alert dialog 2019-10-26 02:13:37 +09:00
cutls
ca41ca955c JP alert dialog 2019-10-26 02:13:13 +09:00
cutls
dd086e62cb Fix: follow text 2019-10-26 01:21:25 +09:00
cutls
3e2d40d248 WIP: useragent 2019-10-26 01:16:33 +09:00
cutls
bb08ec2435 improve: update 2019-10-25 00:04:53 +09:00
Cutls
0677c24887 New Crowdin translations (#147)
* New translations acct.json (Afrikaans)

* New translations acct.json (Portuguese, Brazilian)

* New translations acct.json (Serbian (Cyrillic))

* New translations main.json (Russian)

* New translations acct.json (Russian)

* New translations main.json (Romanian)

* New translations acct.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Portuguese)

* New translations acct.json (Portuguese)

* New translations main.json (Polish)

* New translations acct.json (Polish)

* New translations main.json (Norwegian)

* New translations acct.json (Norwegian)

* New translations main.json (Turkish)

* New translations acct.json (English)

* New translations main.json (Vietnamese)

* New translations acct.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations acct.json (Ukrainian)

* New translations acct.json (Spanish)

* New translations acct.json (Turkish)

* New translations main.json (Swedish)

* New translations acct.json (Swedish)

* New translations acct.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations main.json (Italian)

* New translations acct.json (Italian)

* New translations acct.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations acct.json (Chinese Traditional)

* New translations acct.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations acct.json (Catalan)

* New translations acct.json (Bulgarian)

* New translations main.json (Arabic)

* New translations acct.json (Arabic)

* New translations main.json (Afrikaans)

* New translations acct.json (Danish)

* New translations main.json (Danish)

* New translations main.json (Hungarian)

* New translations acct.json (Hungarian)

* New translations main.json (Hebrew)

* New translations acct.json (Hebrew)

* New translations main.json (Greek)

* New translations acct.json (Greek)

* New translations acct.json (German)

* New translations main.json (French)

* New translations acct.json (French)

* New translations main.json (Finnish)

* New translations acct.json (Finnish)

* New translations main.json (Dutch)

* New translations acct.json (Dutch)
2019-10-23 21:40:29 +09:00
cutls
29277236ca travis upd 2019-10-22 15:17:48 +09:00
cutls
7579957fdf fix 2019-10-22 14:53:08 +09:00
cutls
257d0d313d TheDesk Usamin (18.11.3) 2019-10-22 14:52:03 +09:00
cutls
4b970ef770 Merge branch 'master' of github.com:cutls/TheDesk 2019-10-22 14:42:47 +09:00
Cutls
6ec35e37ab New Crowdin translations (#146)
* New translations main.json (Norwegian)

* New translations main.json (Vietnamese)

* New translations main.json (Ukrainian)

* New translations main.json (Turkish)

* New translations main.json (Swedish)

* New translations main.json (Spanish, Argentina)

* New translations main.json (Spanish)

* New translations main.json (Serbian (Cyrillic))

* New translations main.json (Russian)

* New translations main.json (Romanian)

* New translations main.json (Portuguese, Brazilian)

* New translations main.json (Portuguese)

* New translations main.json (Polish)

* New translations main.json (Italian)

* New translations main.json (Hungarian)

* New translations main.json (Hebrew)

* New translations main.json (Greek)

* New translations main.json (German)

* New translations main.json (French)

* New translations main.json (Finnish)

* New translations main.json (Dutch)

* New translations main.json (Danish)

* New translations main.json (Czech)

* New translations main.json (Chinese Traditional)

* New translations main.json (Chinese Simplified)

* New translations main.json (Catalan)

* New translations main.json (English)

* New translations main.json (Arabic)

* New translations main.json (Bulgarian)

* New translations main.json (Afrikaans)

* New translations setting.json (Afrikaans)

* New translations setting.json (Arabic)

* New translations setting.json (Norwegian)

* New translations setting.json (Vietnamese)

* New translations setting.json (Ukrainian)

* New translations setting.json (Turkish)

* New translations setting.json (Swedish)

* New translations setting.json (Spanish, Argentina)

* New translations setting.json (Spanish)

* New translations setting.json (Serbian (Cyrillic))

* New translations setting.json (Russian)

* New translations setting.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations setting.json (Portuguese)

* New translations setting.json (Polish)

* New translations setting.json (Italian)

* New translations setting.json (Bulgarian)

* New translations setting.json (Hungarian)

* New translations setting.json (Hebrew)

* New translations setting.json (Greek)

* New translations setting.json (German)

* New translations setting.json (French)

* New translations setting.json (Finnish)

* New translations setting.json (Dutch)

* New translations setting.json (Danish)

* New translations setting.json (Czech)

* New translations setting.json (Chinese Traditional)

* New translations setting.json (Chinese Simplified)

* New translations setting.json (Catalan)

* New translations setting.json (English)

* New translations setting.json (Romanian)

* New translations setting.json (Portuguese, Brazilian)

* New translations setting.json (Russian)

* New translations setting.json (Italian)

* New translations setting.json (Norwegian)

* New translations setting.json (Portuguese)

* New translations setting.json (Polish)

* New translations setting.json (Serbian (Cyrillic))

* New translations setting.json (Ukrainian)

* New translations setting.json (Vietnamese)

* New translations setting.json (Turkish)

* New translations setting.json (Spanish)

* New translations setting.json (Spanish, Argentina)

* New translations setting.json (Swedish)

* New translations main.json (Chinese Simplified)

* New translations setting.json (Chinese Simplified)

* New translations setting.json (Chinese Traditional)

* New translations setting.json (Czech)

* New translations setting.json (Catalan)

* New translations setting.json (Arabic)

* New translations setting.json (Afrikaans)

* New translations index.json (Bulgarian)

* New translations main.json (Bulgarian)

* New translations setting.json (Bulgarian)

* New translations setting.json (Danish)

* New translations setting.json (Greek)

* New translations setting.json (Hebrew)

* New translations setting.json (Hungarian)

* New translations setting.json (German)

* New translations index.json (German)

* New translations setting.json (Dutch)

* New translations setting.json (Finnish)

* New translations index.json (French)

* New translations main.json (French)

* New translations setting.json (French)

* New translations main.json (Spanish, Argentina)
2019-10-22 14:42:05 +09:00
cutls
72f461f0d2 Merge branch 'master' of github.com:cutls/TheDesk 2019-10-22 14:37:04 +09:00
cutls
32c7f52882 Fix: post-box 2019-10-22 14:34:30 +09:00
cutls
4943b3ad20 Add: login by access-token 2019-10-22 14:34:23 +09:00
cutls
7eccc04e98 ksc 2019-10-22 00:18:55 +09:00
Cutls
88e65c36bf Update crowdin.yml 2019-10-21 08:12:16 +09:00
cutls
5e13d86778 Add: keyshortcut to search 2019-10-20 20:57:22 +09:00
Cutls
0e89f8bc4d Merge pull request #144 from cutls/dependabot/npm_and_yarn/app/sweetalert2-8.18.5
Bump sweetalert2 from 8.18.4 to 8.18.5 in /app
2019-10-20 20:05:13 +09:00
Cutls
a9a57822ef Merge branch 'master' into dependabot/npm_and_yarn/app/sweetalert2-8.18.5 2019-10-20 20:05:06 +09:00
Cutls
df25b4e609 Merge pull request #145 from cutls/l10n_master
New Crowdin translations
2019-10-20 20:04:38 +09:00
cutls
b3ca402842 About update-check #141 2019-10-20 20:04:00 +09:00
Cutls
a52d7aee73 New translations setting.json (Spanish, Argentina) 2019-10-20 19:53:44 +09:00
Cutls
7214ff001a New translations setting.json (Spanish, Argentina) 2019-10-20 19:42:52 +09:00
Cutls
0e731c3e8a New translations main.json (Spanish, Argentina) 2019-10-20 19:42:51 +09:00
cutls
4f858cf7d6 Watch mode(not auto-reloaded) 2019-10-20 19:36:44 +09:00
cutls
3e5f9c51f5 Fix #142 2019-10-20 19:09:52 +09:00
cutls
8784cae01c Fix: mouseover 2019-10-20 13:27:19 +09:00
cutls
81a3da550f Fix: instance ticker 2019-10-20 13:13:59 +09:00
cutls
7fc06d0750 Merge branch 'master' of github.com:cutls/TheDesk 2019-10-20 13:11:15 +09:00
cutls
1e0ebe9b7f Improve: profile 2019-10-20 13:11:03 +09:00
dependabot-preview[bot]
73b7abd894 Bump sweetalert2 from 8.18.4 to 8.18.5 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 8.18.4 to 8.18.5.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v8.18.4...v8.18.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 20:15:02 +00:00
Cutls
132f7253f6 Merge pull request #143 from cutls/dependabot/npm_and_yarn/app/sweetalert2-8.18.4
Bump sweetalert2 from 8.18.3 to 8.18.4 in /app
2019-10-17 23:04:49 +09:00
dependabot-preview[bot]
827d581f1a Bump sweetalert2 from 8.18.3 to 8.18.4 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 8.18.3 to 8.18.4.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v8.18.3...v8.18.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-17 05:33:22 +00:00
cutls
9a315c241c about #141 clipboard 2019-10-14 00:52:33 +09:00
cutls
5f9ddd969e about #141 themes toast shows undifined 2019-10-14 00:44:12 +09:00
cutls
cacf7f9920 about #141 layout menu theme color 2019-10-14 00:38:33 +09:00
cutls
d642729158 Mastodon 3.0.1 compat 2019-10-14 00:28:58 +09:00
cutls
6b339b636a Pixelfed compat 2019-10-14 00:28:44 +09:00
cutls
85468761d3 Improve: nano 2019-10-14 00:28:10 +09:00
cutls
4cabeb2e99 about #141 2019-10-14 00:20:34 +09:00
Cutls
f7d89b7659 Merge pull request #139 from cutls/l10n_master
New Crowdin translations
2019-10-12 11:08:58 +09:00
Cutls
6b5c527a3e Merge pull request #140 from cutls/dependabot/npm_and_yarn/app/itunes-nowplaying-mac-0.3.1
Bump itunes-nowplaying-mac from 0.2.3 to 0.3.1 in /app
2019-10-12 11:08:16 +09:00
dependabot-preview[bot]
57cbab10ac Bump itunes-nowplaying-mac from 0.2.3 to 0.3.1 in /app
Bumps [itunes-nowplaying-mac](https://github.com/rinsuki/itunes-nowplaying-mac) from 0.2.3 to 0.3.1.
- [Release notes](https://github.com/rinsuki/itunes-nowplaying-mac/releases)
- [Commits](https://github.com/rinsuki/itunes-nowplaying-mac/commits/0.3.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-12 01:49:46 +00:00
cutls
f50c2d3049 fix np on macos 2019-10-12 01:33:40 +09:00
cutls
9957bd9b8a fix np on macos 2019-10-12 01:31:15 +09:00
cutls
e6767dc3f9 fix np on macos 2019-10-12 01:29:16 +09:00
cutls
136935d4f9 fix macOS np 2019-10-12 01:11:29 +09:00
cutls
d654b63bca Fix: macOS NP 2019-10-12 01:08:33 +09:00
cutls
3ba4dee8a7 TheDesk Usamin (18.11.2) 2019-10-12 00:46:52 +09:00
Cutls
d4e0a50dbb New translations main.json (Afrikaans) 2019-10-12 00:27:17 +09:00
Cutls
3d4e35d942 New translations main.json (Bulgarian) 2019-10-12 00:27:16 +09:00
Cutls
5dcdbcdb53 New translations main.json (Arabic) 2019-10-12 00:26:37 +09:00
Cutls
d3a6ad1105 New translations main.json (English) 2019-10-12 00:26:34 +09:00
Cutls
f233ca3284 New translations main.json (Catalan) 2019-10-12 00:26:33 +09:00
Cutls
f4914d9461 New translations main.json (Chinese Simplified) 2019-10-12 00:26:31 +09:00
Cutls
433aac37da New translations main.json (Chinese Traditional) 2019-10-12 00:26:29 +09:00
Cutls
fa34f5483e New translations main.json (Czech) 2019-10-12 00:26:25 +09:00
Cutls
defa748497 New translations main.json (Danish) 2019-10-12 00:26:23 +09:00
Cutls
c70b78d0c7 New translations main.json (Dutch) 2019-10-12 00:26:22 +09:00
Cutls
570b0c3e6a New translations main.json (Finnish) 2019-10-12 00:26:17 +09:00
Cutls
62a8d9b0f6 New translations main.json (French) 2019-10-12 00:26:13 +09:00
Cutls
97e1e4ce53 New translations main.json (German) 2019-10-12 00:26:11 +09:00
Cutls
b5655b530f New translations main.json (Greek) 2019-10-12 00:26:09 +09:00
Cutls
b2c2530a1a New translations main.json (Hebrew) 2019-10-12 00:26:08 +09:00
Cutls
c0a1139773 New translations main.json (Hungarian) 2019-10-12 00:26:06 +09:00
Cutls
e452f8e006 New translations main.json (Italian) 2019-10-12 00:26:03 +09:00
Cutls
7de625e004 New translations main.json (Polish) 2019-10-12 00:26:00 +09:00
Cutls
8106296f6c New translations main.json (Portuguese) 2019-10-12 00:25:58 +09:00
Cutls
7df901756f New translations main.json (Portuguese, Brazilian) 2019-10-12 00:25:57 +09:00
Cutls
b41984e153 New translations main.json (Romanian) 2019-10-12 00:25:53 +09:00
Cutls
376c7f2545 New translations main.json (Russian) 2019-10-12 00:25:52 +09:00
Cutls
d5df64f949 New translations main.json (Serbian (Cyrillic)) 2019-10-12 00:25:51 +09:00
Cutls
c9b2a66114 New translations main.json (Spanish) 2019-10-12 00:25:49 +09:00
Cutls
530917b85e New translations main.json (Spanish, Argentina) 2019-10-12 00:25:47 +09:00
Cutls
b118e61741 New translations main.json (Swedish) 2019-10-12 00:25:46 +09:00
Cutls
635df4dd09 New translations main.json (Turkish) 2019-10-12 00:25:44 +09:00
Cutls
dccdc6290e New translations main.json (Ukrainian) 2019-10-12 00:25:42 +09:00
Cutls
573c461aa2 New translations main.json (Vietnamese) 2019-10-12 00:25:40 +09:00
Cutls
5a76eb28bf New translations main.json (Norwegian) 2019-10-12 00:25:38 +09:00
cutls
48028a8e09 Add: description of images 2019-10-12 00:18:43 +09:00
cutls
1917531c54 cannot fav and bt 2019-10-11 23:50:25 +09:00
Cutls
a9d2bc08b7 New translations setting.json (English) 2019-10-11 22:23:57 +09:00
Cutls
e4ddd6ad8c New translations setting.json (Catalan) 2019-10-11 22:23:27 +09:00
Cutls
aaf318de03 New translations setting.json (Chinese Simplified) 2019-10-11 22:23:26 +09:00
Cutls
3c80cc0670 New translations setting.json (Chinese Traditional) 2019-10-11 22:23:24 +09:00
Cutls
a01d89db30 New translations setting.json (Czech) 2019-10-11 22:23:22 +09:00
Cutls
26090084ff New translations setting.json (Danish) 2019-10-11 22:23:21 +09:00
Cutls
ab0ce56033 New translations setting.json (Dutch) 2019-10-11 22:23:19 +09:00
Cutls
527854bbed New translations setting.json (Finnish) 2019-10-11 22:23:17 +09:00
Cutls
f9de846ad5 New translations setting.json (French) 2019-10-11 22:23:16 +09:00
Cutls
57fbb15685 New translations setting.json (German) 2019-10-11 22:23:14 +09:00
Cutls
8986107256 New translations setting.json (Greek) 2019-10-11 22:23:12 +09:00
Cutls
2326d409a4 New translations setting.json (Hebrew) 2019-10-11 22:23:10 +09:00
Cutls
bcbccd5cb1 New translations setting.json (Hungarian) 2019-10-11 22:23:09 +09:00
Cutls
d47373e3b5 New translations setting.json (Bulgarian) 2019-10-11 22:23:08 +09:00
Cutls
9ffcfa7f41 New translations setting.json (Italian) 2019-10-11 22:23:06 +09:00
Cutls
9a7ff92b5b New translations setting.json (Polish) 2019-10-11 22:23:05 +09:00
Cutls
a53f2ace64 New translations setting.json (Portuguese) 2019-10-11 22:23:02 +09:00
Cutls
280f6c4c9a New translations setting.json (Portuguese, Brazilian) 2019-10-11 22:23:01 +09:00
Cutls
cc33e8fa1b New translations setting.json (Romanian) 2019-10-11 22:22:59 +09:00
Cutls
52b649b1c4 New translations setting.json (Russian) 2019-10-11 22:22:58 +09:00
Cutls
4194412540 New translations setting.json (Serbian (Cyrillic)) 2019-10-11 22:22:56 +09:00
Cutls
9f2f0e29be New translations setting.json (Spanish) 2019-10-11 22:22:54 +09:00
Cutls
e43107ccf7 New translations setting.json (Spanish, Argentina) 2019-10-11 22:22:53 +09:00
Cutls
c2ebadd87a New translations setting.json (Swedish) 2019-10-11 22:22:51 +09:00
Cutls
3521e7b0e7 New translations setting.json (Turkish) 2019-10-11 22:22:50 +09:00
Cutls
9d0aad933e New translations setting.json (Ukrainian) 2019-10-11 22:22:49 +09:00
Cutls
3bd3df8fb2 New translations setting.json (Vietnamese) 2019-10-11 22:22:47 +09:00
Cutls
71e1f5ae9d New translations setting.json (Norwegian) 2019-10-11 22:22:45 +09:00
Cutls
36c3d354cd New translations setting.json (Arabic) 2019-10-11 22:22:42 +09:00
Cutls
9f0af1ba86 New translations setting.json (Afrikaans) 2019-10-11 22:22:26 +09:00
cutls
f74e2262dc Fix en not showing settings menu 2019-10-11 22:04:28 +09:00
cutls
2971144d7f Fix fav and bt errors 2019-10-11 22:04:14 +09:00
cutls
2e2723427b Fix travis error 2019-10-11 00:46:59 +09:00
cutls
ee6127ffcc Fix: travis error 2019-10-11 00:42:01 +09:00
cutls
dcd6fa6958 Add: release note 2019-10-11 00:22:41 +09:00
cutls
7442216962 TheDesk Usamin (18.11.1) 2019-10-11 00:04:31 +09:00
cutls
bb0c781daa Merge branch 'master' of github.com:cutls/TheDesk 2019-10-11 00:00:08 +09:00
cutls
56e5a5ac53 #135 package update 2019-10-10 23:59:57 +09:00
Cutls
419fa4906d Merge pull request #136 from cutls/dependabot/npm_and_yarn/app/electron-6.0.12
Bump electron from 6.0.11 to 6.0.12 in /app
2019-10-10 23:59:27 +09:00
Cutls
16e7617b1e Merge pull request #138 from cutls/dependabot/npm_and_yarn/app/sweetalert2-8.18.3
Bump sweetalert2 from 8.18.0 to 8.18.3 in /app
2019-10-10 23:59:05 +09:00
dependabot-preview[bot]
2ca5798f89 Bump sweetalert2 from 8.18.0 to 8.18.3 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 8.18.0 to 8.18.3.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v8.18.0...v8.18.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-10 02:41:08 +00:00
cutls
a08ddc1b8c Merge branch 'master' of github.com:cutls/TheDesk 2019-10-09 23:05:32 +09:00
cutls
83153e2777 Merge branch 'l10n_master' of github.com:cutls/TheDesk 2019-10-09 23:02:40 +09:00
cutls
5b72b93248 Add: custom advanced theme 2019-10-09 23:00:46 +09:00
cutls
c7d911451c Fix error of non display_name acct 2019-10-09 23:00:25 +09:00
Cutls
c400cc317d Merge pull request #137 from kPherox/macos-quit-window-all-closed
Change to quit when window all closed in macOS
2019-10-09 15:22:21 +09:00
dependabot-preview[bot]
50784c9958 Bump electron from 6.0.11 to 6.0.12 in /app
Bumps [electron](https://github.com/electron/electron) from 6.0.11 to 6.0.12.
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v6.0.11...v6.0.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-09 02:32:39 +00:00
cutls
c4a5d406c7 Add Custom Themes scheme 2019-10-09 01:14:27 +09:00
kPherox
d933eef8cc Change to quit when window all closed in macOS 2019-10-08 23:51:50 +09:00
cutls
ce84069429 WIP Fix #131 2019-10-08 23:46:59 +09:00
cutls
8140e56cbc Notification on Windows(can use render-process-based notification) 2019-10-08 23:26:21 +09:00
cutls
de40e0e22a Fix #132 2019-10-08 23:25:44 +09:00
cutls
44ccd111b2 Fix error on Linux 2019-10-08 22:04:51 +09:00
Cutls
7ac0889b78 Add some version 2019-10-05 22:48:21 +09:00
Cutls
c4a5996b21 New translations main.json (Spanish, Argentina) 2019-10-05 14:13:03 +09:00
Cutls
9eaca7bcb2 New translations index.json (Spanish, Argentina) 2019-10-05 14:13:01 +09:00
Cutls
90629aecb4 Add: always sensitive on 2019-10-05 03:51:05 +09:00
Cutls
cb6a75de3b Fix: lang selector 2019-10-05 03:50:49 +09:00
Cutls
9bb066596c fix version sys 2019-10-05 02:51:58 +09:00
Cutls
a0b6610b7d 18.11.0 2019-10-05 02:48:06 +09:00
Cutls
c4e06f90f8 Merge branch 'master' of https://github.com/cutls/TheDesk 2019-10-05 02:44:57 +09:00
Cutls
60a525f0b8 Merge pull request #124 from cutls/dependabot/npm_and_yarn/app/sweetalert2-8.18.0
Bump sweetalert2 from 8.17.6 to 8.18.0 in /app
2019-10-05 02:44:47 +09:00
Cutls
fe6067eeed Merge pull request #125 from cutls/dependabot/npm_and_yarn/app/electron-6.0.11
Bump electron from 6.0.10 to 6.0.11 in /app
2019-10-05 02:44:40 +09:00
Cutls
f72294e2b9 Merge pull request #126 from cutls/dependabot/npm_and_yarn/app/json5-2.1.1
Bump json5 from 2.1.0 to 2.1.1 in /app
2019-10-05 02:43:51 +09:00
Cutls
409b98dd39 Merge pull request #129 from cutls/l10n_master
New Crowdin translations
2019-10-05 02:43:00 +09:00
Cutls
0168b882a8 fix some categorized emojis 2019-10-05 02:40:25 +09:00
Cutls
9aa83354bd TheDesk Usamin (18.11.0) 2019-10-05 02:30:32 +09:00
Cutls
e311d82b0a New translations index.json (Bulgarian) 2019-10-05 02:25:40 +09:00
Cutls
531e526d33 New translations index.json (Catalan) 2019-10-05 02:25:38 +09:00
Cutls
a2a6c49ae0 New translations index.json (Chinese Simplified) 2019-10-05 02:25:37 +09:00
Cutls
15ae6d91d9 New translations index.json (Chinese Traditional) 2019-10-05 02:25:36 +09:00
Cutls
f3ba3706ba New translations index.json (Czech) 2019-10-05 02:25:34 +09:00
Cutls
0ab6ea2e26 New translations index.json (Danish) 2019-10-05 02:25:33 +09:00
Cutls
05d17f329f New translations index.json (Dutch) 2019-10-05 02:25:31 +09:00
Cutls
c7e9b67698 New translations index.json (Finnish) 2019-10-05 02:25:29 +09:00
Cutls
f654620816 New translations index.json (French) 2019-10-05 02:25:28 +09:00
Cutls
5bd4885241 New translations index.json (German) 2019-10-05 02:25:27 +09:00
Cutls
91643b06f2 New translations index.json (Greek) 2019-10-05 02:25:26 +09:00
Cutls
d35ec1b7c4 New translations index.json (Hebrew) 2019-10-05 02:25:24 +09:00
Cutls
d2609d11ab New translations index.json (Hungarian) 2019-10-05 02:25:23 +09:00
Cutls
014d3499f0 New translations index.json (Arabic) 2019-10-05 02:25:21 +09:00
Cutls
edd8a412b5 New translations index.json (Italian) 2019-10-05 02:25:20 +09:00
Cutls
7c57eef9f7 New translations index.json (Polish) 2019-10-05 02:25:19 +09:00
Cutls
8df4d5d808 New translations index.json (Portuguese) 2019-10-05 02:25:17 +09:00
Cutls
98b0fd4a4f New translations index.json (Portuguese, Brazilian) 2019-10-05 02:25:16 +09:00
Cutls
3e8c9acb02 New translations index.json (Romanian) 2019-10-05 02:25:15 +09:00
Cutls
d829dd01de New translations index.json (Russian) 2019-10-05 02:25:13 +09:00
Cutls
41803d21c9 New translations index.json (Serbian (Cyrillic)) 2019-10-05 02:25:12 +09:00
Cutls
b58b66178c New translations index.json (Spanish) 2019-10-05 02:25:10 +09:00
Cutls
7c40cf1fb7 New translations index.json (Spanish, Argentina) 2019-10-05 02:25:09 +09:00
Cutls
a923c62dac New translations index.json (Swedish) 2019-10-05 02:25:08 +09:00
Cutls
00d9c91a53 New translations index.json (Turkish) 2019-10-05 02:25:06 +09:00
Cutls
6fa101c699 New translations index.json (Ukrainian) 2019-10-05 02:25:05 +09:00
Cutls
1372833dd8 New translations index.json (Vietnamese) 2019-10-05 02:25:04 +09:00
Cutls
7d57750d73 New translations index.json (Norwegian) 2019-10-05 02:25:02 +09:00
Cutls
28c06706b4 New translations index.json (English) 2019-10-05 02:25:00 +09:00
Cutls
18146d2ef7 New translations index.json (Afrikaans) 2019-10-05 02:24:59 +09:00
Cutls
52c65afce6 Add: boost with visibility 2019-10-05 02:23:47 +09:00
Cutls
8f76c9b09d Fix: close tabs on acct/settings 2019-10-05 01:57:53 +09:00
Cutls
fffc94fbdd Fix transaltions 2019-10-05 01:57:34 +09:00
Cutls
1f398a8b4c Fix translations 2019-10-05 01:41:40 +09:00
Cutls
98f4010cb7 Merge pull request #128 from cutls/l10n_master
New Crowdin translations
2019-10-05 01:40:15 +09:00
Cutls
d34e8940a7 Merge branch 'master' into l10n_master 2019-10-05 01:39:57 +09:00
Cutls
bbf3c33a89 New translations update.json (English) 2019-10-05 01:37:45 +09:00
Cutls
f69fee98df New translations index.json (Spanish) 2019-10-05 01:37:43 +09:00
Cutls
f9b717965f New translations index.json (Serbian (Cyrillic)) 2019-10-05 01:37:42 +09:00
Cutls
01ad439d0a New translations index.json (Russian) 2019-10-05 01:37:41 +09:00
Cutls
29ad8d9dbc New translations index.json (Romanian) 2019-10-05 01:37:40 +09:00
Cutls
6ffad11cba New translations index.json (Portuguese, Brazilian) 2019-10-05 01:37:38 +09:00
Cutls
dc62840299 New translations index.json (Portuguese) 2019-10-05 01:37:37 +09:00
Cutls
ae9c669ca3 New translations index.json (Swedish) 2019-10-05 01:37:36 +09:00
Cutls
cd4b9b3be6 New translations index.json (Polish) 2019-10-05 01:37:35 +09:00
Cutls
e7fc5719e3 New translations index.json (Italian) 2019-10-05 01:37:34 +09:00
Cutls
29350e0782 New translations index.json (Hungarian) 2019-10-05 01:37:33 +09:00
Cutls
2c9821e670 New translations index.json (Hebrew) 2019-10-05 01:37:31 +09:00
Cutls
a61050f8fa New translations index.json (Greek) 2019-10-05 01:37:30 +09:00
Cutls
747d25b439 New translations index.json (German) 2019-10-05 01:37:29 +09:00
Cutls
cafd36b85d New translations index.json (French) 2019-10-05 01:37:27 +09:00
Cutls
d7450d9699 New translations index.json (Norwegian) 2019-10-05 01:37:26 +09:00
Cutls
4224a02d16 New translations index.json (Finnish) 2019-10-05 01:37:25 +09:00
Cutls
82bf21d54b New translations index.json (Turkish) 2019-10-05 01:37:24 +09:00
Cutls
e2672d5d94 New translations index.json (Vietnamese) 2019-10-05 01:37:23 +09:00
Cutls
8d30ccf6fe New translations main.json (Hebrew) 2019-10-05 01:37:21 +09:00
Cutls
be995930a0 New translations main.json (Greek) 2019-10-05 01:37:20 +09:00
Cutls
fbd52c5a85 New translations main.json (German) 2019-10-05 01:37:18 +09:00
Cutls
10e7a7fd27 New translations main.json (French) 2019-10-05 01:37:17 +09:00
Cutls
92a0ec03b1 New translations main.json (Finnish) 2019-10-05 01:37:16 +09:00
Cutls
83a07f7ee4 New translations main.json (Dutch) 2019-10-05 01:37:14 +09:00
Cutls
32628be87b New translations main.json (Danish) 2019-10-05 01:37:13 +09:00
Cutls
102e8964ee New translations index.json (Ukrainian) 2019-10-05 01:37:11 +09:00
Cutls
742ea9f245 New translations main.json (Czech) 2019-10-05 01:37:09 +09:00
Cutls
25f843331c New translations main.json (Chinese Simplified) 2019-10-05 01:37:08 +09:00
Cutls
c6680d1f03 New translations main.json (Catalan) 2019-10-05 01:37:06 +09:00
Cutls
f5279fc91e New translations main.json (Bulgarian) 2019-10-05 01:37:05 +09:00
Cutls
ba50376c85 New translations main.json (Arabic) 2019-10-05 01:37:03 +09:00
Cutls
dd1395f3f4 New translations main.json (Afrikaans) 2019-10-05 01:37:02 +09:00
Cutls
450df2ce6a New translations index.json (English) 2019-10-05 01:37:00 +09:00
Cutls
f9e384a87d New translations main.json (Chinese Traditional) 2019-10-05 01:36:59 +09:00
Cutls
81484b7ae3 New translations main.json (Hungarian) 2019-10-05 01:36:58 +09:00
Cutls
a14809a96a New translations index.json (Dutch) 2019-10-05 01:36:56 +09:00
Cutls
1753b01a1b New translations index.json (Czech) 2019-10-05 01:36:55 +09:00
Cutls
86e7924675 New translations acct.json (Norwegian) 2019-10-05 01:36:53 +09:00
Cutls
e0daa923c6 New translations acct.json (Italian) 2019-10-05 01:36:52 +09:00
Cutls
32c67d5f62 New translations acct.json (Hungarian) 2019-10-05 01:36:51 +09:00
Cutls
7580706bd0 New translations acct.json (Hebrew) 2019-10-05 01:36:50 +09:00
Cutls
68da5085ea New translations acct.json (Greek) 2019-10-05 01:36:49 +09:00
Cutls
55d0c0f66b New translations acct.json (German) 2019-10-05 01:36:48 +09:00
Cutls
5d35d56837 New translations acct.json (French) 2019-10-05 01:36:48 +09:00
Cutls
a9b150960e New translations acct.json (Polish) 2019-10-05 01:36:47 +09:00
Cutls
72a9e81ba1 New translations acct.json (Finnish) 2019-10-05 01:36:46 +09:00
Cutls
0032a51051 New translations acct.json (Danish) 2019-10-05 01:36:45 +09:00
Cutls
faa9102815 New translations acct.json (Czech) 2019-10-05 01:36:44 +09:00
Cutls
525ce59b8b New translations acct.json (Chinese Traditional) 2019-10-05 01:36:43 +09:00
Cutls
00055a9f32 New translations acct.json (Chinese Simplified) 2019-10-05 01:36:42 +09:00
Cutls
3da62e366f New translations acct.json (Catalan) 2019-10-05 01:36:41 +09:00
Cutls
66ba0fe18e New translations acct.json (Bulgarian) 2019-10-05 01:36:40 +09:00
Cutls
cc7a7386be New translations acct.json (Dutch) 2019-10-05 01:36:39 +09:00
Cutls
f1a89f1001 New translations index.json (Danish) 2019-10-05 01:36:38 +09:00
Cutls
83ad5538b0 New translations acct.json (Portuguese) 2019-10-05 01:36:37 +09:00
Cutls
8e1497cf71 New translations acct.json (Romanian) 2019-10-05 01:36:36 +09:00
Cutls
9b4da63b0d New translations index.json (Chinese Traditional) 2019-10-05 01:36:35 +09:00
Cutls
1fad5adbd2 New translations index.json (Chinese Simplified) 2019-10-05 01:36:34 +09:00
Cutls
72497154a7 New translations index.json (Catalan) 2019-10-05 01:36:32 +09:00
Cutls
5dcab4fe9e New translations index.json (Bulgarian) 2019-10-05 01:36:31 +09:00
Cutls
d592f5eb62 New translations index.json (Arabic) 2019-10-05 01:36:29 +09:00
Cutls
d85cbca8ea New translations index.json (Afrikaans) 2019-10-05 01:36:28 +09:00
Cutls
be92ae76d6 New translations acct.json (English) 2019-10-05 01:36:26 +09:00
Cutls
3cfedd4ae9 New translations acct.json (Portuguese, Brazilian) 2019-10-05 01:36:24 +09:00
Cutls
cd88acf337 New translations acct.json (Vietnamese) 2019-10-05 01:36:23 +09:00
Cutls
adf628b3b0 New translations acct.json (Turkish) 2019-10-05 01:36:22 +09:00
Cutls
bbb945283b New translations acct.json (Swedish) 2019-10-05 01:36:21 +09:00
Cutls
10b7691313 New translations acct.json (Spanish) 2019-10-05 01:36:20 +09:00
Cutls
1e93556f8e New translations acct.json (Serbian (Cyrillic)) 2019-10-05 01:36:18 +09:00
Cutls
77bfb852e0 New translations acct.json (Russian) 2019-10-05 01:36:17 +09:00
Cutls
abeb0ad82f New translations acct.json (Ukrainian) 2019-10-05 01:36:16 +09:00
Cutls
722304c4a1 New translations acct.json (Arabic) 2019-10-05 01:36:15 +09:00
Cutls
9e5ea8c052 New translations main.json (Italian) 2019-10-05 01:36:14 +09:00
Cutls
e6dc46a270 New translations main.json (Polish) 2019-10-05 01:36:13 +09:00
Cutls
cf0fffcc3b New translations update.json (Finnish) 2019-10-05 01:36:11 +09:00
Cutls
64835b0de9 New translations update.json (Dutch) 2019-10-05 01:36:10 +09:00
Cutls
ca3ae925d1 New translations update.json (Danish) 2019-10-05 01:36:09 +09:00
Cutls
245e17ed42 New translations update.json (Czech) 2019-10-05 01:36:09 +09:00
Cutls
22605323c1 New translations update.json (Chinese Traditional) 2019-10-05 01:36:08 +09:00
Cutls
ca0e8f93f9 New translations update.json (Chinese Simplified) 2019-10-05 01:36:07 +09:00
Cutls
8f763f9c5c New translations update.json (Catalan) 2019-10-05 01:36:06 +09:00
Cutls
1e8e619762 New translations update.json (French) 2019-10-05 01:36:05 +09:00
Cutls
5d3d5b4c72 New translations update.json (Bulgarian) 2019-10-05 01:36:04 +09:00
Cutls
81029b203e New translations update.json (Afrikaans) 2019-10-05 01:36:03 +09:00
Cutls
1fbfb3970d New translations setting.json (English) 2019-10-05 01:36:02 +09:00
Cutls
aa9e590574 New translations setting.json (Vietnamese) 2019-10-05 01:36:01 +09:00
Cutls
495ef70d41 New translations setting.json (Ukrainian) 2019-10-05 01:35:59 +09:00
Cutls
8d45bf6ee9 New translations setting.json (Turkish) 2019-10-05 01:35:58 +09:00
Cutls
5ea7e397c6 New translations setting.json (Swedish) 2019-10-05 01:35:56 +09:00
Cutls
70af77f06e New translations update.json (Arabic) 2019-10-05 01:35:55 +09:00
Cutls
21da8f0274 New translations update.json (German) 2019-10-05 01:35:53 +09:00
Cutls
9be2b578a2 New translations update.json (Hebrew) 2019-10-05 01:35:52 +09:00
Cutls
bcbc640840 New translations update.json (Vietnamese) 2019-10-05 01:35:51 +09:00
Cutls
a569240444 New translations update.json (Ukrainian) 2019-10-05 01:35:50 +09:00
Cutls
f071b9c4f2 New translations update.json (Turkish) 2019-10-05 01:35:49 +09:00
Cutls
681f116733 New translations update.json (Swedish) 2019-10-05 01:35:48 +09:00
Cutls
b1bfa713e2 New translations update.json (Spanish) 2019-10-05 01:35:47 +09:00
Cutls
8133bf1916 New translations update.json (Serbian (Cyrillic)) 2019-10-05 01:35:46 +09:00
Cutls
7fc61cdad3 New translations update.json (Greek) 2019-10-05 01:35:45 +09:00
Cutls
0f926c96c8 New translations update.json (Russian) 2019-10-05 01:35:44 +09:00
Cutls
557409ea72 New translations update.json (Portuguese, Brazilian) 2019-10-05 01:35:43 +09:00
Cutls
f0a847b135 New translations update.json (Portuguese) 2019-10-05 01:35:42 +09:00
Cutls
5181b271bc New translations update.json (Polish) 2019-10-05 01:35:41 +09:00
Cutls
38fe00fbe0 New translations update.json (Norwegian) 2019-10-05 01:35:40 +09:00
Cutls
be100b24d1 New translations update.json (Italian) 2019-10-05 01:35:39 +09:00
Cutls
0ef338b1e8 New translations update.json (Hungarian) 2019-10-05 01:35:38 +09:00
Cutls
12130f8601 New translations update.json (Romanian) 2019-10-05 01:35:38 +09:00
Cutls
dfe6c9e8e7 New translations main.json (Norwegian) 2019-10-05 01:35:37 +09:00
Cutls
cfd4d18c62 New translations setting.json (Spanish) 2019-10-05 01:35:35 +09:00
Cutls
7ee60c8986 New translations setting.json (Russian) 2019-10-05 01:35:34 +09:00
Cutls
0fee24734d New translations setting.json (Bulgarian) 2019-10-05 01:35:33 +09:00
Cutls
4b7895c3ab New translations setting.json (Arabic) 2019-10-05 01:35:31 +09:00
Cutls
63610a324c New translations setting.json (Afrikaans) 2019-10-05 01:35:30 +09:00
Cutls
7a72daf3ec New translations main.json (English) 2019-10-05 01:35:28 +09:00
Cutls
f33acd67ec New translations main.json (Vietnamese) 2019-10-05 01:35:27 +09:00
Cutls
9a5ac036d6 New translations main.json (Ukrainian) 2019-10-05 01:35:26 +09:00
Cutls
e0d8094268 New translations main.json (Turkish) 2019-10-05 01:35:24 +09:00
Cutls
1d5648f882 New translations setting.json (Catalan) 2019-10-05 01:35:22 +09:00
Cutls
d528093510 New translations main.json (Swedish) 2019-10-05 01:35:21 +09:00
Cutls
738a11d96f New translations main.json (Spanish) 2019-10-05 01:35:19 +09:00
Cutls
01744889fb New translations main.json (Serbian (Cyrillic)) 2019-10-05 01:35:18 +09:00
Cutls
f5c4362f0d New translations main.json (Russian) 2019-10-05 01:35:16 +09:00
Cutls
268dd4d469 New translations main.json (Romanian) 2019-10-05 01:35:15 +09:00
Cutls
41c207af14 New translations main.json (Portuguese, Brazilian) 2019-10-05 01:35:13 +09:00
Cutls
513b7ecd78 New translations main.json (Portuguese) 2019-10-05 01:35:11 +09:00
Cutls
83fb4663f6 New translations main.json (Spanish, Argentina) 2019-10-05 01:35:09 +09:00
Cutls
7e88993b5c New translations setting.json (Serbian (Cyrillic)) 2019-10-05 01:35:08 +09:00
Cutls
6e6b7f37b2 New translations setting.json (Chinese Simplified) 2019-10-05 01:35:06 +09:00
Cutls
a1152446d9 New translations setting.json (Czech) 2019-10-05 01:35:05 +09:00
Cutls
3eab9b30a1 New translations setting.json (Romanian) 2019-10-05 01:35:03 +09:00
Cutls
573587b894 New translations setting.json (Portuguese, Brazilian) 2019-10-05 01:35:02 +09:00
Cutls
adfb395492 New translations setting.json (Portuguese) 2019-10-05 01:35:00 +09:00
Cutls
b4b4f09287 New translations setting.json (Polish) 2019-10-05 01:34:59 +09:00
Cutls
31c80ff07b New translations setting.json (Norwegian) 2019-10-05 01:34:58 +09:00
Cutls
d20e94b422 New translations setting.json (Italian) 2019-10-05 01:34:56 +09:00
Cutls
1e7fefbde9 New translations setting.json (Chinese Traditional) 2019-10-05 01:34:52 +09:00
Cutls
42f68a1109 New translations setting.json (Hungarian) 2019-10-05 01:34:50 +09:00
Cutls
f47c704e29 New translations setting.json (Greek) 2019-10-05 01:34:49 +09:00
Cutls
be3cfd8d2d New translations setting.json (German) 2019-10-05 01:34:48 +09:00
Cutls
d6ded9e64b New translations setting.json (French) 2019-10-05 01:34:47 +09:00
Cutls
6b0704ec76 New translations setting.json (Finnish) 2019-10-05 01:34:45 +09:00
Cutls
a896ae69d0 New translations setting.json (Dutch) 2019-10-05 01:34:44 +09:00
Cutls
9ba4fe2d0f New translations setting.json (Danish) 2019-10-05 01:34:42 +09:00
Cutls
29b904998e New translations setting.json (Hebrew) 2019-10-05 01:34:40 +09:00
Cutls
bf422cb0b2 New translations acct.json (Afrikaans) 2019-10-05 01:34:39 +09:00
Cutls
bf87c3e3f1 Update Crowdin configuration file 2019-10-05 01:33:47 +09:00
Cutls
b96c6bd324 New translations index.json (Spanish, Argentina) 2019-10-05 01:33:47 +09:00
Cutls
0293318b59 New translations main.json (Spanish, Argentina) 2019-10-05 01:33:45 +09:00
Cutls
38588b8204 New translations setting.json (Spanish, Argentina) 2019-10-05 01:33:44 +09:00
Cutls
f2d22e6b7f New translations update.json (Spanish, Argentina) 2019-10-05 01:33:42 +09:00
Cutls
45848306bc New translations index.json (German) 2019-10-05 01:33:31 +09:00
Cutls
b160b25d7d New translations main.json (German) 2019-10-05 01:33:29 +09:00
Cutls
d1e6d533fc New translations setting.json (German) 2019-10-05 01:33:27 +09:00
Cutls
ee168ed5e2 New translations update.json (German) 2019-10-05 01:33:18 +09:00
Cutls
6c8e3d88bd New translations acct.json (German) 2019-10-05 01:32:42 +09:00
Cutls
77b2e416c1 New translations acct.json (Spanish, Argentina) 2019-10-05 01:32:41 +09:00
Cutls
e02eefdc8e New translations acct.json (French) 2019-10-05 01:32:38 +09:00
Cutls
fd4f5ec574 New translations update.json (Bulgarian) 2019-10-05 01:15:22 +09:00
Cutls
b327b38113 New translations setting.json (Bulgarian) 2019-10-05 01:15:21 +09:00
Cutls
76ad662f56 New translations main.json (Bulgarian) 2019-10-05 01:15:19 +09:00
Cutls
4ad3c397b6 New translations index.json (Bulgarian) 2019-10-05 01:15:18 +09:00
Cutls
75d2b46c7a New translations acct.json (Bulgarian) 2019-10-05 01:15:16 +09:00
Cutls
a7659a0c2e New translations update.json (Czech) 2019-10-05 00:44:24 +09:00
Cutls
e3a740f66a New translations main.json (French) 2019-10-05 00:44:23 +09:00
Cutls
af281481d5 New translations setting.json (French) 2019-10-05 00:44:22 +09:00
Cutls
5f6758554d New translations update.json (French) 2019-10-05 00:44:20 +09:00
Cutls
2b2a8c1d2e New translations acct.json (German) 2019-10-05 00:44:19 +09:00
Cutls
156f5aec91 New translations index.json (German) 2019-10-05 00:44:18 +09:00
Cutls
9045e5aa90 New translations main.json (German) 2019-10-05 00:44:17 +09:00
Cutls
5ca9d2f1b1 New translations setting.json (German) 2019-10-05 00:44:15 +09:00
Cutls
6cb5bcfb0c New translations update.json (German) 2019-10-05 00:44:14 +09:00
Cutls
ffaff7c356 New translations index.json (French) 2019-10-05 00:44:12 +09:00
Cutls
130fc4996f New translations acct.json (Chinese Simplified) 2019-10-05 00:44:11 +09:00
Cutls
a95141048d New translations main.json (Chinese Simplified) 2019-10-05 00:44:10 +09:00
Cutls
2d82382f34 New translations setting.json (Chinese Simplified) 2019-10-05 00:44:04 +09:00
Cutls
6afd975913 New translations update.json (Chinese Simplified) 2019-10-05 00:44:03 +09:00
Cutls
0df0eb104c New translations acct.json (Czech) 2019-10-05 00:44:02 +09:00
Cutls
f1c5d3605c New translations index.json (Czech) 2019-10-05 00:44:01 +09:00
Cutls
afed289647 New translations main.json (Czech) 2019-10-05 00:43:59 +09:00
Cutls
22fb1fb8c9 New translations setting.json (Czech) 2019-10-05 00:43:57 +09:00
Cutls
5809d4efca New translations index.json (Chinese Simplified) 2019-10-05 00:43:56 +09:00
Cutls
332e215c85 New translations acct.json (French) 2019-10-05 00:43:55 +09:00
Cutls
9eefbe9fb9 New translations main.json (Spanish) 2019-10-05 00:35:54 +09:00
Cutls
3fa86d3236 New translations setting.json (Chinese Simplified) 2019-10-05 00:35:13 +09:00
Cutls
f0e125df08 New translations main.json (Chinese Simplified) 2019-10-05 00:35:10 +09:00
Cutls
8bf7d0efd4 New translations index.json (Chinese Simplified) 2019-10-05 00:35:08 +09:00
Cutls
8a71dfa591 New translations acct.json (Chinese Simplified) 2019-10-05 00:35:07 +09:00
Cutls
928dee677f New translations update.json (Catalan) 2019-10-05 00:35:06 +09:00
Cutls
bf5500eb19 New translations setting.json (Catalan) 2019-10-05 00:35:05 +09:00
Cutls
a5efb1b4b6 New translations main.json (Catalan) 2019-10-05 00:35:03 +09:00
Cutls
5aa77a67a8 New translations update.json (Chinese Simplified) 2019-10-05 00:35:01 +09:00
Cutls
c5c22f8dc9 New translations index.json (Catalan) 2019-10-05 00:35:00 +09:00
Cutls
ad3ae5e6b1 New translations update.json (Bulgarian) 2019-10-05 00:34:57 +09:00
Cutls
ed029ecb01 New translations setting.json (Bulgarian) 2019-10-05 00:34:56 +09:00
Cutls
ff45c64a22 New translations main.json (Bulgarian) 2019-10-05 00:34:55 +09:00
Cutls
c953091e8d New translations index.json (Bulgarian) 2019-10-05 00:34:53 +09:00
Cutls
fd30ab7168 New translations acct.json (Bulgarian) 2019-10-05 00:34:52 +09:00
Cutls
dca3dddba0 New translations update.json (Arabic) 2019-10-05 00:34:51 +09:00
Cutls
41eb4c54a4 New translations acct.json (Catalan) 2019-10-05 00:34:50 +09:00
Cutls
15a2333010 New translations setting.json (Arabic) 2019-10-05 00:34:49 +09:00
Cutls
1061d2867f New translations acct.json (Chinese Traditional) 2019-10-05 00:34:48 +09:00
Cutls
64ba1f1ea1 New translations main.json (Chinese Traditional) 2019-10-05 00:34:46 +09:00
Cutls
196cc664c8 New translations acct.json (Spanish) 2019-10-05 00:34:45 +09:00
Cutls
1d871d4d68 New translations update.json (Serbian (Cyrillic)) 2019-10-05 00:34:44 +09:00
Cutls
89475a9838 New translations setting.json (Serbian (Cyrillic)) 2019-10-05 00:34:43 +09:00
Cutls
52d335cbfd New translations main.json (Serbian (Cyrillic)) 2019-10-05 00:34:41 +09:00
Cutls
333ca4f36a New translations index.json (Serbian (Cyrillic)) 2019-10-05 00:34:39 +09:00
Cutls
d2e18c5400 New translations main.json (Danish) 2019-10-05 00:34:38 +09:00
Cutls
f04cc92b44 New translations index.json (Danish) 2019-10-05 00:34:37 +09:00
Cutls
fa3a048a6c New translations index.json (Chinese Traditional) 2019-10-05 00:34:35 +09:00
Cutls
6200034dd0 New translations acct.json (Danish) 2019-10-05 00:34:33 +09:00
Cutls
9a25d82c48 New translations setting.json (Czech) 2019-10-05 00:34:32 +09:00
Cutls
95e0d3953e New translations main.json (Czech) 2019-10-05 00:34:31 +09:00
Cutls
fb91da4b69 New translations index.json (Czech) 2019-10-05 00:34:29 +09:00
Cutls
74fcd2df7b New translations acct.json (Czech) 2019-10-05 00:34:28 +09:00
Cutls
1a88a08454 New translations update.json (Chinese Traditional) 2019-10-05 00:34:27 +09:00
Cutls
688cf579d6 New translations setting.json (Chinese Traditional) 2019-10-05 00:34:26 +09:00
Cutls
ba9ba5f55b New translations update.json (Czech) 2019-10-05 00:34:24 +09:00
Cutls
8341733dc2 New translations main.json (Arabic) 2019-10-05 00:34:23 +09:00
Cutls
54f7a0f20e New translations acct.json (Arabic) 2019-10-05 00:34:22 +09:00
Cutls
b2382d91d6 New translations index.json (Arabic) 2019-10-05 00:34:12 +09:00
Cutls
b729780ac1 New translations update.json (Afrikaans) 2019-10-05 00:34:09 +09:00
Cutls
6f4c516d0c New translations setting.json (Afrikaans) 2019-10-05 00:34:08 +09:00
Cutls
b9bdcba4f9 New translations main.json (Afrikaans) 2019-10-05 00:34:07 +09:00
Cutls
bd69863799 New translations index.json (Afrikaans) 2019-10-05 00:34:05 +09:00
Cutls
375fdc444e New translations acct.json (Afrikaans) 2019-10-05 00:34:03 +09:00
Cutls
e832592b35 New translations update.json (English) 2019-10-05 00:26:57 +09:00
Cutls
a15d4e097e New translations main.json (Hebrew) 2019-10-05 00:26:57 +09:00
Cutls
2597d2455c New translations setting.json (Hebrew) 2019-10-05 00:26:55 +09:00
Cutls
16e817d42c New translations update.json (Hebrew) 2019-10-05 00:26:54 +09:00
Cutls
c6d39a9e60 New translations acct.json (Hungarian) 2019-10-05 00:26:53 +09:00
Cutls
b860f1a170 New translations index.json (Hungarian) 2019-10-05 00:26:52 +09:00
Cutls
0cebd0b7f3 New translations main.json (Hungarian) 2019-10-05 00:26:50 +09:00
Cutls
91742c1b80 New translations setting.json (Hungarian) 2019-10-05 00:26:48 +09:00
Cutls
64bc79de38 New translations update.json (Hungarian) 2019-10-05 00:26:46 +09:00
Cutls
55239be477 New translations acct.json (Italian) 2019-10-05 00:26:45 +09:00
Cutls
0feebb662f New translations index.json (Italian) 2019-10-05 00:26:44 +09:00
Cutls
1699f9d141 New translations main.json (Italian) 2019-10-05 00:26:42 +09:00
Cutls
7ac9df9496 New translations index.json (Hebrew) 2019-10-05 00:26:41 +09:00
Cutls
2074818cd0 New translations setting.json (Italian) 2019-10-05 00:26:39 +09:00
Cutls
ecb3eaf541 New translations acct.json (Norwegian) 2019-10-05 00:26:38 +09:00
Cutls
345455da4b New translations index.json (Norwegian) 2019-10-05 00:26:37 +09:00
Cutls
1937fddbfd New translations main.json (Norwegian) 2019-10-05 00:26:35 +09:00
Cutls
e7534bbcbd New translations setting.json (Norwegian) 2019-10-05 00:26:34 +09:00
Cutls
305192eae6 New translations update.json (Norwegian) 2019-10-05 00:26:32 +09:00
Cutls
0541aa3373 New translations acct.json (Polish) 2019-10-05 00:26:31 +09:00
Cutls
81fe8b7435 New translations index.json (Polish) 2019-10-05 00:26:30 +09:00
Cutls
4ca26b4e32 New translations main.json (Polish) 2019-10-05 00:26:29 +09:00
Cutls
d348a67ba8 New translations setting.json (Polish) 2019-10-05 00:26:28 +09:00
Cutls
e2f03ee8d6 New translations update.json (Polish) 2019-10-05 00:26:26 +09:00
Cutls
0e64c46064 New translations update.json (Italian) 2019-10-05 00:26:25 +09:00
Cutls
987a4125ae New translations acct.json (Portuguese) 2019-10-05 00:26:24 +09:00
Cutls
a7e4c1a5a5 New translations acct.json (Hebrew) 2019-10-05 00:26:24 +09:00
Cutls
6d66982d35 New translations setting.json (Greek) 2019-10-05 00:26:23 +09:00
Cutls
7c78e05649 New translations acct.json (Dutch) 2019-10-05 00:26:21 +09:00
Cutls
61383ef294 New translations index.json (Dutch) 2019-10-05 00:26:20 +09:00
Cutls
469d4ec566 New translations main.json (Dutch) 2019-10-05 00:26:18 +09:00
Cutls
418f1146b7 New translations setting.json (Dutch) 2019-10-05 00:26:17 +09:00
Cutls
170c8885d0 New translations update.json (Dutch) 2019-10-05 00:26:15 +09:00
Cutls
e3f04f4ab8 New translations acct.json (Finnish) 2019-10-05 00:26:14 +09:00
Cutls
791b8142bd New translations index.json (Finnish) 2019-10-05 00:26:13 +09:00
Cutls
ffff89ae96 New translations main.json (Finnish) 2019-10-05 00:26:11 +09:00
Cutls
3c8b0f6308 New translations setting.json (Finnish) 2019-10-05 00:26:10 +09:00
Cutls
a01aa8c335 New translations update.json (Finnish) 2019-10-05 00:26:08 +09:00
Cutls
1dc1e6f081 New translations acct.json (French) 2019-10-05 00:26:07 +09:00
Cutls
b86447cdbf New translations update.json (Greek) 2019-10-05 00:26:06 +09:00
Cutls
bf1e805269 New translations index.json (French) 2019-10-05 00:26:05 +09:00
Cutls
0b0d551730 New translations setting.json (French) 2019-10-05 00:26:03 +09:00
Cutls
22016d2856 New translations update.json (French) 2019-10-05 00:26:02 +09:00
Cutls
6ef5d66521 New translations acct.json (German) 2019-10-05 00:26:01 +09:00
Cutls
bbf80408d4 New translations index.json (German) 2019-10-05 00:26:00 +09:00
Cutls
f7c7614625 New translations main.json (German) 2019-10-05 00:25:58 +09:00
Cutls
c5e71230e3 New translations setting.json (German) 2019-10-05 00:25:56 +09:00
Cutls
d61e15a02c New translations update.json (German) 2019-10-05 00:25:55 +09:00
Cutls
981d286e13 New translations acct.json (Greek) 2019-10-05 00:25:54 +09:00
Cutls
f58c3e9a67 New translations index.json (Greek) 2019-10-05 00:25:53 +09:00
Cutls
c316c381f8 New translations main.json (Greek) 2019-10-05 00:25:52 +09:00
Cutls
066ae678f9 New translations main.json (French) 2019-10-05 00:25:50 +09:00
Cutls
c3a75a5525 New translations update.json (Danish) 2019-10-05 00:25:49 +09:00
Cutls
14257ba448 New translations index.json (Portuguese) 2019-10-05 00:25:48 +09:00
Cutls
2c7e86fa97 New translations setting.json (Portuguese) 2019-10-05 00:25:46 +09:00
Cutls
63d7b7a471 New translations index.json (Swedish) 2019-10-05 00:25:44 +09:00
Cutls
98a882f450 New translations main.json (Swedish) 2019-10-05 00:25:43 +09:00
Cutls
868fd1ddc5 New translations setting.json (Swedish) 2019-10-05 00:25:42 +09:00
Cutls
9c19819a08 New translations update.json (Swedish) 2019-10-05 00:25:41 +09:00
Cutls
62ef634bc0 New translations acct.json (Turkish) 2019-10-05 00:25:40 +09:00
Cutls
f4158deb0a New translations index.json (Turkish) 2019-10-05 00:25:39 +09:00
Cutls
e61a224fc6 New translations main.json (Turkish) 2019-10-05 00:25:37 +09:00
Cutls
c83fb868e4 New translations setting.json (Turkish) 2019-10-05 00:25:35 +09:00
Cutls
0a118f1740 New translations update.json (Turkish) 2019-10-05 00:25:34 +09:00
Cutls
d5d6edd2fb New translations acct.json (Ukrainian) 2019-10-05 00:25:33 +09:00
Cutls
e17382f441 New translations index.json (Ukrainian) 2019-10-05 00:25:32 +09:00
Cutls
6c6fe5378f New translations acct.json (Swedish) 2019-10-05 00:25:31 +09:00
Cutls
b68a31b2ee New translations main.json (Ukrainian) 2019-10-05 00:25:30 +09:00
Cutls
0be362e82c New translations update.json (Ukrainian) 2019-10-05 00:25:29 +09:00
Cutls
17a917ad00 New translations acct.json (Vietnamese) 2019-10-05 00:25:28 +09:00
Cutls
f975fbf221 New translations index.json (Vietnamese) 2019-10-05 00:25:27 +09:00
Cutls
1741813003 New translations main.json (Vietnamese) 2019-10-05 00:25:25 +09:00
Cutls
7e7e24021b New translations setting.json (Vietnamese) 2019-10-05 00:25:23 +09:00
Cutls
a662106228 New translations update.json (Vietnamese) 2019-10-05 00:25:22 +09:00
Cutls
be98a562d4 New translations acct.json (English) 2019-10-05 00:25:21 +09:00
Cutls
2af4692e1a New translations index.json (English) 2019-10-05 00:25:20 +09:00
Cutls
b525ac18bc New translations main.json (English) 2019-10-05 00:25:19 +09:00
Cutls
3fdca1ba64 New translations setting.json (English) 2019-10-05 00:25:18 +09:00
Cutls
9cc721bf80 New translations setting.json (Ukrainian) 2019-10-05 00:25:17 +09:00
Cutls
d9cbd5d173 New translations main.json (Portuguese) 2019-10-05 00:25:15 +09:00
Cutls
59f5cb9d35 New translations update.json (Spanish, Argentina) 2019-10-05 00:25:13 +09:00
Cutls
bd020c14fb New translations main.json (Spanish, Argentina) 2019-10-05 00:25:12 +09:00
Cutls
7b9f814d37 New translations update.json (Portuguese) 2019-10-05 00:25:11 +09:00
Cutls
7a6fe30ee5 New translations acct.json (Portuguese, Brazilian) 2019-10-05 00:25:10 +09:00
Cutls
9910adbb40 New translations index.json (Portuguese, Brazilian) 2019-10-05 00:25:09 +09:00
Cutls
ad6a578863 New translations main.json (Portuguese, Brazilian) 2019-10-05 00:25:08 +09:00
Cutls
365120ed9f New translations setting.json (Portuguese, Brazilian) 2019-10-05 00:25:06 +09:00
Cutls
dbd0541ad1 New translations update.json (Portuguese, Brazilian) 2019-10-05 00:25:05 +09:00
Cutls
7ce16856ec New translations acct.json (Romanian) 2019-10-05 00:25:04 +09:00
Cutls
8fff3e4ec0 New translations index.json (Romanian) 2019-10-05 00:25:03 +09:00
Cutls
53f559a750 New translations main.json (Romanian) 2019-10-05 00:25:01 +09:00
Cutls
924fc30697 New translations setting.json (Romanian) 2019-10-05 00:25:00 +09:00
Cutls
41955f8927 New translations setting.json (Spanish, Argentina) 2019-10-05 00:24:59 +09:00
Cutls
83689f420c New translations update.json (Romanian) 2019-10-05 00:24:57 +09:00
Cutls
1c68a0fd4b New translations index.json (Russian) 2019-10-05 00:24:56 +09:00
Cutls
9e25db7089 New translations main.json (Russian) 2019-10-05 00:24:55 +09:00
Cutls
7eacd54a9c New translations setting.json (Russian) 2019-10-05 00:24:53 +09:00
Cutls
be44519431 New translations update.json (Russian) 2019-10-05 00:24:52 +09:00
Cutls
66f35b2720 New translations acct.json (Serbian (Cyrillic)) 2019-10-05 00:24:51 +09:00
Cutls
23902d2465 New translations index.json (Spanish) 2019-10-05 00:24:50 +09:00
Cutls
1c3717edef New translations setting.json (Spanish) 2019-10-05 00:24:48 +09:00
Cutls
17fa0f3eb0 New translations update.json (Spanish) 2019-10-05 00:24:47 +09:00
Cutls
247e19f1e3 New translations acct.json (Spanish, Argentina) 2019-10-05 00:24:46 +09:00
Cutls
54fae816d2 New translations index.json (Spanish, Argentina) 2019-10-05 00:24:45 +09:00
Cutls
3b70a2cc2d New translations acct.json (Russian) 2019-10-05 00:24:43 +09:00
Cutls
acd4a16dcb New translations setting.json (Danish) 2019-10-05 00:24:42 +09:00
Cutls
550c84c367 Update Crowdin configuration file 2019-10-05 00:24:35 +09:00
Cutls
e35e0be251 New translations acct.json (Spanish) 2019-10-05 00:24:35 +09:00
Cutls
db5ada2cfb New translations main.json (Spanish) 2019-10-05 00:24:34 +09:00
Cutls
643f452064 New translations update.json (Serbian (Cyrillic)) 2019-10-05 00:24:33 +09:00
Cutls
bbda6c6785 New translations setting.json (Serbian (Cyrillic)) 2019-10-05 00:24:32 +09:00
Cutls
e6449cd818 New translations main.json (Serbian (Cyrillic)) 2019-10-05 00:24:30 +09:00
Cutls
708527db77 New translations index.json (Serbian (Cyrillic)) 2019-10-05 00:24:28 +09:00
Cutls
b1aa6c5699 New translations index.json (Bulgarian) 2019-10-05 00:24:26 +09:00
Cutls
eeaa1a7f07 New translations acct.json (Catalan) 2019-10-05 00:24:25 +09:00
Cutls
52b7183935 New translations update.json (Bulgarian) 2019-10-05 00:24:24 +09:00
Cutls
386833ae64 New translations setting.json (Bulgarian) 2019-10-05 00:24:23 +09:00
Cutls
d4a48ce585 New translations main.json (Catalan) 2019-10-05 00:24:22 +09:00
Cutls
4931cdd272 New translations main.json (Bulgarian) 2019-10-05 00:24:20 +09:00
Cutls
d7933dc73f New translations index.json (Catalan) 2019-10-05 00:24:19 +09:00
Cutls
9a1048cc17 New translations acct.json (Bulgarian) 2019-10-05 00:24:17 +09:00
Cutls
a8fd0736b3 New translations index.json (Arabic) 2019-10-05 00:24:16 +09:00
Cutls
10d884a837 New translations setting.json (Arabic) 2019-10-05 00:24:08 +09:00
Cutls
52b28c79c7 New translations main.json (Arabic) 2019-10-05 00:24:06 +09:00
Cutls
8a36e55813 New translations acct.json (Arabic) 2019-10-05 00:24:05 +09:00
Cutls
5103bb2697 New translations update.json (Afrikaans) 2019-10-05 00:24:04 +09:00
Cutls
c6a07714ba New translations setting.json (Afrikaans) 2019-10-05 00:24:03 +09:00
Cutls
48c3500033 New translations setting.json (Catalan) 2019-10-05 00:24:01 +09:00
Cutls
d155e75a5d New translations main.json (Afrikaans) 2019-10-05 00:23:59 +09:00
Cutls
fa481129a9 New translations update.json (Arabic) 2019-10-05 00:23:58 +09:00
Cutls
3c1402dab7 New translations update.json (Catalan) 2019-10-05 00:23:57 +09:00
Cutls
a7f4189bd3 New translations main.json (Czech) 2019-10-05 00:23:56 +09:00
Cutls
64ed13de7c New translations index.json (Chinese Simplified) 2019-10-05 00:23:55 +09:00
Cutls
21394eb29e New translations index.json (Afrikaans) 2019-10-05 00:23:54 +09:00
Cutls
fbb8c3613f New translations main.json (Danish) 2019-10-05 00:23:52 +09:00
Cutls
7778da80d5 New translations index.json (Danish) 2019-10-05 00:23:51 +09:00
Cutls
e791e102d5 New translations acct.json (Danish) 2019-10-05 00:23:50 +09:00
Cutls
deb73450c3 New translations update.json (Czech) 2019-10-05 00:23:49 +09:00
Cutls
cc9d1bf4f2 New translations setting.json (Czech) 2019-10-05 00:23:48 +09:00
Cutls
b025ef8b22 New translations index.json (Czech) 2019-10-05 00:23:46 +09:00
Cutls
7bda0f400a New translations acct.json (Chinese Simplified) 2019-10-05 00:23:45 +09:00
Cutls
3b7a113a11 New translations acct.json (Czech) 2019-10-05 00:23:44 +09:00
Cutls
ee636bf88c New translations setting.json (Chinese Traditional) 2019-10-05 00:23:43 +09:00
Cutls
52144d8e52 New translations main.json (Chinese Traditional) 2019-10-05 00:23:41 +09:00
Cutls
513c686dea New translations index.json (Chinese Traditional) 2019-10-05 00:23:39 +09:00
Cutls
29cc2429ae New translations acct.json (Chinese Traditional) 2019-10-05 00:23:38 +09:00
Cutls
31219e9ac1 New translations update.json (Chinese Simplified) 2019-10-05 00:23:37 +09:00
Cutls
3beab5a9e1 New translations setting.json (Chinese Simplified) 2019-10-05 00:23:36 +09:00
Cutls
7558311531 New translations main.json (Chinese Simplified) 2019-10-05 00:23:35 +09:00
Cutls
106d08a899 New translations update.json (Chinese Traditional) 2019-10-05 00:23:33 +09:00
Cutls
02f203475d New translations acct.json (Afrikaans) 2019-10-05 00:23:32 +09:00
Cutls
b4460eddf7 Update Crowdin configuration file 2019-10-05 00:23:16 +09:00
Cutls
90e06116d1 Merge branch 'master' of https://github.com/cutls/TheDesk 2019-10-05 00:22:02 +09:00
Cutls
1e4397ed7b Fix: mugen streaming reconnect 2019-10-05 00:21:52 +09:00
Cutls
e9cc2d0e52 Change: locales 2019-10-05 00:07:15 +09:00
Cutls
376847b489 Update Crowdin configuration file 2019-10-04 23:54:24 +09:00
Cutls
5d61b83c50 Update Crowdin configuration file 2019-10-04 23:43:03 +09:00
Cutls
561b3a594b Delete files 2019-10-04 23:39:59 +09:00
dependabot-preview[bot]
2d0acb68b1 Bump json5 from 2.1.0 to 2.1.1 in /app
Bumps [json5](https://github.com/json5/json5) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/v2.1.1/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.1.0...v2.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-03 04:16:36 +00:00
Cutls
919c6c40e2 Fix: when acct-sel, not showing current acct prof img 2019-10-03 02:14:22 +09:00
Cutls
120e9da1c9 Add: Argentine Spanish locale 2019-10-03 02:01:42 +09:00
Cutls
47c6454c00 Add: categorize of custom emojis 2019-10-03 01:38:55 +09:00
Cutls
02f49cd392 WIP: fix: write position of window 2019-10-03 01:38:21 +09:00
Cutls
8117ddb6ce Add: click custom emojis to zoom in 2019-10-03 01:37:33 +09:00
dependabot-preview[bot]
d372fa8e6e Bump electron from 6.0.10 to 6.0.11 in /app
Bumps [electron](https://github.com/electron/electron) from 6.0.10 to 6.0.11.
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v6.0.10...v6.0.11)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-02 04:14:38 +00:00
dependabot-preview[bot]
c3ed865a3a Bump sweetalert2 from 8.17.6 to 8.18.0 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 8.17.6 to 8.18.0.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v8.17.6...v8.18.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-01 03:10:07 +00:00
Cutls
96c137ec4b Merge branch 'master' of https://github.com/cutls/TheDesk 2019-09-30 02:29:37 +09:00
Cutls
c5cd683aa5 Add: warning on logining Pleroma, PixelFed or something compatible platform 2019-09-30 02:29:26 +09:00
Cutls
c5cdabaa3a Change: move and add poll parser 2019-09-30 02:23:25 +09:00
Cutls
d19be3f2cb Fix: resolving error 2019-09-30 02:23:10 +09:00
Cutls
a9f55aa64f Add: compatibility viewer 2019-09-30 02:22:44 +09:00
Cutls
dfb0f79c92 Fix: cannot resolve and open on browser about Misskey Live URL 2019-09-30 02:21:59 +09:00
Cutls
4a59438c0c Change: tag trending graph design 2019-09-30 02:21:18 +09:00
Cutls
f35710d652 DevTools is opened automaticaly when launching 2019-09-30 02:20:06 +09:00
Cutls
c19a532f3e Merge pull request #121 from cutls/dependabot/npm_and_yarn/app/jimp-0.8.4
Bump jimp from 0.8.3 to 0.8.4 in /app
2019-09-28 03:22:26 +09:00
Cutls
be6b278b3c Merge pull request #122 from cutls/dependabot/npm_and_yarn/app/fortawesome/fontawesome-free-5.11.2
Bump @fortawesome/fontawesome-free from 5.11.1 to 5.11.2 in /app
2019-09-28 03:22:11 +09:00
Cutls
78c16dc278 Merge pull request #123 from cutls/dependabot/npm_and_yarn/app/node-notifier-6.0.0
Bump node-notifier from 5.4.3 to 6.0.0 in /app
2019-09-28 03:21:53 +09:00
Cutls
09d2839a00 Add: BouyomiChan connection 2019-09-26 00:04:50 +09:00
dependabot-preview[bot]
d17d52436f Bump node-notifier from 5.4.3 to 6.0.0 in /app
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 5.4.3 to 6.0.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.4.3...v6.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 23:00:07 +00:00
dependabot-preview[bot]
5c522a33d0 Bump @fortawesome/fontawesome-free from 5.11.1 to 5.11.2 in /app
Bumps [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) from 5.11.1 to 5.11.2.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/5.11.1...5.11.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 22:59:38 +00:00
Cutls
c9cf89adeb TheDesk Usain (18.10.1) 2019-09-22 20:36:11 +09:00
Cutls
c5c996cb7a Merge branch 'master' of https://github.com/cutls/TheDesk 2019-09-22 19:56:13 +09:00
Cutls
f2ec258e7a Change: markers API trigger 2019-09-22 19:55:59 +09:00
Cutls
8c29f21970 Travis (comp) 2019-09-22 19:55:22 +09:00
dependabot-preview[bot]
5b730d2c38 Bump jimp from 0.8.3 to 0.8.4 in /app
Bumps [jimp](https://github.com/oliver-moran/jimp) from 0.8.3 to 0.8.4.
- [Release notes](https://github.com/oliver-moran/jimp/releases)
- [Changelog](https://github.com/oliver-moran/jimp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oliver-moran/jimp/compare/v0.8.3...v0.8.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-20 20:19:52 +00:00
Cutls
609e84a8ae Merge pull request #118 from cutls/dependabot/npm_and_yarn/app/jimp-0.8.3
Bump jimp from 0.8.2 to 0.8.3 in /app
2019-09-20 22:53:55 +09:00
Cutls
7ca778f81b Merge pull request #119 from cutls/dependabot/npm_and_yarn/app/sweetalert2-8.17.6
Bump sweetalert2 from 8.17.4 to 8.17.6 in /app
2019-09-20 22:53:36 +09:00
Cutls
93b194af3b Merge pull request #120 from cutls/dependabot/npm_and_yarn/app/fortawesome/fontawesome-free-5.11.1
Bump @fortawesome/fontawesome-free from 5.11.0 to 5.11.1 in /app
2019-09-20 22:53:25 +09:00
Cutls
b3e1f32ffe Merge pull request #117 from cutls/dependabot/npm_and_yarn/app/electron-6.0.10
Bump electron from 6.0.9 to 6.0.10 in /app
2019-09-20 22:52:14 +09:00
dependabot-preview[bot]
d78b3bffeb Bump @fortawesome/fontawesome-free from 5.11.0 to 5.11.1 in /app
Bumps [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) from 5.11.0 to 5.11.1.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/5.11.0...5.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-19 20:26:51 +00:00
dependabot-preview[bot]
bff5038a64 Bump sweetalert2 from 8.17.4 to 8.17.6 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 8.17.4 to 8.17.6.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v8.17.4...v8.17.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-19 20:26:23 +00:00
dependabot-preview[bot]
0c7fcfbcc5 Bump jimp from 0.8.2 to 0.8.3 in /app
Bumps [jimp](https://github.com/oliver-moran/jimp) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/oliver-moran/jimp/releases)
- [Changelog](https://github.com/oliver-moran/jimp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oliver-moran/jimp/compare/v0.8.2...v0.8.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-19 20:25:54 +00:00
dependabot-preview[bot]
9d6fc15959 Bump electron from 6.0.9 to 6.0.10 in /app
Bumps [electron](https://github.com/electron/electron) from 6.0.9 to 6.0.10.
- [Release notes](https://github.com/electron/electron/releases)
- [Commits](https://github.com/electron/electron/compare/v6.0.9...v6.0.10)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-19 20:25:35 +00:00
Cutls
5bad5e1031 Merge pull request #116 from cutls/dependabot/npm_and_yarn/app/fortawesome/fontawesome-free-5.11.0
Bump @fortawesome/fontawesome-free from 5.10.2 to 5.11.0 in /app
2019-09-19 20:07:26 +09:00
Cutls
f8d6ec3a8f Merge pull request #114 from cutls/dependabot/npm_and_yarn/app/sweetalert2-8.17.4
Bump sweetalert2 from 8.17.3 to 8.17.4 in /app
2019-09-19 20:07:14 +09:00
dependabot-preview[bot]
9a3dc81630 Bump @fortawesome/fontawesome-free from 5.10.2 to 5.11.0 in /app
Bumps [@fortawesome/fontawesome-free](https://github.com/FortAwesome/Font-Awesome) from 5.10.2 to 5.11.0.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/5.10.2...5.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-18 20:30:43 +00:00
Cutls
3d9b97ccb5 WIP: Travis WIndows 1 2019-09-18 23:39:55 +09:00
Cutls
2c3dbba052 to Travis CI error for Windows 2019-09-18 23:32:31 +09:00
Cutls
907eecd030 fix 2019-09-18 23:25:22 +09:00
dependabot-preview[bot]
75026bf42d Bump sweetalert2 from 8.17.3 to 8.17.4 in /app
Bumps [sweetalert2](https://github.com/sweetalert2/sweetalert2) from 8.17.3 to 8.17.4.
- [Release notes](https://github.com/sweetalert2/sweetalert2/releases)
- [Changelog](https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sweetalert2/sweetalert2/compare/v8.17.3...v8.17.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-18 14:25:11 +00:00
Cutls
d217fb33a9 Like Typo 2019-09-18 23:24:34 +09:00
Cutls
8cea32d01b For developers 2019-09-18 23:23:40 +09:00
Cutls
c8d2da0c07 For Linux, macOS 2019-09-18 23:11:39 +09:00
Cutls
a458f51b9a travis 2019-09-17 01:43:01 +09:00
Cutls
bd8ac2935b to Travis 2019-09-17 01:37:18 +09:00
Cutls
dd59cc1468 Introduce yarn 2019-09-17 01:20:52 +09:00
Cutls
fd365c52cc Merge branch 'master' of https://github.com/cutls/TheDesk 2019-09-17 00:59:39 +09:00
Cutls
ad7e77a067 Add: notif-sound volume 2019-09-17 00:59:25 +09:00
Cutls
6b9135a205 remove v1 serach API 2019-09-17 00:24:16 +09:00
Cutls
fdca5b1c60 When complete vote, not refresh status 2019-09-17 00:24:00 +09:00
Cutls
f891b30f9f When unknown media, show after last"." 2019-09-17 00:23:41 +09:00
Cutls
8fbd8070f2 For Pleroma tags 2019-09-17 00:22:55 +09:00
Cutls
657dec1c10 When redraft, diabled acct-sel 2019-09-17 00:22:40 +09:00
Cutls
0d93dcdc45 Merge pull request #113 from cutls/dependabot/npm_and_yarn/app/jimp-tw-0.8.2
Update jimp requirement from ^0.7.0 to ^0.8.2 in /app
2019-09-14 12:13:26 +09:00
dependabot-preview[bot]
5a50c0e1e6 Update jimp requirement from ^0.7.0 to ^0.8.2 in /app
Updates the requirements on [jimp](https://github.com/oliver-moran/jimp) to permit the latest version.
- [Release notes](https://github.com/oliver-moran/jimp/releases)
- [Changelog](https://github.com/oliver-moran/jimp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/oliver-moran/jimp/compare/v0.7.0...v0.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-13 20:26:10 +00:00
307 changed files with 49351 additions and 16363 deletions

2
.github/FUNDING.yml vendored
View File

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

6
.gitignore vendored
View File

@@ -12,11 +12,15 @@ enq.md
app/.tkn app/.tkn
app/node_modules app/node_modules
app/js/login/tkn.js app/js/login/tkn.js
app/package-lock.json
app/view/en app/view/en
app/view/ja app/view/ja
app/view/ja-KS
app/view/de app/view/de
app/view/bg app/view/bg
app/view/cs app/view/cs
app/view/ps app/view/ps
app/view/es-AR
app/git app/git
*.code-workspace
releasenote.md
app/yarn-error.log

View File

@@ -3,15 +3,33 @@ os:
- linux - linux
- osx - osx
language: node_js language: node_js
env:
- YARN_GPG=no
node_js: node_js:
- '10.15.2' - '10.15.2'
cache:
yarn: true
script: node -v script: node -v
before_deploy: before_deploy:
- npm install electron-builder -g - yarn global add electron-builder
- cd app - cd app
- VERSION=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]') - VERSION=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
- npm install - yarn install --no-lockfile --prod
- npm run construct - yarn construct:store
- if [ "$TRAVIS_OS_NAME" = "osx" ];then electron-builder --mac -p never;else :;fi
- if [ "$TRAVIS_OS_NAME" = "osx" ];then cd ../build;else :;fi
- if [ "$TRAVIS_OS_NAME" = "osx" ];then mv *.dmg TheDesk-$VERSION-store.dmg;else :;fi
- if [ "$TRAVIS_OS_NAME" = "osx" ];then cd ../app;else :;fi
- if [ "$TRAVIS_OS_NAME" = "linux" ];then electron-builder --linux snap:x64 -p never;else :;fi
- if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../build;else :;fi
- if [ "$TRAVIS_OS_NAME" = "linux" ];then mv *.snap TheDesk-$VERSION-store.snap;else :;fi
- if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../app;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then yarn add electron-builder;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then electron-builder --win appx:x64 -p never ;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../build;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then mv *.appx TheDesk-$VERSION-store.appx;else :;fi
- if [ "$TRAVIS_OS_NAME" = "windows" ];then cd ../app;else :;fi
- yarn construct
- if [ "$TRAVIS_OS_NAME" = "osx" ];then electron-builder --mac -p never;else :;fi - 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 electron-builder --linux --x64 -p never;else :;fi
- if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../build;else :;fi - if [ "$TRAVIS_OS_NAME" = "linux" ];then cd ../build;else :;fi
@@ -45,4 +63,5 @@ deploy:
on: on:
repo: cutls/TheDesk repo: cutls/TheDesk
tags: true tags: true
all_branches: true branches:
only: "/^v?[0-9\\.]+/"

View File

@@ -1,22 +0,0 @@
## For Astarte(kirishima.cloud), My Primary Instance
TheDesk :thedesk: Akane (16.1.0)
・不具合修正(マウスオーバー,クリックに関する)
・2.5.0に対する対応(リプ数やendorseなど)
・軽量化を図った
・一つのカラムをTwitter(TweetDeck)にできる機能
・画像の保存先を変えられるように
・インスタンス情報の拡充
・デザイン変更
・トゥートバーを左端に持ってこれるように
・Windowsのネイティブ通知が復活
ほか
https://thedesk.top
:github: https://github.com/cutls/TheDesk #Desk #DeskUpdate
## For Other Instances
TheDesk :thedesk: Akane (16.0.1)
https://thedesk.top

View File

@@ -1,8 +0,0 @@
# プライバシーポリシー
* TheDeskは「開発者からのお知らせ」配信のためにサーバー(thedesk.top)に常時アクセスしています。
* 上記の接続によるユーザーの情報提供はありません。(IPアドレス等を含む)
* thedesk.topのページにおいては、Googleアナリティクスによる解析を採用しています。
* 配信についてAmazon Web Service CloudFrontを使用しています。CloudFrontにはアクセス解析機能がありますが、これの使用につきましては同プライバシーポリシーに則ります。
* 接続するインスタンスのプライバシーポリシーはAPIを通じた全てのアクションに対して有効ですので、TheDeskについてもそれらに則ります。

View File

@@ -11,7 +11,10 @@
Mastodon/Misskey client for PC(Windows/Linux/macOS) Mastodon/Misskey client for PC(Windows/Linux/macOS)
オープンソースSNSマストドン/MisskeyのPC向けクライアント[日本語はこちら](README_ja.md) オープンソースSNSマストドン/MisskeyのPC向けクライアント[日本語はこちら](README_ja.md)
Download:[TheDesk](https://thedesk.top) [![check](https://status.cutls.com/badge/?site=thedesk.top)](https://status.cutls.com) Download:[TheDesk](https://thedesk.top) [![check](https://status.cutls.com/badge/?site=thedesk.top)](https://status.cutls.com)
On GitHub Releases, `-store.*` assets are made for some application store or manager(Snapcraft, Homebrew, Microsoft Store).
They do not check the latest version(Which you can get the latest ver or not depends on the store)
<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> <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>
<a href="https://liberapay.com/cutls/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a> <a href="https://liberapay.com/cutls/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a>
@@ -28,7 +31,6 @@ The icon is provided under [Creative Commons BY-NC-SA](https://creativecommons.o
* [SVG 4095x4096](https://d2upiril6ywqp9.cloudfront.net/press/thedesk-fullcolor.svg) * [SVG 4095x4096](https://d2upiril6ywqp9.cloudfront.net/press/thedesk-fullcolor.svg)
* [ico 256x256](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.ico) * [ico 256x256](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.ico)
* [icns old](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.icns) * [icns old](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.icns)
* [Illustrator .ai](https://d2upiril6ywqp9.cloudfront.net/press/thedesk.ai)
The default sounds of notifications is provided [Creative Commons BY](https://creativecommons.org/licenses/by/4.0/) The default sounds of notifications is provided [Creative Commons BY](https://creativecommons.org/licenses/by/4.0/)
@@ -47,19 +49,6 @@ The default sounds of notifications is provided [Creative Commons BY](https://cr
Crowdin project is available! Visit: https://translate.thedesk.top Crowdin project is available! Visit: https://translate.thedesk.top
## Requirement and development
* Electron 4.2 or above(install yourself)
* electron-dl(in package.json)
* Jimp(in package.json)
* font-manager(in package.json)
* Python 2.x(install yourself)
* VisualC++(Windows)(install yourself)
* itunes-nowplaying-mac(for macOS)(in package.json)
* node-notifier(in package.json)
* sumchecker(in package.json)
* Ability to read unformated files!(install yourself)
### Run on developer mode ### Run on developer mode
`npm run dev` on `app` folder. `npm run dev` on `app` folder.
@@ -80,6 +69,10 @@ Fellow coder
## Build ## Build
You have to use either **npm** or **yarn**. Whichever you use, it works well.
### npm
```sh ```sh
git clone https://github.com/cutls/TheDesk git clone https://github.com/cutls/TheDesk
cd TheDesk/app cd TheDesk/app
@@ -88,8 +81,25 @@ npm install --only=dev
npm run construct npm run construct
``` ```
### yarn
```sh
git clone https://github.com/cutls/TheDesk
cd TheDesk/app
# Linux or macOS
yarn install --no-lockfile
# Windows
yarn install
yarn construct
```
run `npm run dev` or `yarn dev` to launch developer version with console(click `view`)
### electron-builder(Recommended) ### electron-builder(Recommended)
Use npm scripts. Use scripts(they can work well with npm, **yarn**).
#### npm
```sh ```sh
# Build for current platform # Build for current platform
@@ -103,6 +113,21 @@ npm run build:win
npm run build:all npm run build:all
``` ```
#### yarn
```sh
# Build for current platform
yarn build
# Select build target
## Windows
yarn build:win
## Windows and Linux (The macOS target should run on macOS. So, this option hasn't include the build for macOS)
yarn build:all
```
Config is all on package.json Config is all on package.json
### electron-packager ### electron-packager
@@ -123,6 +148,17 @@ Linux
macOS macOS
`electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=darwin --arch=all --electron-version=4.0.5 --icon=./app/icon.icns --overwrite` `electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=darwin --arch=all --electron-version=4.0.5 --icon=./app/icon.icns --overwrite`
### PWA support
TheDesk is a wed-based app, so you can run it on a browser. Of course, the main stream is as Electron. Some features won't work as well as Electron.
You can run `npm run build:pwa` to build as PWA, including `manifest.json` and the ServiceWorker.
**You have to rename `node_modules` to `dependencies` to run as a web application. (restricted by Netlify)**
Check the app on Chrome or Firefox: [Here](https://app.thedesk.top) (it follows the `master` branch, so not stable.)
[![Netlify Status](https://api.netlify.com/api/v1/badges/6916503b-2882-43f7-9681-ab814e6d28f9/deploy-status)](https://app.netlify.com/sites/thedesk/deploys)
## Pleroma support ## Pleroma support
Did you find a bug with Pleroma accounts? Did you find a bug with Pleroma accounts?
@@ -132,4 +168,3 @@ Please write issues to improve TheDesk affinity with Pleroma.
## Vulnerabilities when `npm i`??? ## Vulnerabilities when `npm i`???
No, if your npm says materialize-css has vulnerabilities(CVE-2019-11002/3/4), look at [here](https://github.com/Dogfalo/materialize/issues/6286) under discussion. No, if your npm says materialize-css has vulnerabilities(CVE-2019-11002/3/4), look at [here](https://github.com/Dogfalo/materialize/issues/6286) under discussion.

View File

@@ -14,6 +14,8 @@ Download:[TheDesk](https://thedesk.top) [![check](https://status.cutls.com/badge
[Pixiv FANBOX](https://www.pixiv.net/fanbox/creator/28105985) [Pixiv FANBOX](https://www.pixiv.net/fanbox/creator/28105985)
`-store.*`とあるアセットはストアやパッケージマネージャ向けのもので、アップデートの確認をソフト本体で行いません。
![Screenshots1](https://thedesk.top/img/scr1.png) ![Screenshots1](https://thedesk.top/img/scr1.png)
## ライセンス ## ライセンス
@@ -46,19 +48,6 @@ Download:[TheDesk](https://thedesk.top) [![check](https://status.cutls.com/badge
Crowdinから翻訳に参加してみませんか: https://translate.thedesk.top Crowdinから翻訳に参加してみませんか: https://translate.thedesk.top
## 環境
* Electron 4.2以上(自分で入れて)
* electron-dl(in package.json)
* Jimp(in package.json)
* font-manager(in package.json)
* Python 2.x(自分で入れて)
* VisualC++(Windows)(自分で入れて)
* itunes-nowplaying-mac(macOS向け)(in package.json)
* node-notifier(in package.json)
* sumchecker(in package.json)
* Ability to read unformated files!(自分で入れて)
### デベロッパーモード ### デベロッパーモード
`npm run dev``app`フォルダ内で実行 `npm run dev``app`フォルダ内で実行
@@ -79,6 +68,9 @@ Linuxビルダー
## ビルド ## ビルド
npmでもyarnでも好きな方を選んでください。
### npm
```sh ```sh
git clone https://github.com/cutls/TheDesk git clone https://github.com/cutls/TheDesk
@@ -88,8 +80,24 @@ npm install --only=dev
npm run construct npm run construct
``` ```
### yarn
```sh
git clone https://github.com/cutls/TheDesk
cd TheDesk/app
# Linux or macOS
yarn install --no-lockfile
# Windows
yarn install
yarn construct
```
### electron-builder(推奨) ### electron-builder(推奨)
npm scriptsを利用します
scriptsを利用します
#### npm
```sh ```sh
# 実行している環境向けにビルド # 実行している環境向けにビルド
@@ -103,6 +111,20 @@ npm run build:win
npm run build:all npm run build:all
``` ```
#### yarn
```sh
# 実行している環境向けにビルド
yarn build
# ターゲットを指定してビルド
## Windows
yarn build:win
## macOS向けのビルドにはmacOSで実行する必要があるためこのコマンドではビルドされません
yarn build:all
```
ビルド設定はすべてpackage.jsonに記載しています。 ビルド設定はすべてpackage.jsonに記載しています。
### electron-packager(非推奨) ### electron-packager(非推奨)
@@ -125,6 +147,17 @@ Linux
macOS macOS
`electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=darwin --arch=all --electron-version=4.0.5 --icon=./app/icon.icns --overwrite` `electron-packager ./app TheDesk --executable-name="TheDesk" --app-copyright="Copyright (c) TheDesk 2018 Cutls.com 2015 All Right Reserved" --platform=darwin --arch=all --electron-version=4.0.5 --icon=./app/icon.icns --overwrite`
### PWAとして実行
TheDeskはウェブ技術を使用して作られているので、ブラウザで動かすこともできます。もちろん、Electron向けに設計されているので一部機能は動きません。
`npm run build:pwa`でビルドできます。PWAに必要な`manifest.json`やサービスワーカーなども要員されています。
**`node_modules``dependencies`にリネームしないと動きません。(Netlifyの制限です)**
ChromeまたはFirefoxでチェック: [こちら](https://app.thedesk.top) (`master`ブランチに追従しています。不安定です。)
[![Netlify Status](https://api.netlify.com/api/v1/badges/6916503b-2882-43f7-9681-ab814e6d28f9/deploy-status)](https://app.netlify.com/sites/thedesk/deploys)
## Pleromaのサポート ## Pleromaのサポート
Pleromaは、Mastodon APIとの互換性を謳っていますが、実際には様々な差異があり、TheDeskで不具合が発生することがあります。 Pleromaは、Mastodon APIとの互換性を謳っていますが、実際には様々な差異があり、TheDeskで不具合が発生することがあります。

5
app/.eslintignore Normal file
View File

@@ -0,0 +1,5 @@
js/common/blurhash.js
js/common/hammer.min.js
js/common/sha256.js
js/platform/punycode.js
js/platform/tj-deck.js

14
app/.eslintrc.json Normal file
View File

@@ -0,0 +1,14 @@
{
"extends": "eslint:recommended",
"env": {"browser": true},
"rules": {
"no-console": "off",
"semi": ["error", "never"]
},
"globals": {
"$": false,
"ver": true,
"pwa": true,
"lang": true
}
}

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

91
app/css/acct.css Normal file
View File

@@ -0,0 +1,91 @@
.acct {
display: flex;
justify-content: space-around;
}
.card {
width: 400px;
background-color: #494949;
margin: 10px;
}
body,
html {
overflow-y: scroll;
}
#acct-list {
display: flex;
flex-wrap: wrap;
color: white;
align-items: flex-start;
}
#acct-list .btn-flat.white-text {
color: inherit !important;
}
#acct-list .btn-flat.red-text {
background-color: white !important;
}
.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;
}
.hide-second {
display: none;
}
.first .hide-second {
display: inline;
}
#compt {
margin-top: 20px;
margin-bottom: 50px;
border: 1px solid;
border: 1px solid;
padding: 5px;
}
#compt li {
list-style-type: disc;
margin-left: 20px;
}
#domain-list {
width: 500px;
max-width: 100%;
}
i.left {
margin-right: 5px;
}
#domain-list .title {
font-size: 1.3rem;
}

View File

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

View File

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

View File

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

View File

@@ -1,144 +1,22 @@
:root { :root {
--bg: white;
--drag: rgba(255, 255, 255, 0.8);
--color: black;
--beforehover: #757575;
--modal: white;
--subcolor: #e0e0e0;
--box: white;
--sidebar: #eeeeee;
--shared: #cfd8dc;
--notfbox: white;
--emphasized: #81c784;
--his-data: rgba(255, 255, 255, 0.9);
--active: #e6ee9c;
--postbox: white;
--modalfooter: #fafafa;
--accentbtn: #009688;
--selected: #c0c0c0;
--selectedWithShare: #b2babd;
--gray: #757575;
}
#imagemodal {
background: url("../img/pixel.white.svg");
}
.blacktheme {
--bg: #212121; --bg: #212121;
--drag: rgba(0, 0, 0, 0.8); --drag: rgba(0, 0, 0, 0.8);
--color: white; --text: white;
--beforehover: #9e9e9e; --beforehover: #9e9e9e;
--modal: black; --modal: black;
--subcolor: #212121; --thirdColor: #212121;
--box: #424242; --bottom: #424242;
--sidebar: #424242; --accent: #004d40;
--shared: #004d40; --subcolor: #333333;
--notfbox: #333333;
--emphasized: #4e342e; --emphasized: #4e342e;
--his-data: rgba(0, 0, 0, 0.8); --his-data: rgba(0, 0, 0, 0.8);
--active: #757575;
--postbox: #424242; --postbox: #424242;
--modalfooter: #212121; --modalfooter: #212121;
--accentbtn: #3f51b5; --active: #3f51b5;
--selected: #3f3f3f; --selected: #3f3f3f;
--selectedWithShare: #003a30; --selectedWithShare: #003a30;
--gray: #cccccc; --gray: #cccccc;
} }
.blacktheme #imagemodal { #imagemodal {
background: url("../img/pixel.svg"); background: url("../img/pixel.svg");
} }
.indigotheme {
--bg: #031833;
--drag: rgba(0, 0, 0, 0.8);
--color: white;
--beforehover: #9e9e9e;
--modal: #0d1351;
--subcolor: #0d1351;
--shared: #004d40;
--box: #0d1351;
--sidebar: #0d1351;
--notfbox: #0d47a1;
--emphasized: #4e342e;
--his-data: rgba(13, 19, 81, 0.8);
--active: #757575;
--postbox: #1a237e;
--modalfooter: #031833;
--accentbtn: #00acc1;
--selected: #214f8a;
--selectedWithShare: #003a30;
--gray: #cccccc ;
}
.indigotheme #imagemodal {
background: url("../img/pixel.svg");
}
.browntheme {
--bg: #261411;
--drag: rgba(0, 0, 0, 0.8);
--color: white;
--beforehover: #9e9e9e;
--modal: #261411;
--subcolor: #4e342e;
--shared: #004d40;
--box: #4e342e;
--sidebar: #4e342e;
--notfbox: #4e342e;
--emphasized: #0d47a1;
--his-data: rgba(62, 39, 35, 0.8);
--active: #757575;
--postbox: #4e342e;
--modalfooter: #261411;
--accentbtn: #827717;
--selected: #6d352b;
--selectedWithShare: #003a30;
--gray: #cccccc;
}
.browntheme #imagemodal {
background: url("../img/pixel.svg");
}
.greentheme {
--bg: #c8e6c9;
--drag: rgba(255, 255, 255, 0.8);
--color: black;
--beforehover: #757575;
--modal: #81c784;
--subcolor: #a5d6a7;
--box: #81c784;
--sidebar: #c5e1a5;
--shared: #ffcc80;
--notfbox: #a5d6a7;
--emphasized: #9e9d24;
--his-data: rgba(255, 255, 255, 0.9);
--active: #e6ee9c;
--postbox: #a5d6a7;
--modalfooter: #81c784;
--accentbtn: #33691e;
--selected: #78c17a;
--selectedWithShare: #caa266;
--gray: #757575;
}
.greentheme #imagemodal {
background: url("../img/pixel.white.svg");
}
.bluetheme {
--bg: #c9e1ec;
--drag: rgba(255, 255, 255, 0.8);
--color: black;
--beforehover: #757575;
--modal: #b2ebf2;
--subcolor: #90caf9;
--box: #90caf9;
--sidebar: #b6e6f5;
--shared: #e0ffe4;
--notfbox: #90caf9;
--emphasized: #c5e1a5;
--his-data: rgba(255, 255, 255, 0.9);
--active: #b39ddb;
--postbox: #dff1ff;
--modalfooter: #2196f3;
--accentbtn: #2f7bb7;
--selected: #9dcade;
--selectedWithShare: #c1dac4;
--gray: #757575;
}
.bluetheme #imagemodal {
background: url("../img/pixel.white.svg");
}

File diff suppressed because it is too large Load Diff

View File

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

Binary file not shown.

69
app/img/2025.svg Normal file
View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 600 600" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g id="輝き" transform="matrix(0.892356,0,0,0.892356,36.941,-15.9516)">
<g transform="matrix(2.39479,0,0,2.21494,-178.97,-182.183)">
<ellipse cx="123.217" cy="151.049" rx="36.923" ry="35.804" style="fill:rgb(84,82,81);"/>
</g>
<g transform="matrix(1,0,0,1,8.39159,-32.1678)">
<ellipse cx="120.479" cy="305.524" rx="112.5" ry="52" style="fill:rgb(84,82,81);"/>
</g>
<g transform="matrix(0.952046,-0.305955,0.305955,0.952046,-139.881,8.62199)">
<ellipse cx="134.479" cy="430.524" rx="46.5" ry="84" style="fill:rgb(84,82,81);"/>
</g>
<g transform="matrix(1,0,0,1,2.39158,-65.1678)">
<ellipse cx="130.479" cy="561.024" rx="72.5" ry="74.5" style="fill:rgb(84,82,81);"/>
</g>
<g transform="matrix(1,0,0,1,8.39159,-32.1678)">
<ellipse cx="156.979" cy="651.76" rx="68" ry="60.235" style="fill:rgb(84,82,81);"/>
</g>
<g transform="matrix(0.954888,0.296965,-0.296965,0.954888,55.6063,-54.2336)">
<ellipse cx="199.479" cy="158.995" rx="98.5" ry="51" style="fill:rgb(240,132,46);"/>
</g>
<g transform="matrix(0.931851,0.362841,-0.362841,0.931851,63.1962,-89.0819)">
<ellipse cx="344.979" cy="135.857" rx="74" ry="90.137" style="fill:rgb(240,132,46);"/>
</g>
<g transform="matrix(1,0,0,1,-56.6084,-45.1678)">
<ellipse cx="493.479" cy="301.22" rx="126.5" ry="55.5" style="fill:rgb(240,132,46);"/>
</g>
<g transform="matrix(1,0,0,1,-14.6084,-70.1678)">
<ellipse cx="531.479" cy="368.22" rx="58.5" ry="54.5" style="fill:rgb(240,132,46);"/>
</g>
<g transform="matrix(0.973706,-0.227807,0.227807,0.973706,-124.722,44.48)">
<ellipse cx="265.479" cy="614.97" rx="98.5" ry="37.5" style="fill:rgb(54,76,159);"/>
</g>
<g transform="matrix(0.982834,-0.184492,0.184492,0.982834,-148.417,-31.379)">
<ellipse cx="407.479" cy="676.47" rx="71.5" ry="96" style="fill:rgb(54,76,159);"/>
</g>
<g transform="matrix(1,0,0,1,-34.6084,-22.1678)">
<ellipse cx="468.979" cy="511.47" rx="48" ry="31" style="fill:rgb(54,76,159);"/>
</g>
<g transform="matrix(0.880625,0.473815,-0.473815,0.880625,260.236,-235.714)">
<ellipse cx="533.979" cy="472.97" rx="46" ry="99.5" style="fill:rgb(54,76,159);"/>
</g>
<g transform="matrix(1,0,0,1,9.39159,-36.1678)">
<circle cx="69.229" cy="310.72" r="24.25" style="fill:white;"/>
</g>
<g transform="matrix(1,0,0,1,8.39159,-48.1678)">
<circle cx="98.229" cy="417.72" r="25.25" style="fill:white;"/>
</g>
<g transform="matrix(0.76,0,0,0.76,96.9465,101.545)">
<circle cx="375.229" cy="646.72" r="56.25" style="fill:white;"/>
</g>
<g transform="matrix(1,0,0,1,8.39159,-32.1678)">
<circle cx="427.729" cy="287.22" r="32.75" style="fill:white;"/>
</g>
<g id="cat" transform="matrix(0.0249784,0,0,0.0249784,346.146,563.341)">
<path d="M1592.47,2584L2048.94,2584C2048.94,2519.11 2044.31,2506.24 1936.84,2506.24C1954.01,2454.74 2023.79,2330.13 2062.57,2330.13C2096.88,2330.13 2137.81,2332.02 2137.81,2410.3C2137.81,2499.17 2287.37,2642.46 2323.63,2584C2377.67,2496.88 2230.72,2523.45 2230.72,2313.35C2230.72,2025.92 2398.46,2066.84 2398.46,1905.36C2398.46,1824.57 2376.14,1813.66 2376.14,1755.9C2376.14,1679.56 2443.39,1683.99 2430.31,1620.7C2421.27,1576.98 2414.2,1541.92 2408.93,1489.05C2405.19,1451.54 2404,1411.55 2365.03,1413.16C2319.25,1415.05 2301.88,1495.63 2230.72,1501.41C2159.7,1507.18 2099.15,1440.95 2071.66,1450.41C2044.41,1459.79 2052.98,1533.73 2069.14,1586.24C2094.54,1668.78 2149.93,1776.1 2048.94,1792.26C1947.95,1808.42 1774.25,1824.58 1649.02,1990.2C1523.79,2155.82 1528.42,2350.19 1479.36,2410.31C1314.72,2612.08 1146,2529.23 1146,2697.11C1146,2772.27 1273.35,2826.38 1293.55,2802.14C1313.75,2777.9 1121.93,2705.68 1336.56,2620.36C1519.91,2547.46 1536.28,2532.58 1592.47,2584Z" style="fill:rgb(5,127,254);"/>
</g>
<g id="cat1" serif:id="cat" transform="matrix(-0.0249784,0,0,0.0249784,147.519,318.341)">
<path d="M1592.47,2584L2048.94,2584C2048.94,2519.11 2044.31,2506.24 1936.84,2506.24C1954.01,2454.74 2023.79,2330.13 2062.57,2330.13C2096.88,2330.13 2137.81,2332.02 2137.81,2410.3C2137.81,2499.17 2287.37,2642.46 2323.63,2584C2377.67,2496.88 2230.72,2523.45 2230.72,2313.35C2230.72,2025.92 2398.46,2066.84 2398.46,1905.36C2398.46,1824.57 2376.14,1813.66 2376.14,1755.9C2376.14,1679.56 2443.39,1683.99 2430.31,1620.7C2421.27,1576.98 2414.2,1541.92 2408.93,1489.05C2405.19,1451.54 2404,1411.55 2365.03,1413.16C2319.25,1415.05 2301.88,1495.63 2230.72,1501.41C2159.7,1507.18 2099.15,1440.95 2071.66,1450.41C2044.41,1459.79 2052.98,1533.73 2069.14,1586.24C2094.54,1668.78 2149.93,1776.1 2048.94,1792.26C1947.95,1808.42 1774.25,1824.58 1649.02,1990.2C1523.79,2155.82 1528.42,2350.19 1479.36,2410.31C1314.72,2612.08 1146,2529.23 1146,2697.11C1146,2772.27 1273.35,2826.38 1293.55,2802.14C1313.75,2777.9 1121.93,2705.68 1336.56,2620.36C1519.91,2547.46 1536.28,2532.58 1592.47,2584Z" style="fill:rgb(5,127,254);"/>
</g>
<g id="cat2" serif:id="cat" transform="matrix(-0.0249784,0,0,0.0249784,120.519,222.341)">
<path d="M1592.47,2584L2048.94,2584C2048.94,2519.11 2044.31,2506.24 1936.84,2506.24C1954.01,2454.74 2023.79,2330.13 2062.57,2330.13C2096.88,2330.13 2137.81,2332.02 2137.81,2410.3C2137.81,2499.17 2287.37,2642.46 2323.63,2584C2377.67,2496.88 2230.72,2523.45 2230.72,2313.35C2230.72,2025.92 2398.46,2066.84 2398.46,1905.36C2398.46,1824.57 2376.14,1813.66 2376.14,1755.9C2376.14,1679.56 2443.39,1683.99 2430.31,1620.7C2421.27,1576.98 2414.2,1541.92 2408.93,1489.05C2405.19,1451.54 2404,1411.55 2365.03,1413.16C2319.25,1415.05 2301.88,1495.63 2230.72,1501.41C2159.7,1507.18 2099.15,1440.95 2071.66,1450.41C2044.41,1459.79 2052.98,1533.73 2069.14,1586.24C2094.54,1668.78 2149.93,1776.1 2048.94,1792.26C1947.95,1808.42 1774.25,1824.58 1649.02,1990.2C1523.79,2155.82 1528.42,2350.19 1479.36,2410.31C1314.72,2612.08 1146,2529.23 1146,2697.11C1146,2772.27 1273.35,2826.38 1293.55,2802.14C1313.75,2777.9 1121.93,2705.68 1336.56,2620.36C1519.91,2547.46 1536.28,2532.58 1592.47,2584Z" style="fill:rgb(5,127,254);"/>
</g>
<g id="cat3" serif:id="cat" transform="matrix(0.0249784,0,0,0.0249784,390.146,196.341)">
<path d="M1592.47,2584L2048.94,2584C2048.94,2519.11 2044.31,2506.24 1936.84,2506.24C1954.01,2454.74 2023.79,2330.13 2062.57,2330.13C2096.88,2330.13 2137.81,2332.02 2137.81,2410.3C2137.81,2499.17 2287.37,2642.46 2323.63,2584C2377.67,2496.88 2230.72,2523.45 2230.72,2313.35C2230.72,2025.92 2398.46,2066.84 2398.46,1905.36C2398.46,1824.57 2376.14,1813.66 2376.14,1755.9C2376.14,1679.56 2443.39,1683.99 2430.31,1620.7C2421.27,1576.98 2414.2,1541.92 2408.93,1489.05C2405.19,1451.54 2404,1411.55 2365.03,1413.16C2319.25,1415.05 2301.88,1495.63 2230.72,1501.41C2159.7,1507.18 2099.15,1440.95 2071.66,1450.41C2044.41,1459.79 2052.98,1533.73 2069.14,1586.24C2094.54,1668.78 2149.93,1776.1 2048.94,1792.26C1947.95,1808.42 1774.25,1824.58 1649.02,1990.2C1523.79,2155.82 1528.42,2350.19 1479.36,2410.31C1314.72,2612.08 1146,2529.23 1146,2697.11C1146,2772.27 1273.35,2826.38 1293.55,2802.14C1313.75,2777.9 1121.93,2705.68 1336.56,2620.36C1519.91,2547.46 1536.28,2532.58 1592.47,2584Z" style="fill:rgb(5,127,254);"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

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

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

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

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

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

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

2
app/img/picture.svg Normal file
View File

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

After

Width:  |  Height:  |  Size: 259 B

View File

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

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

7
app/index.html Normal file
View File

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

View File

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

View File

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

View File

@@ -10,7 +10,7 @@ $(document).ready(function () {
belowOrigin: false, // Displays dropdown below the button belowOrigin: false, // Displays dropdown below the button
alignment: 'left', // Displays dropdown with edge aligned to the left of button alignment: 'left', // Displays dropdown with edge aligned to the left of button
stopPropagation: false stopPropagation: false
}); })
$('.dropdown-trigger').dropdown({ $('.dropdown-trigger').dropdown({
inDuration: 300, inDuration: 300,
outDuration: 225, outDuration: 225,
@@ -21,6 +21,9 @@ $(document).ready(function () {
alignment: 'left', // Displays dropdown with edge aligned to the left of button alignment: 'left', // Displays dropdown with edge aligned to the left of button
stopPropagation: false // Stops event propagation stopPropagation: false // Stops event propagation
} }
); )
$('.collapsible').collapsible(); $('.collapsible').collapsible()
}); $('#videomodal').modal({
onCloseEnd: stopVideo
})
})

View File

@@ -17,26 +17,26 @@
(function (factory) { (function (factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module. // AMD. Register as an anonymous module.
define(['jquery'], factory); define(['jquery'], factory)
} else if (typeof module === 'object' && typeof module.exports === 'object') { } else if (typeof module === 'object' && typeof module.exports === 'object') {
factory(require('jquery')); factory(require('jquery'))
} else { } else {
// Browser globals // Browser globals
factory(jQuery); factory(jQuery)
} }
}(function ($) { }(function ($) {
$.timeago = function (timestamp) { $.timeago = function (timestamp) {
if (timestamp instanceof Date) { if (timestamp instanceof Date) {
return inWords(timestamp); return inWords(timestamp)
} else if (typeof timestamp === "string") { } else if (typeof timestamp === "string") {
return inWords($.timeago.parse(timestamp)); return inWords($.timeago.parse(timestamp))
} else if (typeof timestamp === "number") { } else if (typeof timestamp === "number") {
return inWords(new Date(timestamp)); return inWords(new Date(timestamp))
} else { } else {
return inWords($.timeago.datetime(timestamp)); return inWords($.timeago.datetime(timestamp))
} }
}; }
var $t = $.timeago; var $t = $.timeago
$.extend($.timeago, { $.extend($.timeago, {
settings: { settings: {
refreshMillis: 60000, refreshMillis: 60000,
@@ -69,33 +69,33 @@
inWords: function (distanceMillis) { inWords: function (distanceMillis) {
if (!this.settings.allowPast && !this.settings.allowFuture) { if (!this.settings.allowPast && !this.settings.allowFuture) {
throw 'timeago allowPast and allowFuture settings can not both be set to false.'; throw 'timeago allowPast and allowFuture settings can not both be set to false.'
} }
var $l = this.settings.strings; var $l = this.settings.strings
var prefix = $l.prefixAgo; var prefix = $l.prefixAgo
var suffix = $l.suffixAgo; var suffix = $l.suffixAgo
if (this.settings.allowFuture) { if (this.settings.allowFuture) {
if (distanceMillis < 0) { if (distanceMillis < 0) {
prefix = $l.prefixFromNow; prefix = $l.prefixFromNow
suffix = $l.suffixFromNow; suffix = $l.suffixFromNow
} }
} }
if (!this.settings.allowPast && distanceMillis >= 0) { if (!this.settings.allowPast && distanceMillis >= 0) {
return this.settings.strings.inPast; return this.settings.strings.inPast
} }
var seconds = Math.abs(distanceMillis) / 1000; var seconds = Math.abs(distanceMillis) / 1000
var minutes = seconds / 60; var minutes = seconds / 60
var hours = minutes / 60; var hours = minutes / 60
var days = hours / 24; var days = hours / 24
var years = days / 365; var years = days / 365
function substitute(stringOrFunction, number) { function substitute(stringOrFunction, number) {
var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction; var string = $.isFunction(stringOrFunction) ? stringOrFunction(number, distanceMillis) : stringOrFunction
var value = ($l.numbers && $l.numbers[number]) || number; var value = ($l.numbers && $l.numbers[number]) || number
return string.replace(/%d/i, value); return string.replace(/%d/i, value)
} }
var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) || var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
@@ -108,124 +108,124 @@
days < 45 && substitute($l.month, 1) || days < 45 && substitute($l.month, 1) ||
days < 365 && substitute($l.months, Math.round(days / 30)) || days < 365 && substitute($l.months, Math.round(days / 30)) ||
years < 1.5 && substitute($l.year, 1) || years < 1.5 && substitute($l.year, 1) ||
substitute($l.years, Math.round(years)); substitute($l.years, Math.round(years))
var separator = $l.wordSeparator || ""; var separator = $l.wordSeparator || ""
if ($l.wordSeparator === undefined) { separator = " "; } if ($l.wordSeparator === undefined) { separator = " " }
return $.trim([prefix, words, suffix].join(separator)); return $.trim([prefix, words, suffix].join(separator))
}, },
parse: function (iso8601) { parse: function (iso8601) {
var s = $.trim(iso8601); var s = $.trim(iso8601)
s = s.replace(/\.\d+/, ""); // remove milliseconds s = s.replace(/\.\d+/, "") // remove milliseconds
s = s.replace(/-/, "/").replace(/-/, "/"); s = s.replace(/-/, "/").replace(/-/, "/")
s = s.replace(/T/, " ").replace(/Z/, " UTC"); s = s.replace(/T/, " ").replace(/Z/, " UTC")
s = s.replace(/([\+\-]\d\d)\:?(\d\d)/, " $1$2"); // -04:00 -> -0400 s = s.replace(/([\+\-]\d\d)\:?(\d\d)/, " $1$2") // -04:00 -> -0400
s = s.replace(/([\+\-]\d\d)$/, " $100"); // +09 -> +0900 s = s.replace(/([\+\-]\d\d)$/, " $100") // +09 -> +0900
return new Date(s); return new Date(s)
}, },
datetime: function (elem) { datetime: function (elem) {
var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") : $(elem).attr("title"); var iso8601 = $t.isTime(elem) ? $(elem).attr("datetime") : $(elem).attr("title")
return $t.parse(iso8601); return $t.parse(iso8601)
}, },
isTime: function (elem) { isTime: function (elem) {
// jQuery's `is()` doesn't play well with HTML5 in IE // jQuery's `is()` doesn't play well with HTML5 in IE
return $(elem).get(0).tagName.toLowerCase() === "time"; // $(elem).is("time"); return $(elem).get(0).tagName.toLowerCase() === "time" // $(elem).is("time");
} }
}); })
// functions that can be called via $(el).timeago('action') // functions that can be called via $(el).timeago('action')
// init is default when no action is given // init is default when no action is given
// functions are called with context of a single element // functions are called with context of a single element
var functions = { var functions = {
init: function () { init: function () {
functions.dispose.call(this); functions.dispose.call(this)
var refresh_el = $.proxy(refresh, this); var refresh_el = $.proxy(refresh, this)
refresh_el(); refresh_el()
var $s = $t.settings; var $s = $t.settings
if ($s.refreshMillis > 0) { if ($s.refreshMillis > 0) {
this._timeagoInterval = setInterval(refresh_el, $s.refreshMillis); this._timeagoInterval = setInterval(refresh_el, $s.refreshMillis)
} }
}, },
update: function (timestamp) { update: function (timestamp) {
var date = (timestamp instanceof Date) ? timestamp : $t.parse(timestamp); var date = (timestamp instanceof Date) ? timestamp : $t.parse(timestamp)
$(this).data('timeago', { datetime: date }); $(this).data('timeago', { datetime: date })
if ($t.settings.localeTitle) { if ($t.settings.localeTitle) {
$(this).attr("title", date.toLocaleString()); $(this).attr("title", date.toLocaleString())
} }
refresh.apply(this); refresh.apply(this)
}, },
updateFromDOM: function () { updateFromDOM: function () {
$(this).data('timeago', { datetime: $t.parse($t.isTime(this) ? $(this).attr("datetime") : $(this).attr("title")) }); $(this).data('timeago', { datetime: $t.parse($t.isTime(this) ? $(this).attr("datetime") : $(this).attr("title")) })
refresh.apply(this); refresh.apply(this)
}, },
dispose: function () { dispose: function () {
if (this._timeagoInterval) { if (this._timeagoInterval) {
window.clearInterval(this._timeagoInterval); window.clearInterval(this._timeagoInterval)
this._timeagoInterval = null; this._timeagoInterval = null
} }
} }
}; }
$.fn.timeago = function (action, options) { $.fn.timeago = function (action, options) {
var fn = action ? functions[action] : functions.init; var fn = action ? functions[action] : functions.init
if (!fn) { if (!fn) {
throw new Error("Unknown function name '" + action + "' for timeago"); throw new Error("Unknown function name '" + action + "' for timeago")
} }
// each over objects here and call the requested function // each over objects here and call the requested function
this.each(function () { this.each(function () {
fn.call(this, options); fn.call(this, options)
}); })
return this; return this
}; }
function refresh() { function refresh() {
var $s = $t.settings; var $s = $t.settings
//check if it's still visible //check if it's still visible
if ($s.autoDispose && !$.contains(document.documentElement, this)) { if ($s.autoDispose && !$.contains(document.documentElement, this)) {
//stop if it has been removed //stop if it has been removed
$(this).timeago("dispose"); $(this).timeago("dispose")
return this; return this
} }
var data = prepareData(this); var data = prepareData(this)
if (!isNaN(data.datetime)) { if (!isNaN(data.datetime)) {
if ($s.cutoff === 0 || Math.abs(distance(data.datetime)) < $s.cutoff) { if ($s.cutoff === 0 || Math.abs(distance(data.datetime)) < $s.cutoff) {
$(this).text(inWords(data.datetime)); $(this).text(inWords(data.datetime))
} else { } else {
if ($(this).attr('title').length > 0) { if ($(this).attr('title').length > 0) {
$(this).text($(this).attr('title')); $(this).text($(this).attr('title'))
} }
} }
} }
return this; return this
} }
function prepareData(element) { function prepareData(element) {
element = $(element); element = $(element)
if (!element.data("timeago")) { if (!element.data("timeago")) {
element.data("timeago", { datetime: $t.datetime(element) }); element.data("timeago", { datetime: $t.datetime(element) })
var text = $.trim(element.text()); var text = $.trim(element.text())
if ($t.settings.localeTitle) { if ($t.settings.localeTitle) {
element.attr("title", element.data('timeago').datetime.toLocaleString()); element.attr("title", element.data('timeago').datetime.toLocaleString())
} else if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) { } else if (text.length > 0 && !($t.isTime(element) && element.attr("title"))) {
element.attr("title", text); element.attr("title", text)
} }
} }
return element.data("timeago"); return element.data("timeago")
} }
function inWords(date) { function inWords(date) {
return $t.inWords(distance(date)); return $t.inWords(distance(date))
} }
function distance(date) { function distance(date) {
return (new Date().getTime() - date.getTime()); return (new Date().getTime() - date.getTime())
} }
// fix for IE6 suckage // fix for IE6 suckage
document.createElement("abbr"); document.createElement("abbr")
document.createElement("time"); document.createElement("time")
})); }))

View File

@@ -1,320 +1,335 @@
//バージョンチェッカー //バージョンチェッカー
function verck(ver) { function verck(ver, jp) {
localStorage.setItem("ver", ver); if (store) return false
console.log("%c Welcome😊", "color: red;font-size:200%;") console.log('%c Welcome😊 ' + ver, 'color: red;font-size:200%;')
var date = new Date(); $('body').addClass(localStorage.getItem('platform'))
var show = false var date = new Date()
if (localStorage.getItem("ver") != ver && localStorage.getItem("winstore")) { var showVer = false
//ちょっと削除とリンク解析の都合上アレ(s) //Spotify
//対象外のアプデ:storageが20の最初まで"Usamin (18.6.5)" if (localStorage.getItem('spotify')) {
if (!localStorage.getItem("usamin_18_6_5_flag")) { localStorage.removeItem('spotify')
localStorage.setItem("usamin_18_6_5_flag", true) localStorage.removeItem('spotify-refresh')
var multi = localStorage.getItem("column"); var spDc = 'Spotify NowPlaying sysytem was changed, please re-login to Spotify'
var obj = JSON.parse(multi); if(lang.language == 'ja') {
for (var i = 0; i < obj.length; i++) { spDc = 'Spotify NowPlayingの機能が変更されたため、もう一度ログインしてください'
localStorage.removeItem("card_" + i);
}
} }
//ちょっと削除とリンク解析の都合上アレ(e) Swal.fire({
show = true type: 'info',
console.log("%c Thank you for your update🎉", "color: red;font-size:200%;"); title: spDc,
$(document).ready(function () { })
if (localStorage.getItem("winstore")) {
$('#releasenote').modal('open');
}
verp = ver.replace('(', '');
verp = verp.replace('.', '-');
verp = verp.replace('.', '-');
verp = verp.replace('[', '-');
verp = verp.replace(']', '');
verp = verp.replace(')', '');
verp = verp.replace(' ', '_');
console.log("%c " + verp, "color: red;font-size:200%;");
if (lang.language == "ja") {
$("#release-" + verp).show();
} else {
$("#release-en").show();
}
});
} }
if (!show) { //Spotify(e)
console.log(show) if (localStorage.getItem('ver') != ver && localStorage.getItem('winstore')) {
if (date.getMonth() + 1 >= localStorage.getItem("showSupportMe") || !localStorage.getItem("showSupportMe")) { showVer = true
console.log('%c Thank you for your update🎉', 'color: red;font-size:200%;')
$(document).ready(function() {
if (localStorage.getItem('winstore') && !pwa) {
$('#releasenote').modal('open')
}
verp = ver.replace('(', '')
verp = verp.replace('.', '-')
verp = verp.replace('.', '-')
verp = verp.replace('[', '-')
verp = verp.replace(']', '')
verp = verp.replace(')', '')
verp = verp.replace(' ', '_')
console.log('%c ' + verp, 'color: red;font-size:200%;')
if (lang.language == 'ja') {
$('#release-' + verp).show()
} else {
$('#release-en').show()
}
})
}
localStorage.setItem('ver', ver)
if (!showVer) {
console.log(showVer)
if (
date.getFullYear() * 100 + date.getMonth() + 1 >= localStorage.getItem('showSupportMe') ||
!localStorage.getItem('showSupportMe')
) {
if (date.getMonth() == 11) { if (date.getMonth() == 11) {
var nextmonth = 1 var yrs = date.getFullYear() + 1
var nextmonth = yrs * 100 + 1
} else { } else {
var nextmonth = date.getMonth() + 2 var yrs = date.getFullYear()
var nextmonth = yrs * 100 + date.getMonth() + 2
} }
if (lang.language != "ja") { if (lang.language != 'ja') {
$("#support-btm-ja").addClass("hide"); $('#support-btm-ja').addClass('hide')
$("#support-btm-en").removeClass("hide"); $('#support-btm-en').removeClass('hide')
} }
localStorage.setItem("showSupportMe", nextmonth) localStorage.setItem('showSupportMe', nextmonth)
$("#support-btm").removeClass("hide") $('#support-btm').removeClass('hide')
$("#support-btm").animate({ $('#support-btm').animate(
'bottom': '0' {
}, { bottom: '0'
'duration': 300 },
}); {
duration: 300
}
)
} }
} }
var platform = localStorage.getItem("platform"); var platform = localStorage.getItem('platform')
console.log("Your platform:" + platform) console.log('Your platform:' + platform)
if (!localStorage.getItem("winstore")) { if (!localStorage.getItem('winstore') && !pwa) {
$("#start").css('display', 'flex'); $('#start').css('display', 'flex')
} }
if (localStorage.getItem("winstore") == "brewcask" || localStorage.getItem("winstore") == "snapcraft" || localStorage.getItem("winstore") == "winstore") { if (
var winstore = true; localStorage.getItem('winstore') == 'brewcask' ||
localStorage.getItem('winstore') == 'snapcraft' ||
localStorage.getItem('winstore') == 'winstore'
) {
var winstore = true
} else { } else {
var winstore = false; var winstore = false
} }
var l = 5; var l = 5
// 生成する文字列に含める文字セット // 生成する文字列に含める文字セット
var c = "abcdefghijklmnopqrstuvwxyz0123456789"; var c = 'abcdefghijklmnopqrstuvwxyz0123456789'
var cl = c.length; var cl = c.length
var r = ""; var r = ''
for (var i = 0; i < l; i++) { for (var i = 0; i < l; i++) {
r += c[Math.floor(Math.random() * cl)]; r += c[Math.floor(Math.random() * cl)]
} }
var start = "https://thedesk.top/ver.json"; var start = 'https://thedesk.top/ver.json'
fetch(start, { fetch(start, {
method: 'GET' method: 'GET'
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (mess) { })
console.table(mess);
if (mess) {
var platform = localStorage.getItem("platform");
if (platform == "darwin") {
var newest = mess.desk_mac;
} else {
var newest = mess.desk;
} }
if (newest == ver) { return response.json()
todo(lang.lang_version_usever.replace("{{ver}}", mess.desk)); })
//betaかWinstoreならアプデチェックしない .catch(function(error) {
} else if (ver.indexOf("beta") != -1 || winstore) { todo(error)
setLog(start, 'JSON', error)
} else { setLog(start, 'JSON', error)
localStorage.removeItem("instance") console.error(error)
if (localStorage.getItem("new-ver-skip")) { })
if (localStorage.getItem("next-ver") != newest) { .then(function(mess) {
postMessage(["sendSinmpleIpc", "update"], "*") console.table(mess)
} else { if (mess) {
console.warn(lang.lang_version_skipver); //askjp_jp_ua: 2019年10月24日、mstdn.jpによるユーザーエージェントアクセス制限
todo(lang.lang_version_skipver); if (jp && mess.jp_ua && !localStorage.getItem('askjp_jp_ua')) {
} localStorage.setItem('askjp_jp_ua', true)
} else { $('#askjp_jp_ua').removeClass('hide')
postMessage(["sendSinmpleIpc", "update"], "*")
} }
} var platform = localStorage.getItem('platform')
} if (platform == 'darwin') {
}); var newest = mess.desk_mac
if (!localStorage.getItem("last-notice-id")) {
localStorage.setItem("last-notice-id", 0)
}
var start = "https://thedesk.top/notice?since_id=" + localStorage.getItem("last-notice-id");
fetch(start, {
method: 'GET'
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (mess) {
if (mess.length < 1) {
return false;
} else {
var last = localStorage.getItem("last-notice-id")
localStorage.setItem("last-notice-id", mess[0].ID)
for (i = 0; i < mess.length; i++) {
var obj = mess[i];
if (obj.ID * 1 <= last) {
break;
} else { } else {
if (obj.type == "textv2") { var newest = mess.desk
if (~obj.languages.indexOf(lang.language)) {
var show = true;
if (obj.toot != "") {
var toot = '<button class="btn-flat toast-action" onclick="detEx(\'' + obj.toot + '\',\'main\')">Show</button>';
} else {
var toot = "";
}
if (obj.ver != "") {
if (obj.ver == ver) {
show = true;
} else {
show = false;
}
}
if (obj.domain != "") {
var multi = localStorage.getItem("multi");
if (multi) {
show = false;
var accts = JSON.parse(multi);
Object.keys(accts).forEach(function (key) {
var acct = accts[key];
if (acct.domain == obj.domain) {
show = true;
}
});
}
}
if (show) {
M.toast({ html: escapeHTML(obj.text) + toot + '<span class="sml grey-text">(スライドして消去)</span>', displayLength: 86400 })
}
}
}
} }
if (newest == ver) {
} todo(lang.lang_version_usever.replace('{{ver}}', mess.desk))
} //betaかWinstoreならアプデチェックしない
}); } else if (ver.indexOf('beta') != -1 || winstore) {
} } else {
var infostreaming = false; localStorage.removeItem('instance')
function infowebsocket() { if (localStorage.getItem('new-ver-skip')) {
infows = new WebSocket("wss://thedesk.top/ws/"); if (localStorage.getItem('next-ver') != newest) {
infows.onopen = function (mess) { postMessage(['sendSinmpleIpc', 'update'], '*')
console.log([tlid, ":Connect Streaming Info:", mess]);
infostreaming = true;
}
infows.onmessage = function (mess) {
console.log([tlid, ":Receive Streaming:", JSON.parse(mess.data)]);
var obj = JSON.parse(mess.data);
if (obj.type != "counter") {
if (obj.type == "textv2") {
if (~obj.languages.indexOf(lang.language)) {
localStorage.setItem("last-notice-id", obj.id)
var show = true;
if (obj.toot != "") {
var toot = '<button class="btn-flat toast-action" onclick="detEx(\'' + obj.toot + '\',\'main\')">Show</button>';
} else {
var toot = "";
}
if (obj.ver != "") {
if (obj.ver == ver) {
show = true;
} else { } else {
show = false; console.warn(lang.lang_version_skipver)
todo(lang.lang_version_skipver)
} }
} else {
postMessage(['sendSinmpleIpc', 'update'], '*')
} }
if (obj.domain != "") { }
var multi = localStorage.getItem("multi"); }
if (multi) { })
show = false; if (!localStorage.getItem('last-notice-id')) {
var accts = JSON.parse(multi); localStorage.setItem('last-notice-id', 0)
Object.keys(accts).forEach(function (key) { }
var acct = accts[key]; var start = 'https://thedesk.top/notice/index.php?since_id=' + localStorage.getItem('last-notice-id')
if (acct.domain == obj.domain) { fetch(start, {
show = true; method: 'GET',
cors: true
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(mess) {
if (mess.length < 1) {
return false
} else {
var last = localStorage.getItem('last-notice-id')
localStorage.setItem('last-notice-id', mess[0].ID)
for (i = 0; i < mess.length; i++) {
var obj = mess[i]
if (obj.ID * 1 <= last) {
break
} else {
if (obj.type == 'textv2') {
if (~obj.languages.indexOf(lang.language)) {
var showVer = true
if (obj.toot != '') {
var toot =
'<button class="btn-flat toast-action" onclick="detEx(\'' +
obj.toot +
"','main')\">Show</button>"
} else {
var toot = ''
} }
}); if (obj.ver != '') {
if (obj.ver == ver) {
showVer = true
} else {
showVer = false
}
}
if (obj.domain != '') {
var multi = localStorage.getItem('multi')
if (multi) {
showVer = false
var accts = JSON.parse(multi)
Object.keys(accts).forEach(function(key) {
var acct = accts[key]
if (acct.domain == obj.domain) {
showVer = true
}
})
}
}
if (showVer) {
M.toast({
html:
escapeHTML(obj.text) +
toot +
'<span class="sml grey-text">(スライドして消去)</span>',
displayLength: 86400
})
}
}
} }
} }
if (show) { }
}
})
}
var infostreaming = false
function infowebsocket() {
infows = new WebSocket('wss://thedesk.top/ws/')
infows.onopen = function(mess) {
console.log([tlid, ':Connect Streaming Info:', mess])
infostreaming = true
}
infows.onmessage = function(mess) {
console.log([tlid, ':Receive Streaming:', JSON.parse(mess.data)])
var obj = JSON.parse(mess.data)
if (obj.type != 'counter') {
if (obj.type == 'textv2') {
if (~obj.languages.indexOf(lang.language)) {
localStorage.setItem('last-notice-id', obj.id)
var showVer = true
if (obj.toot != '') {
var toot =
'<button class="btn-flat toast-action" onclick="detEx(\'' +
obj.toot +
"','main')\">Show</button>"
} else {
var toot = ''
}
if (obj.ver != '') {
if (obj.ver == ver) {
showVer = true
} else {
showVer = false
}
}
if (obj.domain != '') {
var multi = localStorage.getItem('multi')
if (multi) {
showVer = false
var accts = JSON.parse(multi)
Object.keys(accts).forEach(function(key) {
var acct = accts[key]
if (acct.domain == obj.domain) {
showVer = true
}
})
}
}
if (showVer) {
console.log(obj.text) console.log(obj.text)
console.log(escapeHTML(obj.text)) console.log(escapeHTML(obj.text))
M.toast({ html: escapeHTML(obj.text) + toot + '<span class="sml grey-text">(スライドして消去)</span>', displayLength: 86400 }) M.toast({
html:
escapeHTML(obj.text) +
toot +
'<span class="sml grey-text">(スライドして消去)</span>',
displayLength: 86400
})
} }
} }
} }
} else { } else {
$("#persons").text(obj.text); $('#persons').text(obj.text)
} }
} }
infows.onerror = function (error) { infows.onerror = function(error) {
infostreaming = false; infostreaming = false
console.error("Error closing:info"); console.error('Error closing:info')
console.error(error); console.error(error)
return false; return false
};
infows.onclose = function () {
infostreaming = false;
console.error("Closing:info");
};
}
setInterval(function () {
if (!infostreaming) {
console.log("try to connect to base-streaming")
infowebsocket();
} }
}, 10000); infows.onclose = function() {
infostreaming = false
console.error('Closing:info')
}
}
setInterval(function() {
if (!infostreaming) {
console.log('try to connect to base-streaming')
infowebsocket()
}
}, 10000)
function openRN() { function openRN() {
$('#releasenote').modal('open'); $('#releasenote').modal('open')
if (lang.language == "ja") { if (lang.language == 'ja') {
verp = ver.replace('(', ''); verp = ver.replace('(', '')
verp = verp.replace('.', '-'); verp = verp.replace('.', '-')
verp = verp.replace('.', '-'); verp = verp.replace('.', '-')
verp = verp.replace('[', '-'); verp = verp.replace('[', '-')
verp = verp.replace(']', ''); verp = verp.replace(']', '')
verp = verp.replace(')', ''); verp = verp.replace(')', '')
verp = verp.replace(' ', '_'); verp = verp.replace(' ', '_')
$("#release-" + verp).show(); $('#release-' + verp).show()
} else { } else {
$("#release-en").show(); $('#release-en').show()
} }
} }
function closeSupport() { function closeSupport() {
$("#support-btm").animate({ $('#support-btm').animate(
'bottom': '-300px' {
}, { bottom: '-300px'
'duration': 300, },
'complete': function () { {
$("#support-btm").addClass("hide") duration: 300,
complete: function() {
$('#support-btm').addClass('hide')
} }
});
}
function storeDialog(platform, ver) {
if (platform == "win32") {
var mes = lang.lang_version_platform;
} else if (platform == "linux") {
var mes = lang.lang_version_platform_linux;
} else if (platform == "darwin") {
var mes = lang.lang_version_platform_mac;
}
Swal.fire({
title: "Select your platform",
text: mes,
type: 'info',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#3085d6',
confirmButtonText: lang.lang_no,
cancelButtonText: lang.lang_yesno
}).then((result) => {
//逆にしてる
if (!result.value) {
localStorage.setItem("winstore", "winstore")
} else {
localStorage.setItem("winstore", "localinstall")
} }
localStorage.setItem("ver", ver); )
show = true
console.log("%c Thank you for your update🎉", "color: red;font-size:200%;");
$(document).ready(function () {
$('#releasenote').modal('open');
verp = ver.replace('(', '');
verp = verp.replace('.', '-');
verp = verp.replace('.', '-');
verp = verp.replace('[', '-');
verp = verp.replace(']', '');
verp = verp.replace(')', '');
verp = verp.replace(' ', '_');
console.log("%c " + verp, "color: red;font-size:200%;");
if (lang.language == "ja") {
$("#release-" + verp).show();
} else {
$("#release-en").show();
}
});
})
} }
function closeStart() { function closeStart() {
$("#start").css('display', 'none'); $('#start').css('display', 'none')
var platform = localStorage.getItem("platform"); var platform = localStorage.getItem('platform')
var ver = localStorage.getItem("ver"); var ver = localStorage.getItem('ver')
storeDialog(platform, ver) }
}

View File

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

View File

@@ -92,7 +92,7 @@ var activity=[
{shortcode:"man-rowing-boat",css:"95.8333% 14.5833%"}, {shortcode:"man-rowing-boat",css:"95.8333% 14.5833%"},
{shortcode:"man-biking",css:"95.8333% 39.5833%"}, {shortcode:"man-biking",css:"95.8333% 39.5833%"},
{shortcode:"man-mountain-biking",css:"95.8333% 64.5833%"} {shortcode:"man-mountain-biking",css:"95.8333% 64.5833%"}
]; ]
var flag=[ var flag=[
{shortcode:"checkered_flag",css:"16.6667% 58.3333%"}, {shortcode:"checkered_flag",css:"16.6667% 58.3333%"},
{shortcode:"crossed_flags",css:"14.5833% 60.4167%"}, {shortcode:"crossed_flags",css:"14.5833% 60.4167%"},
@@ -356,7 +356,7 @@ var flag=[
{shortcode:"rainbow-flag",css:"83.3333% 100%"}, {shortcode:"rainbow-flag",css:"83.3333% 100%"},
{shortcode:"triangular_flag_on_post",css:"54.1667% 6.25%"}, {shortcode:"triangular_flag_on_post",css:"54.1667% 6.25%"},
{shortcode:"waving_black_flag",css:"20.8333% 29.1667%"}, {shortcode:"waving_black_flag",css:"20.8333% 29.1667%"},
{shortcode:"waving_white_flag",css:"20.8333% 27.0833%"}]; {shortcode:"waving_white_flag",css:"20.8333% 27.0833%"}]
var food=[ var food=[
{shortcode:"green_apple",css:"12.5% 25%"}, {shortcode:"green_apple",css:"12.5% 25%"},
{shortcode:"apple",css:"12.5% 22.9167%"}, {shortcode:"apple",css:"12.5% 22.9167%"},
@@ -444,7 +444,7 @@ var food=[
{shortcode:"spoon",css:"62.5% 14.5833%"}, {shortcode:"spoon",css:"62.5% 14.5833%"},
{shortcode:"fork_and_knife",css:"14.5833% 0%"}, {shortcode:"fork_and_knife",css:"14.5833% 0%"},
{shortcode:"knife_fork_plate",css:"14.5833% 18.75%"} {shortcode:"knife_fork_plate",css:"14.5833% 18.75%"}
]; ]
var nature=[ var nature=[
{shortcode:"dog",css:"22.9167% 62.5%"}, {shortcode:"dog",css:"22.9167% 62.5%"},
{shortcode:"cat",css:"22.9167% 52.0833%"}, {shortcode:"cat",css:"22.9167% 52.0833%"},
@@ -605,7 +605,7 @@ var nature=[
{shortcode:"droplet",css:"35.4167% 39.5833%"}, {shortcode:"droplet",css:"35.4167% 39.5833%"},
{shortcode:"sweat_drops",css:"35.4167% 37.5%"}, {shortcode:"sweat_drops",css:"35.4167% 37.5%"},
{shortcode:"umbrella_with_rain_drops",css:"0% 100%"} {shortcode:"umbrella_with_rain_drops",css:"0% 100%"}
]; ]
var object=[ var object=[
{shortcode:"watch",css:"0% 29.1667%"}, {shortcode:"watch",css:"0% 29.1667%"},
{shortcode:"iphone",css:"39.5833% 0%"}, {shortcode:"iphone",css:"39.5833% 0%"},
@@ -780,7 +780,7 @@ var object=[
{shortcode:"closed_lock_with_key",css:"39.5833% 62.5%"}, {shortcode:"closed_lock_with_key",css:"39.5833% 62.5%"},
{shortcode:"lock",css:"39.5833% 66.6667%"}, {shortcode:"lock",css:"39.5833% 66.6667%"},
{shortcode:"unlock",css:"39.5833% 68.75%"} {shortcode:"unlock",css:"39.5833% 68.75%"}
]; ]
var people=[ var people=[
{shortcode:"grinning",css:"45.8333% 68.75%"}, {shortcode:"grinning",css:"45.8333% 68.75%"},
{shortcode:"smiley",css:"45.8333% 75%"}, {shortcode:"smiley",css:"45.8333% 75%"},
@@ -1096,7 +1096,7 @@ var people=[
{shortcode:"woman-raising-hand",css:"93.75% 29.1667%"}, {shortcode:"woman-raising-hand",css:"93.75% 29.1667%"},
{shortcode:"woman-frowning",css:"93.75% 54.1667%"}, {shortcode:"woman-frowning",css:"93.75% 54.1667%"},
{shortcode:"woman-pouting",css:"93.75% 79.1667%"} {shortcode:"woman-pouting",css:"93.75% 79.1667%"}
]; ]
var place=[ var place=[
{shortcode:"car",css:"52.0833% 60.4167%"}, {shortcode:"car",css:"52.0833% 60.4167%"},
{shortcode:"taxi",css:"52.0833% 56.25%"}, {shortcode:"taxi",css:"52.0833% 56.25%"},
@@ -1217,7 +1217,7 @@ var place=[
{shortcode:"milky_way",css:"8.33333% 93.75%"}, {shortcode:"milky_way",css:"8.33333% 93.75%"},
{shortcode:"bridge_at_night",css:"8.33333% 87.5%"}, {shortcode:"bridge_at_night",css:"8.33333% 87.5%"},
{shortcode:"foggy",css:"8.33333% 70.8333%"} {shortcode:"foggy",css:"8.33333% 70.8333%"}
]; ]
var symbol=[ var symbol=[
{shortcode:"heart",css:"6.25% 62.5%"}, {shortcode:"heart",css:"6.25% 62.5%"},
{shortcode:"yellow_heart",css:"35.4167% 14.5833%"}, {shortcode:"yellow_heart",css:"35.4167% 14.5833%"},
@@ -1492,7 +1492,7 @@ var symbol=[
{shortcode:"female_sign",css:"2.08333% 37.5%"}, {shortcode:"female_sign",css:"2.08333% 37.5%"},
{shortcode:"male_sign",css:"2.08333% 39.5833%"}, {shortcode:"male_sign",css:"2.08333% 39.5833%"},
{shortcode:"staff_of_aesculapius",css:"2.08333% 87.5%"} {shortcode:"staff_of_aesculapius",css:"2.08333% 87.5%"}
]; ]
var faicons=[ var faicons=[
"fa-500px", "fa-500px",
"fa-address-book", "fa-address-book",

View File

@@ -1,3 +0,0 @@
const JSON5 = require('json5')
const fs = require("fs")
fs.writeFileSync("main.json", JSON.stringify(JSON5.parse(fs.readFileSync("lang." + process.argv[2] + ".js", 'utf8').replace("var lang = ", ""))))

View File

@@ -83,6 +83,6 @@ var idata = {
"nitiasa.com_quote":"enabled", "nitiasa.com_quote":"enabled",
"biwakodon.com_quote":"enabled", "biwakodon.com_quote":"enabled",
"comm.cx_quote":"enabled" "comm.cx_quote":"enabled"
}; }
localStorage.setItem("instance", JSON.stringify(idata)); localStorage.setItem("instance", JSON.stringify(idata))

View File

@@ -2,90 +2,107 @@
//最初に読むやつ //最初に読むやつ
//アスタルテ判定初期化 //アスタルテ判定初期化
localStorage.removeItem("kirishima") localStorage.removeItem('kirishima')
localStorage.removeItem("quoters") localStorage.removeItem('quoters')
localStorage.removeItem("imas") localStorage.removeItem('imas')
localStorage.removeItem("image"); localStorage.removeItem('image')
localStorage.removeItem("stable") localStorage.removeItem('stable')
localStorage.setItem("mode_misskey.xyz", "misskey") localStorage.setItem('mode_misskey.xyz', 'misskey')
function ck() { function ck() {
var main = localStorage.getItem("main"); var main = localStorage.getItem('main')
if (!main) { if (!main) {
localStorage.setItem("main", 0) localStorage.setItem('main', 0)
} }
var domainz = localStorage.getItem("domain_0");
var at = localStorage.getItem("acct_0_at");
//コード受信 //コード受信
if (location.search) { if (location.search) {
var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/); var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/)
var mode = m[1]; var mode = m[1]
var codex = m[2]; var codex = m[2]
if (mode == "manager" || mode == "login") { if (mode == 'manager' || mode == 'login') {
code(codex, mode); code(codex, mode)
} else { } else {
} }
} }
var multi = localStorage.getItem("multi"); var multi = localStorage.getItem('multi')
if (!multi || multi == "[]") { if (!multi || multi == '[]') {
var date = new Date(); var date = new Date()
localStorage.setItem("showSupportMe", date.getMonth() + 2) localStorage.setItem('showSupportMe', date.getMonth() + 2)
location.href = "acct.html?mode=first&code=true" location.href = 'acct.html?mode=first&code=true'
} else { } else {
var obj = JSON.parse(multi); var obj = JSON.parse(multi)
Object.keys(obj).forEach(function (key) { var jp = false
var acct = obj[key]; Object.keys(obj).forEach(function(key) {
var acct = obj[key]
if (acct.domain) { if (acct.domain) {
refresh(key, true) refresh(key, true)
} }
}); if (acct.domain == 'mstdn.jp') {
jp = true
}
})
if (obj[0].domain) { if (obj[0].domain) {
$("#tl").show(); $('#tl').show()
ticker(); ticker()
multiSelector(false); multiSelector(false)
verck(ver); verck(ver, jp)
$(".stw").show() $('.stw').show()
$("#something-wrong img").attr("src", "../../img/thinking.svg") if (localStorage.getItem('tips')) {
tips(localStorage.getItem('tips'))
}
$('#something-wrong img').attr('src', '../../img/thinking.svg')
} }
} }
} }
ck(); ck()
//ログインポップアップ //ログインポップアップ
function login(url) { function login(url) {
if ($('#linux:checked').val() == "on") { if ($('#linux:checked').val() == 'on') {
var red = "urn:ietf:wg:oauth:2.0:oob" var red = 'urn:ietf:wg:oauth:2.0:oob'
} else { } else {
var red = 'thedesk://login'; var red = 'thedesk://login'
} }
localStorage.setItem("redirect", red); localStorage.setItem('redirect', red)
var start = "https://" + url + "/api/v1/apps"; var start = 'https://' + url + '/api/v1/apps'
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify({ httpreq.send(
scopes: 'read write follow', JSON.stringify({
client_name: "TheDesk(PC)", scopes: 'read write follow',
redirect_uris: red, client_name: 'TheDesk(PC)',
website: "https://thedesk.top" redirect_uris: red,
})); website: 'https://thedesk.top'
httpreq.onreadystatechange = function () { })
)
httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
var auth = "https://" + url + "/oauth/authorize?client_id=" + json[ if (this.status !== 200) {
"client_id"] + "&client_secret=" + json["client_secret"] + setLog(start, this.status, json)
"&response_type=code&redirect_uri=" + red + "&scope=read+write+follow"; }
localStorage.setItem("domain_" + acct_id, url); var auth =
localStorage.setItem("client_id", json["client_id"]); 'https://' +
localStorage.setItem("client_secret", json["client_secret"]); url +
$("#auth").show(); '/oauth/authorize?client_id=' +
$("#masara").hide(); json['client_id'] +
postMessage(["openUrl", auth], "*") '&client_secret=' +
json['client_secret'] +
'&response_type=code&redirect_uri=' +
red +
'&scope=read+write+follow'
localStorage.setItem('domain_' + acct_id, url)
localStorage.setItem('client_id', json['client_id'])
localStorage.setItem('client_secret', json['client_secret'])
$('#auth').show()
$('#masara').hide()
postMessage(['openUrl', auth], '*')
if ($('#linux:checked').val() == "on") { if ($('#linux:checked').val() == 'on') {
} else { } else {
postMessage(["sendSinmpleIpc", "quit"], "*") postMessage(['sendSinmpleIpc', 'quit'], '*')
} }
} }
} }
@@ -93,440 +110,509 @@ function login(url) {
//テキストボックスにURL入れた //テキストボックスにURL入れた
function instance() { function instance() {
var url = $("#url").val(); var url = $('#url').val()
login(url); login(url)
} }
//コードを入れた後認証 //コードを入れた後認証
function code(code, mode) { function code(code, mode) {
var red = localStorage.getItem("redirect"); var red = localStorage.getItem('redirect')
localStorage.removeItem("redirect") localStorage.removeItem('redirect')
if (!code) { if (!code) {
var code = $("#code").val(); var code = $('#code').val()
} }
if (localStorage.getItem("domain_tmp")) { if (localStorage.getItem('domain_tmp')) {
var url = localStorage.getItem("domain_tmp"); var url = localStorage.getItem('domain_tmp')
} else { } else {
var url = localStorage.getItem("domain_" + acct_id); var url = localStorage.getItem('domain_' + acct_id)
} }
var start = "https://" + url + "/oauth/token"; var start = 'https://' + url + '/oauth/token'
var id = localStorage.getItem("client_id"); var id = localStorage.getItem('client_id')
var secret = localStorage.getItem("client_secret"); var secret = localStorage.getItem('client_secret')
fetch(start, { fetch(start, {
method: 'POST', method: 'POST',
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
}, },
body: JSON.stringify({ body: JSON.stringify({
grant_type: "authorization_code", grant_type: 'authorization_code',
redirect_uri: red, redirect_uri: red,
client_id: id, client_id: id,
client_secret: secret, client_secret: secret,
code: code code: code
}) })
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
todo(json);
if (json["access_token"]) {
localStorage.setItem(url + "_at", json["access_token"]);
if (mode == "manager") {
getdataAdv(url, json["access_token"]);
} else {
getdata();
} }
return response.json()
} })
}); .catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
todo(json)
if (json['access_token']) {
localStorage.setItem(url + '_at', json['access_token'])
if (mode == 'manager') {
getdataAdv(url, json['access_token'])
} else {
getdata()
}
}
})
} }
//ユーザーデータ取得(最初) //ユーザーデータ取得(最初)
function getdata() { function getdata() {
var acct_id = 0; var acct_id = 0
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/accounts/verify_credentials"; var start = 'https://' + domain + '/api/v1/accounts/verify_credentials'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json.error) {
console.error("Error:" + json.error);
M.toast({ html: lang.lang_fatalerroroccured + "Error:" + json.error, displayLength: 5000 })
return;
} }
var avatar = json["avatar"]; })
//missingがmissingなやつ .then(function(response) {
if (avatar == "/avatars/original/missing.png") { if (!response.ok) {
avatar = "./img/missing.svg"; response.text().then(function(text) {
} setLog(response.url, response.status, text)
var obj = [{ })
at: at, }
name: json["display_name"], return response.json()
domain: domain, })
user: json["acct"], .catch(function(error) {
prof: avatar, todo(error)
id: json["id"], setLog(start, 'JSON', error)
vis: json["source"]["privacy"] console.error(error)
}]; })
var json = JSON.stringify(obj); .then(function(json) {
localStorage.setItem("multi", json); if (json.error) {
localStorage.setItem("name_" + acct_id, json["display_name"]); console.error('Error:' + json.error)
localStorage.setItem("user_" + acct_id, json["acct"]); M.toast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
localStorage.setItem("user-id_" + acct_id, json["id"]); return
localStorage.setItem("prof_" + acct_id, avatar); }
$("#masara").hide(); var avatar = json['avatar']
$("#auth").hide(); //missingがmissingなやつ
$("#tl").show(); if (avatar == '/avatars/original/missing.png') {
parseColumn() avatar = './img/missing.svg'
ckdb(); }
}); var obj = [
{
at: at,
name: json['display_name'],
domain: domain,
user: json['acct'],
prof: avatar,
id: json['id'],
vis: json['source']['privacy']
}
]
var json = JSON.stringify(obj)
localStorage.setItem('multi', json)
localStorage.setItem('name_' + acct_id, json['display_name'])
localStorage.setItem('user_' + acct_id, json['acct'])
localStorage.setItem('user-id_' + acct_id, json['id'])
localStorage.setItem('prof_' + acct_id, avatar)
$('#masara').hide()
$('#auth').hide()
$('#tl').show()
parseColumn()
ckdb()
})
} }
//ユーザーデータ取得(追加) //ユーザーデータ取得(追加)
function getdataAdv(domain, at) { function getdataAdv(domain, at) {
var start = "https://" + domain + "/api/v1/accounts/verify_credentials"; var start = 'https://' + domain + '/api/v1/accounts/verify_credentials'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json.error) {
console.error("Error:" + json.error);
M.toast({ html: lang.lang_fatalerroroccured + "Error:" + json.error, displayLength: 5000 })
return;
} }
var avatar = json["avatar"]; })
//missingがmissingなやつ .then(function(response) {
if (avatar == "/avatars/original/missing.png") { if (!response.ok) {
avatar = "../../img/missing.svg"; response.text().then(function(text) {
} setLog(response.url, response.status, text)
if (json["source"]["privacy"]) { })
var priv = json["source"]["privacy"]; }
} else { return response.json()
var priv = "public"; })
} .catch(function(error) {
var add = { todo(error)
at: at, setLog(start, 'JSON', error)
name: json["display_name"], console.error(error)
domain: domain, })
user: json["acct"], .then(function(json) {
prof: avatar, if (json.error) {
id: json["id"], console.error('Error:' + json.error)
vis: priv M.toast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
}; return
var multi = localStorage.getItem("multi"); }
var obj = JSON.parse(multi); var avatar = json['avatar']
var target = obj.lengtth; //missingがmissingなやつ
obj.push(add); if (avatar == '/avatars/original/missing.png') {
localStorage.setItem("name_" + target, json["display_name"]); avatar = '../../img/missing.svg'
localStorage.setItem("user_" + target, json["acct"]); }
localStorage.setItem("user-id_" + target, json["id"]); if (json['source']['privacy']) {
localStorage.setItem("prof_" + target, avatar); var priv = json['source']['privacy']
var json = JSON.stringify(obj); } else {
localStorage.setItem("multi", json); var priv = 'public'
location.href = "index.html"; }
}); var add = {
at: at,
name: json['display_name'],
domain: domain,
user: json['acct'],
prof: avatar,
id: json['id'],
vis: priv
}
var multi = localStorage.getItem('multi')
var obj = JSON.parse(multi)
var target = obj.lengtth
obj.push(add)
localStorage.setItem('name_' + target, json['display_name'])
localStorage.setItem('user_' + target, json['acct'])
localStorage.setItem('user-id_' + target, json['id'])
localStorage.setItem('prof_' + target, avatar)
var json = JSON.stringify(obj)
localStorage.setItem('multi', json)
location.href = 'index.html'
})
} }
//ユーザーデータ更新 //ユーザーデータ更新
function refresh(target, loadskip) { function refresh(target, loadskip) {
var multi = localStorage.getItem("multi"); var multi = localStorage.getItem('multi')
var obj = JSON.parse(multi); var obj = JSON.parse(multi)
if (obj[target].mode == "misskey") { if (obj[target].mode == 'misskey') {
return return
} }
var start = "https://" + obj[target].domain + var start = 'https://' + obj[target].domain + '/api/v1/accounts/verify_credentials'
"/api/v1/accounts/verify_credentials";
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + obj[target].at Authorization: 'Bearer ' + obj[target].at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json.error) {
console.error("Error:" + json.error);
M.toast({ html: lang.lang_fatalerroroccured + "Error:" + json.error, displayLength: 5000 })
return;
} }
var avatar = json["avatar"]; })
//missingがmissingなやつ .then(function(response) {
if (avatar == "/avatars/original/missing.png" || !avatar) { if (!response.ok) {
avatar = "./img/missing.svg"; response.text().then(function(text) {
} setLog(response.url, response.status, text)
var ref = { })
at: obj[target].at, }
name: json["display_name"], return response.json()
domain: obj[target].domain, })
user: json["acct"], .catch(function(error) {
prof: avatar, todo(error)
id: json["id"], setLog(start, 'JSON', error)
vis: json["source"]["privacy"] console.error(error)
}; })
localStorage.setItem("name_" + target, json["display_name"]); .then(function(json) {
localStorage.setItem("user_" + target, json["acct"]); if (json.error) {
localStorage.setItem("user-id_" + target, json["id"]); console.error('Error:' + json.error)
localStorage.setItem("prof_" + target, avatar); M.toast({ html: lang.lang_fatalerroroccured + 'Error:' + json.error, displayLength: 5000 })
localStorage.setItem("follow_" + target, json["following_count"]); return
console.log(obj) }
var json = JSON.stringify(obj); var avatar = json['avatar']
localStorage.setItem("multi", json); //missingがmissingなやつ
if (!loadskip) { if (avatar == '/avatars/original/missing.png' || !avatar) {
load(); avatar = './img/missing.svg'
} }
}); var ref = {
at: obj[target].at,
name: json['display_name'],
domain: obj[target].domain,
user: json['acct'],
prof: avatar,
id: json['id'],
vis: json['source']['privacy']
}
if (obj[target].background) {
ref.background = obj[target].background
}
if (obj[target].text) {
ref.text = obj[target].text
}
localStorage.setItem('name_' + target, json['display_name'])
localStorage.setItem('user_' + target, json['acct'])
localStorage.setItem('user-id_' + target, json['id'])
localStorage.setItem('prof_' + target, avatar)
localStorage.setItem('follow_' + target, json['following_count'])
if (json['source']['sensitive']) {
localStorage.setItem('nsfw_' + target, 'true')
} else {
localStorage.removeItem('nsfw_' + target)
}
obj[target] = ref
var json = JSON.stringify(obj)
localStorage.setItem('multi', json)
if (!loadskip) {
load()
}
})
} }
//MarkdownやBBCodeの対応、文字数制限をチェック //MarkdownやBBCodeの対応、文字数制限をチェック
//絶対ストリーミングを閉じさせないマン //絶対ストリーミングを閉じさせないマン
function ckdb(acct_id) { function ckdb(acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
localStorage.removeItem("home_" + acct_id); localStorage.removeItem('home_' + acct_id)
localStorage.removeItem("bb_" + acct_id); localStorage.removeItem('bb_' + acct_id)
localStorage.removeItem("md_" + acct_id); localStorage.removeItem('md_' + acct_id)
localStorage.removeItem("local_" + acct_id); localStorage.removeItem('local_' + acct_id)
localStorage.removeItem("public_" + acct_id); localStorage.removeItem('public_' + acct_id)
localStorage.removeItem("notification_" + acct_id); localStorage.removeItem('notification_' + acct_id)
localStorage.removeItem("post_" + acct_id); localStorage.removeItem('post_' + acct_id)
localStorage.removeItem("fav_" + acct_id); localStorage.removeItem('fav_' + acct_id)
localStorage.removeItem("bt_" + acct_id); localStorage.removeItem('bt_' + acct_id)
localStorage.removeItem("followlocale_" + acct_id); localStorage.removeItem('followlocale_' + acct_id)
if (domain == "kirishima.cloud") { if (domain == 'kirishima.cloud') {
localStorage.setItem("kirishima", "true"); localStorage.setItem('kirishima', 'true')
} else if (domain == "imastodon.net") { } else if (domain == 'imastodon.net') {
localStorage.setItem("imas", "true"); localStorage.setItem('imas', 'true')
$(".imasonly").show(); $('.imasonly').show()
} }
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var bbcode = domain + "_bbcode"; var bbcode = domain + '_bbcode'
var letters = domain + "_letters"; var letters = domain + '_letters'
var quoteMarker = domain + "_quote"; var quoteMarker = domain + '_quote'
if (localStorage.getItem("instance")) { if (localStorage.getItem('instance')) {
var json = JSON.parse(localStorage.getItem("instance")); var json = JSON.parse(localStorage.getItem('instance'))
if (json[quoteMarker] == "enabled") { if (json[quoteMarker] == 'enabled') {
localStorage.setItem("quoters", "true"); localStorage.setItem('quoters', 'true')
localStorage.setItem("quote_" + acct_id, "true"); localStorage.setItem('quote_' + acct_id, 'true')
} }
if (json[bbcode]) { if (json[bbcode]) {
if (json[bbcode] == "enabled") { if (json[bbcode] == 'enabled') {
localStorage.setItem("bb_" + acct_id, "true"); localStorage.setItem('bb_' + acct_id, 'true')
} else { } else {
localStorage.removeItem("bb_" + acct_id); localStorage.removeItem('bb_' + acct_id)
$("[data-activates='bbcode']").addClass("disabled"); $("[data-activates='bbcode']").addClass('disabled')
$("[data-activates='bbcode']").prop("disabled", true); $("[data-activates='bbcode']").prop('disabled', true)
} }
} else { } else {
localStorage.removeItem("bb_" + acct_id); localStorage.removeItem('bb_' + acct_id)
$("[data-activates='bbcode']").addClass("disabled"); $("[data-activates='bbcode']").addClass('disabled')
$("[data-activates='bbcode']").addClass("disabled", true); $("[data-activates='bbcode']").addClass('disabled', true)
} }
if (json[domain + "_markdown"] == "enabled") { if (json[domain + '_markdown'] == 'enabled') {
localStorage.setItem("md_" + acct_id, "true"); localStorage.setItem('md_' + acct_id, 'true')
$(".markdown").show(); $('.markdown').show()
} else { } else {
$(".anti-markdown").hide(); $('.anti-markdown').hide()
$(".markdown").hide(); $('.markdown').hide()
localStorage.removeItem("bb_" + acct_id); localStorage.removeItem('bb_' + acct_id)
} }
if (json[domain + "_home"]) { if (json[domain + '_home']) {
localStorage.setItem("home_" + acct_id, json[domain + "_home"]); localStorage.setItem('home_' + acct_id, json[domain + '_home'])
} }
if (json[domain + "_local"]) { if (json[domain + '_local']) {
localStorage.setItem("local_" + acct_id, json[domain + "_local"]); localStorage.setItem('local_' + acct_id, json[domain + '_local'])
} }
if (json[domain + "_public"]) { if (json[domain + '_public']) {
localStorage.setItem("public_" + acct_id, json[domain + "_public"]); localStorage.setItem('public_' + acct_id, json[domain + '_public'])
} }
if (json[domain + "_notification"]) { if (json[domain + '_notification']) {
localStorage.setItem("notification_" + acct_id, json[domain + "_notification"]); localStorage.setItem('notification_' + acct_id, json[domain + '_notification'])
} }
if (json[domain + "_post"]) { if (json[domain + '_post']) {
localStorage.setItem("post_" + acct_id, json[domain + "_post"]); localStorage.setItem('post_' + acct_id, json[domain + '_post'])
} }
if (json[domain + "_fav"]) { if (json[domain + '_fav']) {
localStorage.setItem("fav_" + acct_id, json[domain + "_fav"]); localStorage.setItem('fav_' + acct_id, json[domain + '_fav'])
} }
if (json[domain + "_bt"]) { if (json[domain + '_bt']) {
localStorage.setItem("bt_" + acct_id, json[domain + "_bt"]); localStorage.setItem('bt_' + acct_id, json[domain + '_bt'])
} }
if (json[domain + "_follow"]) { if (json[domain + '_follow']) {
localStorage.setItem("followlocale_" + acct_id, json[domain + "_follow"]); localStorage.setItem('followlocale_' + acct_id, json[domain + '_follow'])
} }
} }
if (localStorage.getItem("mode_" + domain) != "misskey") { if (localStorage.getItem('mode_' + domain) != 'misskey') {
var start = "https://" + domain + "/api/v1/instance"; var start = 'https://' + domain + '/api/v1/instance'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
console.error(error);
}).then(function (json) {
if (json.error) {
console.error(json.error);
return;
} }
if (json) { })
if (json["max_toot_chars"]) { .then(function(response) {
localStorage.setItem("letters_" + acct_id, json["max_toot_chars"]); return response.json()
})
.catch(function(error) {
console.error(error)
})
.then(function(json) {
if (json.error) {
console.error(json.error)
return
} }
if (json["urls"]["streaming_api"]) { if (json) {
localStorage.setItem("streaming_" + acct_id, json["urls"]["streaming_api"]); if (json['max_toot_chars']) {
localStorage.setItem('letters_' + acct_id, json['max_toot_chars'])
}
if (json['urls']['streaming_api']) {
localStorage.setItem('streaming_' + acct_id, json['urls']['streaming_api'])
} else {
localStorage.removeItem('streaming_' + acct_id)
}
} }
} })
});
} else { } else {
} }
} }
//アカウントを選択…を実装 //アカウントを選択…を実装
function multiSelector(parseC) { function multiSelector(parseC) {
var multi = localStorage.getItem("multi"); var multi = localStorage.getItem('multi')
if (!multi) { if (!multi) {
var obj = []; var obj = []
var json = JSON.stringify(obj); var json = JSON.stringify(obj)
localStorage.setItem("multi", json); localStorage.setItem('multi', json)
} else { } else {
var obj = JSON.parse(multi); var obj = JSON.parse(multi)
} }
var templete; var templete
if (localStorage.getItem("mainuse") == "main") { if (localStorage.getItem('mainuse') == 'main') {
var last = localStorage.getItem("main"); var last = localStorage.getItem('main')
} else if (localStorage.getItem("last-use")) { } else if (localStorage.getItem('last-use')) {
var last = localStorage.getItem("last-use"); var last = localStorage.getItem('last-use')
if (last == "webview" || last == "noauth") { if (last == 'webview' || last == 'noauth') {
last = "0"; last = '0'
} }
} else { } else {
var last = "0"; var last = '0'
} }
last = last + ""; last = last + ''
var sel; var sel
if (obj.length < 1) { if (obj.length < 1) {
$("#src-acct-sel").html('<option value="tootsearch">Tootsearch</option>'); $('#src-acct-sel').html('<option value="tootsearch">Tootsearch</option>')
$("#add-acct-sel").html('<option value="noauth">' + lang.lang_login_noauth + '</option>'); $('#add-acct-sel').html('<option value="noauth">' + lang.lang_login_noauth + '</option>')
} else { } else {
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function(key) {
var acct = obj[key]; var acct = obj[key]
var list = key * 1 + 1; var list = key * 1 + 1
if (key+"" === last) { if (key + '' === last) {
sel = "selected"; sel = 'selected'
var domain = acct.domain; var domain = acct.domain
localStorage.setItem("domain_" + key, domain); localStorage.setItem('domain_' + key, domain)
if (idata[domain + "_letters"]) { if (idata[domain + '_letters']) {
$("#textarea").attr("data-length", idata[domain + "_letters"]) $('#textarea').attr('data-length', idata[domain + '_letters'])
} else { } else {
var maxletters = localStorage.getItem("letters_" + key); var maxletters = localStorage.getItem('letters_' + key)
if (maxletters > 0) { if (maxletters > 0) {
$("#textarea").attr("data-length", maxletters) $('#textarea').attr('data-length', maxletters)
} else { } else {
$("#textarea").attr("data-length", 500) $('#textarea').attr('data-length', 500)
} }
} }
if (idata[domain + "_glitch"]) { if (idata[domain + '_glitch']) {
$("#local-button").removeClass("hide") $('#local-button').removeClass('hide')
} }
var profimg = acct.prof; var profimg = acct.prof
//localStorage.setItem("prof_" + key, profimg); //localStorage.setItem("prof_" + key, profimg);
if (!profimg) { if (!profimg) {
profimg = "../../img/missing.svg"; profimg = '../../img/missing.svg'
} }
$("#acct-sel-prof").attr("src", profimg); $('#acct-sel-prof').attr('src', profimg)
if (domain) { if (domain) {
var cc = "(" + domain + ")"; var cc = '(' + domain + ')'
} else { } else {
var cc = ""; var cc = ''
} }
$("#toot-post-btn").text(lang.lang_toot + cc); $('#toot-post-btn').text(lang.lang_toot + cc)
if (acct.background && acct.background != "def" && acct.text && acct.text != "def") { if (acct.background && acct.background != 'def' && acct.text && acct.text != 'def') {
$("#toot-post-btn").removeClass("indigo"); $('#toot-post-btn').removeClass('indigo')
$("#toot-post-btn").css("background-color", "#" + acct.background); $('#toot-post-btn').css('background-color', '#' + acct.background)
$("#toot-post-btn").css("color", acct.text); $('#toot-post-btn').css('color', acct.text)
} else { } else {
} }
if (domain == "kirishima.cloud") { if (domain == 'kirishima.cloud') {
$("#faicon-btn").show(); $('#faicon-btn').show()
} else { } else {
$("#faicon-btn").hide(); $('#faicon-btn').hide()
} }
if (domain == "imastodon.net") { if (domain == 'imastodon.net') {
trendTag(); trendTag()
} else { } else {
$("#trendtag").html(""); $('#trendtag').html('')
} }
} else { } else {
sel = ""; sel = ''
} }
templete = '<option value="' + key + '" data-icon="' + acct.prof + templete =
'" class="left circle" ' + sel + '>' + acct.user + '@' + acct.domain + '<option value="' +
'</option>'; key +
$(".acct-sel").append(templete); '" data-icon="' +
acct.prof +
}); '" class="left circle" ' +
$("#src-acct-sel").append('<option value="tootsearch">Tootsearch</option>'); sel +
$("#add-acct-sel").append('<option value="noauth">' + lang.lang_login_noauth + '</option><option value="webview">Twitter</option>'); '>' +
$("#dir-acct-sel").append('<option value="noauth">' + lang.lang_login_noauth + '</option>'); acct.user +
'@' +
acct.domain +
'</option>'
$('.acct-sel').append(templete)
})
$('#src-acct-sel').append('<option value="tootsearch">Tootsearch</option>')
$('#add-acct-sel').append(
'<option value="noauth">' +
lang.lang_login_noauth +
'</option><option value="webview">Twitter</option>'
)
$('#dir-acct-sel').append('<option value="noauth">' + lang.lang_login_noauth + '</option>')
} }
$('select').formSelect(); $('select').formSelect()
if(!parseC){ if (!parseC) {
parseColumn(null, true); parseColumn(null, true)
} }
} }
//バージョンエンコ //バージョンエンコ
function enc(ver) { function enc(ver) {
var ver = ver.replace(/\s/g, ""); var ver = ver.replace(/\s/g, '')
var ver = ver.replace(/\(/g, "-"); var ver = ver.replace(/\(/g, '-')
var ver = ver.replace(/\)/g, ""); var ver = ver.replace(/\)/g, '')
var ver = ver.replace(/\[/g, "_"); var ver = ver.replace(/\[/g, '_')
var ver = ver.replace(/\]/g, ""); var ver = ver.replace(/\]/g, '')
return ver; return ver
} }
//インスタンスティッカー //インスタンスティッカー
function ticker() { function ticker() {
var start = "https://toot.app/toot/"; var start = 'https://s.0px.io/json'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
cors: true,
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
console.error(error);
}).then(function (json) {
if (json) {
localStorage.setItem("ticker", JSON.stringify(json));
} }
}); })
} .then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
console.error(error)
})
.then(function(json) {
if (json) {
localStorage.removeItem('ticker')
localStorage.setItem('sticker', JSON.stringify(json))
}
})
}

View File

@@ -1,7 +1,7 @@
//ログアウトします //ログアウトします
function logout() { function logout() {
localStorage.removeItem("acct_" + acct_id + "_at"); localStorage.removeItem("acct_" + acct_id + "_at")
localStorage.removeItem("domain_" + acct_id); localStorage.removeItem("domain_" + acct_id)
location.href = "index.html"; location.href = "index.html"
todc(); todc()
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,176 +1,218 @@
//プラットフォーム別 最後に読むやつ //プラットフォーム別 最後に読むやつ
//リンクを外部で開くか内部で出すか //リンクを外部で開くか内部で出すか
$(document).on('click', 'a', e => { $(document).on('click', 'a', e => {
var $a = $(e.target); var $a = $(e.target)
var url = $a.attr('href'); var url = $a.attr('href')
if (!url) { if (!url) {
var url = $a.parent().attr('href'); var url = $a.parent().attr('href')
} }
var urls = []; var urls = []
if (url) { if (url) {
urls = url.match(/https?:\/\/(.+)/); urls = url.match(/https?:\/\/(.+)/)
//トゥートのURLぽかったら //トゥートのURLぽかったら
toot = url.match(/https:\/\/([^+_]+)\/@([a-zA-Z0-9_]+)\/([0-9]+)/); toot = url.match(/https:\/\/([^+_]+)\/@([a-zA-Z0-9_]+)\/([0-9]+)/)
if(!toot){ if (!toot) {
//Pleroma対策 //Pleroma対策
toot = url.match(/https:\/\/([^+_]+)\/users\/([a-zA-Z0-9_]+)\/statuses\/([0-9]+)/); toot = url.match(/https:\/\/([^+_]+)\/users\/([a-zA-Z0-9_]+)\/statuses\/([0-9]+)/)
} }
//タグのURLぽかったら //タグのURLぽかったら
var tags = []; var tags = []
tags = url.match( tags = url.match(/https:\/\/([^+_]+)\/tags\/([_a-zA-Z0-9\&=+\%]+)/)
/https:\/\/([^+_]+)\/tags\/([-_.!~*\'()a-zA-Z0-9;\/?:\&=+\$,%#]+)/
);
//メンションっぽかったら //メンションっぽかったら
var ats = []; var ats = []
ats = url.match( ats = url.match(/https:\/\/([^+_]+)\/@([_a-zA-Z0-9\&=+\%]+)/)
/https:\/\/([^+_]+)\/@([-_.!~*\'()a-zA-Z0-9;\/?:\&=+\$,%#@]+)/
);
if (toot) { if (toot) {
if (toot[1]) { if (toot[1]) {
var acct_id = $a.parent().attr("data-acct"); var acct_id = $a.parent().attr('data-acct')
if (!acct_id) { if (!acct_id) {
acct_id = 0; acct_id = 0
} }
$a.parent().addClass("loadp") $a.parent().addClass('loadp')
$a.parent().text("Loading...") $a.parent().text('Loading...')
detEx(url, acct_id); detEx(url, acct_id)
} }
} else if (tags) { } else if (tags) {
if (tags[2]) { if (tags[2]) {
var acct_id = $a.parent().attr("data-acct"); var acct_id = $a.parent().attr('data-acct')
if (!acct_id) { if (!acct_id) {
acct_id = 0; acct_id = 0
} }
tl('tag', decodeURI(tags[2]), acct_id, 'add') tl('tag', decodeURI(tags[2]), acct_id, 'add')
} }
} else if (ats) { } else if (ats) {
if (ats[2]) { if (ats[2]) {
//Quesdon判定 //Quesdon判定
if (!~ats[2].indexOf("@")) { if (!~ats[2].indexOf('@')) {
udgEx(ats[2] + "@" + ats[1], "main"); udgEx(url, 'main')
return false return false
} else { } else {
postMessage(["openUrl", url], "*") if(pwa) {
return true
} else {
postMessage(['openUrl', url], '*')
}
} }
} }
} else { } else {
if(pwa) {
return true
}
//hrefがhttp/httpsならブラウザで //hrefがhttp/httpsならブラウザで
if (urls) { if (urls) {
if (urls[0]) { if (urls[0]) {
if (~url.indexOf("thedeks.top")) { if (~url.indexOf('thedeks.top')) {
//alert("If you recieve this alert, let the developer(Cutls@kirishima.cloud) know it with a screenshot."); //alert("If you recieve this alert, let the developer(Cutls@kirishima.cloud) know it with a screenshot.");
url = "https://thedesk.top"; url = 'https://thedesk.top'
} }
postMessage(["openUrl", url], "*") postMessage(['openUrl', url], '*')
} else { } else {
location.href = url
location.href = url;
} }
} else { } else {
location.href = url; location.href = url
} }
} }
} }
return false; return false
}); })
//よく使うライブラリ //よく使うライブラリ
//コピー //コピー
function execCopy(string) { function execCopy(string) {
var temp = $("#copy"); postMessage(['copy', string], '*')
temp.val(string); return true
temp.select();
var result = document.execCommand('copy');
return result;
} }
function progshow(e) { function progshow(e) {
if (e.lengthComputable) { if (e.lengthComputable) {
var percent = e.loaded / e.total; var percent = e.loaded / e.total
console.log("Progress: " + percent * 100); console.log('Progress: ' + percent * 100)
$("#imgsel").hide(); $('#imgsel').hide()
if (percent < 1) { if (percent < 1) {
$("#imgup").text(Math.floor(percent * 100) + "%"); $('#imgup').text(Math.floor(percent * 100) + '%')
} else { } else {
$("#imgup").text(lang.lang_progress); $('#imgup').text(lang.lang_progress)
} }
} }
} }
function opendev() { function opendev() {
var webview = document.getElementById("webview"); var webview = document.getElementById('webview')
webview.openDevTools(); webview.openDevTools()
/*webview.sendInputEvent({ /*webview.sendInputEvent({
type: "keyDown", type: "keyDown",
keyCode: '2' keyCode: '2'
}); });
*/ */
} }
var soundFile
function playSound() { function playSound() {
window.AudioContext = window.AudioContext || window.webkitAudioContext; window.AudioContext = window.AudioContext || window.webkitAudioContext
context = new AudioContext(); if (soundFile) {
context.createBufferSource().start(0); soundFile.stop()
context.decodeAudioData(request.response, function (buf) { }
console.log("Playing:" + source) context = new AudioContext()
source.buffer = buf; context.createBufferSource().start(0)
source.loop = false; context.decodeAudioData(request.response, function(buf) {
}); //console.log("Playing:" , source)
source = context.createBufferSource(); source.buffer = buf
volumeControl = context.createGain(); source.loop = false
source.connect(volumeControl); })
volumeControl.connect(context.destination); source = context.createBufferSource()
volumeControl.gain.value = 0.8 volumeControl = context.createGain()
source.start(0); source.connect(volumeControl)
volumeControl.connect(context.destination)
var cvol = localStorage.getItem('customVol')
if (cvol) {
vol = cvol
} else {
vol = 0.8
}
volumeControl.gain.value = vol
source.start(0)
soundFile = source
} }
function nano() { function nano() {
postMessage(["nano", null], "*") postMessage(['nano', null], '*')
} }
onmessage = function (e) { onmessage = function(e) {
if (e.data[0] == "details") { if (e.data[0] == 'details') {
details(e.data[1][0], e.data[1][1]) details(e.data[1][0], e.data[1][1])
} else if (e.data[0] == "udg") { } else if (e.data[0] == 'udg') {
udg(e.data[1][0], e.data[1][1]) udg(e.data[1][0], e.data[1][1])
} else if (e.data[0] == "media") { } else if (e.data[0] == 'media') {
media(e.data[1][0], e.data[1][1], e.data[1][2]) media(e.data[1][0], e.data[1][1], e.data[1][2], e.data[1][3])
} else if (e.data[0] == "post") { } else if (e.data[0] == 'post') {
post("pass") post('pass')
} else if (e.data[0] == "toastSaved") { } else if (e.data[0] == 'toastSaved') {
M.toast({ html: lang.lang_img_DLDone + e.data[1][0] + '<button class="btn-flat toast-action" onclick="openFinder(\'' + e.data[1][1] + '\')">Show</button>', displayLength: 5000 }) var showTxt = `${lang.lang_img_DLDone}${
} else if (e.data[0] == "parseColumn") { e.data[1][0]
}<button class="btn-flat toast-action" onclick="openFinder('${e.data[1][1]}')">Show</button>`
M.toast({ html: showTxt, displayLength: 5000 })
} else if (e.data[0] == 'parseColumn') {
parseColumn(e.data[1]) parseColumn(e.data[1])
} else if (e.data[0] == "exportSettingsCore") { } else if (e.data[0] == 'exportSettingsCore') {
var exp = exportSettingsCore() var exp = exportSettingsCore()
postMessage(["exportSettingsCoreComplete", [e.data[1], exp]], "*") postMessage(['exportSettingsCoreComplete', [e.data[1], exp]], '*')
} else if (e.data[0] == "importSettingsCore") { } else if (e.data[0] == 'importSettingsCore') {
importSettingsCore(e.data[1]) importSettingsCore(e.data[1])
}else if (e.data[0] == "fontList") { } else if (e.data[0] == 'fontList') {
fontList(e.data[1]) fontList(e.data[1])
} else if (e.data[0] == "customSoundSave") { } else if (e.data[0] == 'customSoundSave') {
customSoundSave(e.data[1][0], e.data[1][1]) customSoundSave(e.data[1][0], e.data[1][1])
} else if (e.data[0] == "ctLoadCore") { } else if (e.data[0] == 'ctLoadCore') {
ctLoadCore(e.data[1]) ctLoadCore(e.data[1])
} else if (e.data[0] == "ctLoad") { } else if (e.data[0] == 'ctLoad') {
ctLoad() ctLoad()
} else if (e.data[0] == "customConnect") { } else if (e.data[0] == 'customConnect') {
customConnect(e.data[1]) customConnect(e.data[1])
} else if (e.data[0] == "clearCustomImport") { } else if (e.data[0] == 'clearCustomImport') {
clearCustomImport() clearCustomImport()
} else if (e.data[0] == "npCore") { } else if (e.data[0] == 'npCore') {
npCore(e.data[1]); npCore(e.data[1])
} else if (e.data[0] == "renderMem") { } else if (e.data[0] == 'renderMem') {
renderMem(e.data[1][0], e.data[1][1], e.data[1][2]) renderMem(e.data[1][0], e.data[1][1], e.data[1][2])
} else if (e.data[0] == "updateProg") { } else if (e.data[0] == 'updateProg') {
updateProg(e.data[1]); updateProg(e.data[1])
} else if (e.data[0] == "updateMess") { } else if (e.data[0] == 'updateMess') {
updateMess(e.data[1]); updateMess(e.data[1])
} else if (e.data[0] == "renderAbout") { } else if (e.data[0] == 'renderAbout') {
renderAbout(e.data[1]); renderAbout(e.data[1])
} else if (e.data[0] == "alert") { } else if (e.data[0] == 'asRead') {
asRead()
} else if (e.data[0] == 'asReadEnd') {
asReadEnd()
} else if (e.data[0] == 'accessibility') {
console.log('atrue')
$('body').addClass('accessibility')
$('.window-title').before('<div class="accessMark">Screen Reader Optimized</div>')
} else if (e.data[0] == 'logData') {
$('#logs').val(e.data[1])
var obj = document.getElementById('logs')
obj.scrollTop = obj.scrollHeight
} else if (e.data[0] == 'alert') {
Swal.fire({ Swal.fire({
type: 'info', type: 'info',
title: e.data[1] title: e.data[1]
}) })
} }
}
/* PWA */
if(pwa) {
function postMessage(e) {
if (e[0] == 'openUrl') {
urls = e[1].match(/https?:\/\/(.+)/)
if (urls) {
Swal.fire({
title: 'Open URL',
icon: 'info',
html:
`If you are OK, click: <a href="${urls[0]}" target="_blank" class="btn waves-effect">Here</a>`,
showCloseButton: false,
showCancelButton: true,
focusConfirm: false,
confirmButtonText: 'Close'
})
}
}
}
} }

View File

@@ -1,199 +1,285 @@
document.title="TheDesk"
$.strip_tags = function (str, allowed) { $.strip_tags = function (str, allowed) {
if (!str) { if (!str) {
return ""; return ''
} }
allowed = (((allowed || '') + '').toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []) allowed = (((allowed || '') + '').toLowerCase().match(/<[a-z][a-z0-9]*>/g) || []).join('')
.join('');
var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>?/gi, var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>?/gi,
commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi; commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi
return str.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) { return str.replace(commentsAndPhpTags, '').replace(tags, function ($0, $1) {
return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : ''; return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : ''
}); })
}; }
function escapeHTML(str) { function escapeHTML(str) {
if (!str) { if (!str) {
return ""; return ''
} }
return str.replace(/&/g, '&amp;') return str
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;') .replace(/</g, '&lt;')
.replace(/>/g, '&gt;') .replace(/>/g, '&gt;')
.replace(/"/g, '&quot;') .replace(/"/g, '&quot;')
.replace(/'/g, '&#039;'); .replace(/'/g, '&#039;')
} }
//PHPのnl2brと同様 //PHPのnl2brと同様
function nl2br(str) { function nl2br(str) {
if (!str) { if (!str) {
return ""; return ''
} }
str = str.replace(/\r\n/g, "<br />"); str = str.replace(/\r\n/g, '<br />')
str = str.replace(/(\n|\r)/g, "<br />"); str = str.replace(/(\n|\r)/g, '<br />')
return str; return str
} }
function br2nl(str) { function br2nl(str) {
if (!str) { if (!str) {
return ""; return ''
} }
str = str.replace(/<br \/>/g, "\r\n"); str = str.replace(/<br \/>/g, '\r\n')
return str; return str
} }
function formattime(date) { function formattime(date) {
var str = date.getFullYear() + "-"; var str = date.getFullYear() + '-'
if (date.getMonth() + 1 < 10) { if (date.getMonth() + 1 < 10) {
str = str + "0" + (date.getMonth() + 1) + "-"; str = str + '0' + (date.getMonth() + 1) + '-'
} else { } else {
str = str + (date.getMonth() + 1) + "-"; str = str + (date.getMonth() + 1) + '-'
} }
if (date.getDate() < 10) { if (date.getDate() < 10) {
str = str + "0" + date.getDate() str = str + '0' + date.getDate()
} else { } else {
str = str + date.getDate() str = str + date.getDate()
} }
str = str + "T"; str = str + 'T'
if (date.getHours() < 10) { if (date.getHours() < 10) {
str = str + "0" + date.getHours() + ":" str = str + '0' + date.getHours() + ':'
} else { } else {
str = str + date.getHours() + ":" str = str + date.getHours() + ':'
} }
if (date.getMinutes() < 10) { if (date.getMinutes() < 10) {
str = str + "0" + date.getMinutes() str = str + '0' + date.getMinutes()
} else { } else {
str = str + date.getMinutes() str = str + date.getMinutes()
} }
return escapeHTML(str); return escapeHTML(str)
} }
function formattimeutc(date) { function formattimeutc(date) {
var str = date.getUTCFullYear() + "-"; var str = date.getUTCFullYear() + '-'
if (date.getUTCMonth() + 1 < 10) { if (date.getUTCMonth() + 1 < 10) {
str = str + "0" + (date.getUTCMonth() + 1) + "-"; str = str + '0' + (date.getUTCMonth() + 1) + '-'
} else { } else {
str = str + (date.getUTCMonth() + 1) + "-"; str = str + (date.getUTCMonth() + 1) + '-'
} }
if (date.getUTCDate() < 10) { if (date.getUTCDate() < 10) {
str = str + "0" + date.getUTCDate() str = str + '0' + date.getUTCDate()
} else { } else {
str = str + date.getUTCDate() str = str + date.getUTCDate()
} }
str = str + "T"; str = str + 'T'
if (date.getUTCHours() < 10) { if (date.getUTCHours() < 10) {
str = str + "0" + date.getUTCHours() + ":" str = str + '0' + date.getUTCHours() + ':'
} else { } else {
str = str + date.getUTCHours() + ":" str = str + date.getUTCHours() + ':'
} }
if (date.getUTCMinutes() < 10) { if (date.getUTCMinutes() < 10) {
str = str + "0" + date.getUTCMinutes() str = str + '0' + date.getUTCMinutes()
} else { } else {
str = str + date.getUTCMinutes() str = str + date.getUTCMinutes()
} }
return escapeHTML(str); return escapeHTML(str)
} }
postMessage(["sendSinmpleIpc", "custom-css-request"], "*") postMessage(['sendSinmpleIpc', 'custom-css-request'], '*')
function makeCID() { function makeCID() {
return randomStr(8) + "-" + randomStr(4) + "-" + randomStr(4) + "-" + randomStr(4) + "-" + randomStr(12); let chars = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split("")
for (let i = 0, len = chars.length; i < len; i++) {
switch (chars[i]) {
case "x":
chars[i] = Math.floor(Math.random() * 16).toString(16)
break
case "y":
chars[i] = (Math.floor(Math.random() * 4) + 8).toString(16)
break
}
}
return chars.join("")
} }
function randomStr(l) { function randomStr(l) {
// 生成する文字列に含める文字セット // 生成する文字列に含める文字セット
var c = "abcdefghijklmnopqrstuvwxyz0123456789"; var c = 'abcdefghijklmnopqrstuvwxyz0123456789'
var cl = c.length; var cl = c.length
var r = ""; var r = ''
for (var i = 0; i < l; i++) { for (var i = 0; i < l; i++) {
r += c[Math.floor(Math.random() * cl)]; r += c[Math.floor(Math.random() * cl)]
} }
return r; return r
} }
function rgbToHex(color) { function rgbToHex(color) {
// HEXに変換したものを代入する変数 // HEXに変換したものを代入する変数
var hex = ''; var hex = ''
// 第1引数がHEXのとき変換処理は必要ないのでそのままreturn // 第1引数がHEXのとき変換処理は必要ないのでそのままreturn
// IE8の場合はjQueryのcss()関数でHEXを返すので除外 // 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; return color
} }
// 正規表現 // 正規表現
var regex = color.match(/^rgb\(([0-9.]+),\s*([0-9.]+),\s*([0-9.]+)\)$/); var regex = color.match(/^rgb\(([0-9.]+),\s*([0-9.]+),\s*([0-9.]+)\)$/)
// 正規表現でマッチしたとき // 正規表現でマッチしたとき
if (regex) { if (regex) {
var rgb = var rgb = [
[ // RGBからHEXへ変換
// RGBからHEXへ変換 parseInt(regex[1]).toString(16),
parseInt(regex[1]).toString(16), parseInt(regex[2]).toString(16),
parseInt(regex[2]).toString(16), parseInt(regex[3]).toString(16)
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桁になる // rgb(1,1,1)のようなときHEXに変換すると1桁になる
// 1桁のときは前に0を足す // 1桁のときは前に0を足す
if (rgb[i].length == 1) { if (rgb[i].length == 1) {
rgb[i] = '0' + rgb[i]; rgb[i] = '0' + rgb[i]
} }
hex += rgb[i]; hex += rgb[i]
} }
return hex; return hex
} }
console.error(color + ':第1引数はRGB形式で入力'); console.error(color + ':第1引数はRGB形式で入力')
} }
/*マルチバイト用切り出し*/ /*マルチバイト用切り出し*/
$.isSurrogatePear = function (upper, lower) { $.isSurrogatePear = function (upper, lower) {
return 0xD800 <= upper && upper <= 0xDBFF && 0xDC00 <= lower && lower <= 0xDFFF; return 0xd800 <= upper && upper <= 0xdbff && 0xdc00 <= lower && lower <= 0xdfff
}; }
$.mb_strlen = function (str) { $.mb_strlen = function (str) {
var ret = 0; var splitter = new GraphemeSplitter()
for (var i = 0; i < str.length; i++ , ret++) { var arr = splitter.splitGraphemes(str)
var upper = str.charCodeAt(i); return arr.length
var lower = str.length > (i + 1) ? str.charCodeAt(i + 1) : 0; }
if ($.isSurrogatePear(upper, lower)) {
i++;
}
}
return ret;
};
$.mb_substr = function (str, begin, end) { $.mb_substr = function (str, begin, end) {
var ret = ''; //配列にする
for (var i = 0, len = 0; i < str.length; i++ , len++) { var splitter = new GraphemeSplitter()
var upper = str.charCodeAt(i); var arr = splitter.splitGraphemes(str)
var lower = str.length > (i + 1) ? str.charCodeAt(i + 1) : 0; var newarr = []
var s = ''; for (var i = 0; i < arr.length; i++) {
if ($.isSurrogatePear(upper, lower)) { if (i >= begin && i <= end) {
i++; newarr.push(arr[i])
s = String.fromCharCode(upper, lower);
} else {
s = String.fromCharCode(upper);
}
if (begin <= len && len < end) {
ret += s;
} }
} }
return ret; return newarr.join('')
}; }
//ソートするやつ //ソートするやつ
function object_array_sort(data, key, order, fn) { function object_array_sort(data, key, order, fn) {
var num_a = -1; var num_a = -1
var num_b = 1; var num_b = 1
if (order === 'asc') { if (order === 'asc') {
num_a = 1; num_a = 1
num_b = -1; num_b = -1
} }
data = data.sort(function (a, b) { data = data.sort(function (a, b) {
var x = a[key]; var x = a[key]
var y = b[key]; var y = b[key]
if (x > y) return num_a; if (x > y) return num_a
if (x < y) return num_b; if (x < y) return num_b
return 0; return 0
}); })
var arrObj = {}; var arrObj = {}
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
arrObj[data[i]['family']] = data[i]; arrObj[data[i]['family']] = data[i]
} }
data = []; data = []
for (var key in arrObj) { for (var key in arrObj) {
data.push(arrObj[key]); data.push(arrObj[key])
}
fn(data)
}
function setLog(txt1, txt2, txt3) {
//url,statuscode,responsetext
var text = new Date().toUTCString()
text = text + ',' + txt1 + ',' + txt2 + ',' + escapeCsv(txt3)
console.error(text)
postMessage(['log', text], '*')
}
function escapeCsv(str) {
if (!str) {
return str
}
var result
result = str.toString().replace(/\"/g, '""')
if (result.indexOf(',') >= 0) {
result = '"' + result + '"'
}
return result
}
function evalAttr(json, attr, lenCk) {
if (json[attr]) {
if (lenCk) {
if (json[attr][0]) {
return true
} else {
return false
}
} else {
return true
}
} else {
return false
}
}
function statusModel(now) {
if (!now) {
var now = new Date().toString()
}
return {
id: '',
created_at: now,
in_reply_to_id: null,
in_reply_to_account_id: null,
sensitive: false,
spoiler_text: '',
visibility: 'public',
language: 'en',
uri: '',
url: '',
replies_count: 0,
reblogs_count: 0,
favourites_count: 0,
favourited: false,
reblogged: false,
muted: false,
bookmarked: false,
pinned: false,
content: '<p><i>No status here</i></p>',
reblog: null,
application: {
name: null,
website: null
},
account: {
id: '',
username: '',
acct: '',
display_name: '',
locked: false,
bot: false,
created_at: now,
note: '',
url: '',
avatar: '',
avatar_static: '',
header: '',
header_static: '',
followers_count: 0,
following_count: 0,
statuses_count: 0,
last_status_at: now,
emojis: [],
fields: []
},
media_attachments: [],
mentions: [],
tags: [],
card: null,
poll: null
} }
fn(data);
} }
localStorage.removeItem("errors");

View File

@@ -1,136 +1,263 @@
//TL取得 //TL取得
var websocket
function tl(data) { function tl(data) {
var tlid = 0; var tlid = 0
var acct_id = $("#post-acct-sel").val(); if (websocket) {
var type = $("#type-sel").val(); websocket.close()
var domain = localStorage.getItem("domain_" + acct_id); }
var acct_id = $('#post-acct-sel').val()
var type = $('#type-sel').val()
var domain = localStorage.getItem('domain_' + acct_id)
//タグの場合はカラム追加して描画 //タグの場合はカラム追加して描画
if (!type) { if (!type) {
//デフォルト //デフォルト
var type = "local"; var type = 'local'
} }
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
$("#notice_nano").text(cap(type, data) + " TL(" + localStorage.getItem( $('#notice_nano').text(
"user_" + acct_id) + "@" + domain + ")"); cap(type, data) + ' TL(' + localStorage.getItem('user_' + acct_id) + '@' + domain + ')'
var start = "https://" + domain + "/api/v1/timelines/" + com(type, data); )
var start = 'https://' + domain + '/api/v1/timelines/' + com(type, data)
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
}, }
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
console.error(error); response.text().then(function(text) {
}).then(function (json) { setLog(response.url, response.status, text)
var templete = parse([json[0]], '', acct_id, tlid); })
$("#timeline_nano").html(templete); }
jQuery("time.timeago").timeago(); return response.json()
}); })
.catch(function(error) {
console.error(error)
})
.then(function(json) {
var templete = parse([json[0]], '', acct_id, tlid)
$('#timeline_nano').html(templete)
jQuery('time.timeago').timeago()
$('#menu').addClass('hide')
})
//Streaming接続 //Streaming接続
var websocket = []; var tlid = 0
var tlid = 0; if (type == 'home') {
if (type == "home") { var start = 'wss://' + domain + '/api/v1/streaming/?stream=user&access_token=' + at
var start = "wss://" + domain + } else if (type == 'pub') {
"/api/v1/streaming/?stream=user&access_token=" + at; var start = 'wss://' + domain + '/api/v1/streaming/?stream=public&access_token=' + at
} else if (type == "pub") { } else if (type == 'local') {
var start = "wss://" + domain + var start = 'wss://' + domain + '/api/v1/streaming/?stream=public:local&access_token=' + at
"/api/v1/streaming/?stream=public&access_token=" + at; } else if (type == 'tag') {
} else if (type == "local") { var start =
var start = "wss://" + domain + 'wss://' + domain + '/api/v1/streaming/?stream=hashtag&tag=' + data + '&access_token=' + at
"/api/v1/streaming/?stream=public:local&access_token=" + at;
} else if (type == "tag") {
var start = "wss://" + domain +
"/api/v1/streaming/?stream=hashtag&tag=" + data + "&access_token=" + at;
} }
var wsid = websocket.length; websocket = new WebSocket(start)
websocket[wsid] = new WebSocket(start); websocket.onopen = function(mess) {
websocket[wsid].onopen = function (mess) { $('#notice_icon_' + tlid).removeClass('red-text')
$("#notice_icon_" + tlid).removeClass("red-text");
} }
websocket[wsid].onmessage = function (mess) { websocket.onmessage = function(mess) {
var typeA = JSON.parse(mess.data).event; var typeA = JSON.parse(mess.data).event
if (typeA == "delete") { if (typeA == 'update') {
var obj = JSON.parse(mess.data).payload; var obj = JSON.parse(JSON.parse(mess.data).payload)
$("[toot-id=" + JSON.parse(mess.data).payload + "]").hide(); var templete = parse([obj], '', acct_id, tlid)
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove(); jQuery('time.timeago').timeago()
} else if (typeA == "update") { $('#timeline_nano').html(templete)
var obj = JSON.parse(JSON.parse(mess.data).payload);
var templete = parse([obj], '', acct_id, tlid);
$("#timeline_nano").html(templete);
}
websocket[wsid].onclose = function (mess) {
console.error("Close Streaming API:" + type);
} }
} }
websocket[wsid].onerror = function (error) { websocket.onerror = function(error) {
console.error('WebSocket Error ' + error); console.error('WebSocket Error ' + error)
}; }
websocket.onclose = function(mess) {
console.error('Close Streaming API:' + type)
}
} }
//TLのタイトル //TLのタイトル
function cap(type, data) { function cap(type, data) {
if (type == "home") { if (type == 'home') {
return "Home" return 'Home'
} else if (type == "local") { } else if (type == 'local') {
return "Local" return 'Local'
} else if (type == "pub") { } else if (type == 'pub') {
return "Public" return 'Public'
} else if (type == "tag") { } else if (type == 'tag') {
return "#" + data return '#' + data
} else if (type == "list") { } else if (type == 'list') {
return "List(id:" + data + ")" return 'List(id:' + data + ')'
} else if (type == "notf") { } else if (type == 'notf') {
return "Notification" return 'Notification'
} }
} }
//TLのURL //TLのURL
function com(type, data) { function com(type, data) {
if (type == "home") { if (type == 'home') {
return "home?" return 'home?'
} else if (type == "local") { } else if (type == 'local') {
return "public?local=true&" return 'public?local=true&'
} else if (type == "pub") { } else if (type == 'pub') {
return "public?" return 'public?'
} else if (type == "tag") { } else if (type == 'tag') {
return "tag/" + data + "?" return 'tag/' + data + '?'
} }
if (type == "list") { if (type == 'list') {
return "list/" + data + "?" return 'list/' + data + '?'
} }
} }
//TLのアイコン //TLのアイコン
function icon(type) { function icon(type) {
if (type == "home") { if (type == 'home') {
return "home" return 'home'
} else if (type == "local") { } else if (type == 'local') {
return "people_outline" return 'people_outline'
} else if (type == "pub") { } else if (type == 'pub') {
return "language" return 'language'
} else if (type == "tag") { } else if (type == 'tag') {
return "search" return 'search'
} }
if (type == "list") { if (type == 'list') {
return "subject" return 'subject'
} }
} }
function todo() { } function todo() {}
function todc() { } function todc() {}
function hide() { } function hide() {}
$(function ($) { $(function($) {
//キーボードショートカット //キーボードショートカット
$(window).keydown(function (e) { $(window).keydown(function(e) {
var hasFocus = $('input').is(':focus'); var hasFocus = $('input').is(':focus')
var hasFocus2 = $('textarea').is(':focus'); var hasFocus2 = $('textarea').is(':focus')
//Ctrl+Enter:投稿 //Ctrl+Enter:投稿
if (event.ctrlKey) { if (event.ctrlKey) {
if (e.keyCode === 13) { if (e.keyCode === 13) {
post(); post()
return false; return false
} }
} }
}); })
}); })
function set() {
$('#menu').toggleClass('hide')
if ($('#menu').hasClass('hide')) {
$('#setting').text('Setting')
} else {
$('#setting').text('Close')
}
}
var multi = localStorage.getItem('multi')
if (!multi) {
var obj = [
{
at: localStorage.getItem(localStorage.getItem('domain_' + acct_id) + '_at'),
name: localStorage.getItem('name_' + acct_id),
domain: localStorage.getItem('domain_' + acct_id),
user: localStorage.getItem('user_' + acct_id),
prof: localStorage.getItem('prof_' + acct_id)
}
]
var json = JSON.stringify(obj)
localStorage.setItem('multi', json)
} else {
var obj = JSON.parse(multi)
}
var templete
var last = localStorage.getItem('last-use')
var sel
Object.keys(obj).forEach(function(key) {
var acct = obj[key]
var list = key * 1 + 1
if (key == last) {
sel = 'selected'
} else {
sel = ''
}
templete = `<option value="${key}" ${sel}>${acct.user}@${acct.domain}</option>`
$('#post-acct-sel').append(templete)
})
function mov() {
return false
}
function resetmv() {
return false
}
function post() {
var acct_id = $('#post-acct-sel').val()
var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = 'https://' + domain + '/api/v1/statuses'
var str = $('#textarea').val()
var toot = {
status: str
}
var vis = loadVis(acct_id)
toot.visibility = vis
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(toot))
httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) {
if (this.status !== 200) {
setLog(start, this.status, this.response)
}
$('#textarea').val('')
}
}
}
function loadVis(acct_id) {
var vist = localStorage.getItem('vis')
if (!vist) {
return 'public'
} else {
if (vist == 'memory') {
var memory = localStorage.getItem('vis-memory-' + acct_id)
if (!memory) {
memory = 'public'
}
return memory
} else if (vist == 'server' || vist == 'useapi') {
var multi = localStorage.getItem('multi')
var obj = JSON.parse(multi)
var memory = obj[acct_id]['vis']
if (!memory) {
memory = 'public'
}
return memory
} else {
return vist
}
}
}
function loader() {
var acct_id = $('#post-acct-sel').val()
console.log(loadVis(acct_id))
$('#vis-sel').val(loadVis(acct_id))
}
loader()
$('textarea').height(15) //init
$('textarea').css('lineHeight', '1rem') //init
$('textarea').on('input', function(evt) {
if (evt.target.scrollHeight > evt.target.offsetHeight) {
$(evt.target).height(evt.target.scrollHeight)
} else {
var lineHeight = Number(
$(evt.target)
.css('lineHeight')
.split('px')[0]
)
while (true) {
$(evt.target).height($(evt.target).height() - lineHeight)
if (evt.target.scrollHeight > evt.target.offsetHeight) {
$(evt.target).height(evt.target.scrollHeight)
break
}
}
}
})

View File

@@ -1,172 +1,251 @@
var electron = require("electron"); var electron = require('electron')
const shell = electron.shell; const shell = electron.shell
var ipc = electron.ipcRenderer; var ipc = electron.ipcRenderer
onmessage = function (e) { //title bar
if (e.data[0] == "openUrl") { const customTitlebar = require('custom-electron-titlebar')
urls = e.data[1].match(/https?:\/\/(.+)/); window.addEventListener('DOMContentLoaded', () => {
if (urls) { document.title = 'TheDesk'
shell.openExternal(e.data[1]); ipc.send('acsCheck', '')
} ipc.send('frameCheck', '')
} else if (e.data[0] == "sendSinmpleIpc") { ipc.on('frame', function(event, args) {
ipc.send(e.data[1], "") const file = location.href.substr(-10)
} else if (e.data[0] == "dialogStore") { if (
ipc.send("dialogStore", e.data[1]) file == 'index.html' ||
} else if (e.data[0] == "bmpImage") { file == '/acct.html' ||
ipc.send('bmp-image', e.data[1]); file == 'tting.html'
} else if (e.data[0] == "dialogCW") { ) {
ipc.send("dialogCW", e.data[1]) new customTitlebar.Titlebar({
} else if (e.data[0] == "nativeNotf") { backgroundColor: customTitlebar.Color.fromHex('#000'),
console.log(e.data[1]) titleHorizontalAlignment: 'right',
ipc.send('native-notf', e.data[1]); icon: '../../img/desk.png'
} else if (e.data[0] == "dialogClient") { })
ipc.send("dialogClient", e.data[1]) }
} else if (e.data[0] == "generalDL") { })
ipc.send('general-dl', e.data[1]);
} else if (e.data[0] == "openFinder") {
ipc.send('open-finder', e.data[1]);
} else if (e.data[0] == "columnDel") {
ipc.send('column-del', e.data[1]);
} else if (e.data[0] == "lang") {
ipc.send('lang', e.data[1]);
} else if (e.data[0] == "exportSettings") {
ipc.send('exportSettings', e.data[1]);
} else if (e.data[0] == "exportSettingsCoreComplete") {
ipc.send('export', e.data[1]);
} else if (e.data[0] == "importSettings") {
ipc.send('importSettings', e.data[1]);
} else if (e.data[0] == "customSound") {
ipc.send('customSound', e.data[1]);
} else if (e.data[0] == "themeJsonDelete") {
ipc.send('theme-json-delete', e.data[1]);
} else if (e.data[0] == "themeJsonCreate") {
ipc.send('theme-json-create', e.data[1]);
} else if (e.data[0] == "themeJsonRequest") {
ipc.send('theme-json-request', e.data[1]);
} else if (e.data[0] == "ha") {
ipc.send('ha', e.data[1]);
} else if (e.data[0] == "aboutData") {
ipc.send('aboutData', "");
} else if (e.data[0] == "itunes") {
console.log("NowPlaying")
ipc.send("itunes", e.data[1])
} else if (e.data[0] == "themeCSSRequest") {
ipc.send('theme-css-request', e.data[1]);
} else if (e.data[0] == "customCSSRequest") {
ipc.send('custom-css-request', e.data[1]);
} else if (e.data[0] == "downloadButton") {
ipc.send('download-btn', e.data[1]);
} else if (e.data[0] == "nano") {
ipc.send('nano', null);
}
}
//version.js
ipc.send("getPlatform", "")
ipc.on('platform', function (event, args) {
localStorage.setItem("platform", args[0])
localStorage.setItem("bit", args[1])
localStorage.setItem("about", JSON.stringify([args[2], args[3], args[4], args[5]]))
}) })
ipc.on('reload', function (event, arg) { onmessage = function(e) {
location.reload(); if (e.data[0] == 'openUrl') {
urls = e.data[1].match(/https?:\/\/(.+)/)
if (urls) {
shell.openExternal(e.data[1])
}
} else if (e.data[0] == 'sendSinmpleIpc') {
ipc.send(e.data[1], '')
} else if (e.data[0] == 'dialogStore') {
ipc.send('dialogStore', e.data[1])
} else if (e.data[0] == 'bmpImage') {
ipc.send('bmp-image', e.data[1])
} else if (e.data[0] == 'resizeImage') {
ipc.send('resize-image', e.data[1])
} else if (e.data[0] == 'stampImage') {
ipc.send('stamp-image', e.data[1])
} else if (e.data[0] == 'dialogCW') {
ipc.send('dialogCW', e.data[1])
} else if (e.data[0] == 'nativeNotf') {
console.log(e.data[1])
ipc.send('native-notf', e.data[1])
} else if (e.data[0] == 'dialogClient') {
ipc.send('dialogClient', e.data[1])
} else if (e.data[0] == 'generalDL') {
ipc.send('general-dl', e.data[1])
} else if (e.data[0] == 'openFinder') {
ipc.send('openFinder', e.data[1])
} else if (e.data[0] == 'columnDel') {
ipc.send('column-del', e.data[1])
} else if (e.data[0] == 'lang') {
ipc.send('lang', e.data[1])
} else if (e.data[0] == 'exportSettings') {
ipc.send('exportSettings', e.data[1])
} else if (e.data[0] == 'exportSettingsCoreComplete') {
ipc.send('export', e.data[1])
} else if (e.data[0] == 'importSettings') {
ipc.send('importSettings', e.data[1])
} else if (e.data[0] == 'customSound') {
ipc.send('customSound', e.data[1])
} else if (e.data[0] == 'themeJsonDelete') {
ipc.send('theme-json-delete', e.data[1])
} else if (e.data[0] == 'themeJsonCreate') {
ipc.send('theme-json-create', e.data[1])
} else if (e.data[0] == 'themeJsonRequest') {
ipc.send('theme-json-request', e.data[1])
} else if (e.data[0] == 'ha') {
ipc.send('ha', e.data[1])
} else if (e.data[0] == 'frameSet') {
ipc.send('frameSet', e.data[1])
} else if (e.data[0] == 'ua') {
ipc.send('ua', e.data[1])
} else if (e.data[0] == 'aboutData') {
ipc.send('aboutData', '')
} else if (e.data[0] == 'itunes') {
console.log('NowPlaying')
ipc.send('itunes', e.data[1])
} else if (e.data[0] == 'themeCSSRequest') {
ipc.send('theme-css-request', e.data[1])
} else if (e.data[0] == 'customCSSRequest') {
ipc.send('custom-css-request', e.data[1])
} else if (e.data[0] == 'downloadButton') {
ipc.send('download-btn', e.data[1])
} else if (e.data[0] == 'nano') {
ipc.send('nano', null)
} else if (e.data[0] == 'asReadComp') {
ipc.send('sendMarkersComplete', null)
} else if (e.data[0] == 'copy') {
ipc.send('copy', e.data[1])
} else if (e.data[0] == 'log') {
ipc.send('log', e.data[1])
}
}
//version.js
ipc.send('getPlatform', '')
ipc.on('platform', function(event, args) {
localStorage.setItem('platform', args[0])
localStorage.setItem('bit', args[1])
localStorage.setItem('about', JSON.stringify([args[2], args[3], args[4], args[5]]))
})
ipc.on('reload', function(event, arg) {
location.reload()
}) })
//Native Notf //Native Notf
ipc.on('shownotf', function (event, args) { ipc.on('shownotf', function(event, args) {
if (args["type"] == "toot") { if (args['type'] == 'toot') {
postMessage(["details", [id, acct_id]], "*") postMessage(['details', [id, acct_id]], '*')
} else if (args["type"] == "userdata") { } else if (args['type'] == 'userdata') {
postMessage(["udg", [user, acct_id]], "*") postMessage(['udg', [user, acct_id]], '*')
} }
}) })
//first.js //first.js
ipc.on('custom-css-response', function (event, arg) { ipc.on('custom-css-response', function(event, arg) {
if (arg == "") { return false; } if (arg == '') {
var styleNode = document.createElement("style"); return false
styleNode.setAttribute("type", "text/css") }
var styleNode = document.createElement('style')
styleNode.setAttribute('type', 'text/css')
var content = document.createTextNode(arg) var content = document.createTextNode(arg)
styleNode.append(content) styleNode.append(content)
document.getElementsByTagName("head")[0].append(styleNode) document.getElementsByTagName('head')[0].append(styleNode)
}) })
ipc.on('theme-css-response', function (event, arg) { ipc.on('theme-css-response', function(event, arg) {
if (arg == "") { return false; } if (arg == '') {
var styleNode = document.createElement("style"); return false
styleNode.setAttribute("type", "text/css") }
var styleNode = document.createElement('style')
styleNode.setAttribute('type', 'text/css')
var content = document.createTextNode(arg) var content = document.createTextNode(arg)
styleNode.append(content) styleNode.append(content)
document.getElementsByTagName("head")[0].append(styleNode) document.getElementsByTagName('head')[0].append(styleNode)
}) })
//img.js //img.js
ipc.on('bmp-img-comp', function (event, b64) { ipc.on('bmp-img-comp', function(event, b64) {
postMessage(["media", [b64[0], "image/png", b64[1]]], "*") if (b64[2]) {
}); var stamped = true
//ui,img.js } else {
ipc.on('general-dl-prog', function (event, arg) { var stamped = false
console.log("Progress: " + arg); }
postMessage(['media', [b64[0], 'image/png', b64[1], stamped]], '*')
}) })
ipc.on('general-dl-message', function (event, arg) { ipc.on('resizeJudgement', function(event, b64) {
var argC = arg.replace(/\\/g, "\\\\") + "\\\\."; var resize = localStorage.getItem('uploadCrop') * 1
console.log("saved") if (resize > 0) {
postMessage(["toastSaved", [arg, argC]], "*") var element = new Image()
var width
element.onload = function() {
var width = element.naturalWidth
var height = element.naturalHeight
if (width > resize || height > resize) {
ipc.send('resize-image', [b64[0], resize])
} else {
postMessage(['media', [b64[0], 'image/png', b64[1]]], '*')
}
}
element.src = 'data:image/png;base64,' + b64[0]
} else {
postMessage(['media', [b64[0], 'image/png', b64[1]]], '*')
}
})
//ui,img.js
ipc.on('general-dl-prog', function(event, arg) {
console.log('Progress: ' + arg)
})
ipc.on('general-dl-message', function(event, arg) {
var argC = arg.replace(/\\/g, '\\\\')
console.log('saved')
postMessage(['toastSaved', [arg, argC]], '*')
}) })
//setting.js //setting.js
ipc.on('langres', function (event, arg) { ipc.on('langres', function(event, arg) {
location.href = "../" + arg + "/setting.html" location.href = '../' + arg + '/setting.html'
}); })
ipc.on('exportSettingsFile', function (event, arg) { ipc.on('exportSettingsFile', function(event, arg) {
postMessage(["exportSettingsCore", arg], "*") postMessage(['exportSettingsCore', arg], '*')
}); })
ipc.on('exportAllComplete', function (event, arg) { ipc.on('exportAllComplete', function(event, arg) {
postMessage(["alert", "Complete"], "*") postMessage(['alert', 'Complete'], '*')
}); })
ipc.on('config', function (event, arg) { ipc.on('config', function(event, arg) {
postMessage(["importSettingsCore", arg], "*") postMessage(['importSettingsCore', arg], '*')
}); })
ipc.on('savefolder', function (event, arg) { ipc.on('savefolder', function(event, arg) {
localStorage.setItem("savefolder", arg); localStorage.setItem('savefolder', arg)
}); })
ipc.on('font-list', function (event, arg) { ipc.on('font-list', function(event, arg) {
postMessage(["fontList", arg], "*") postMessage(['fontList', arg], '*')
}); })
ipc.on('customSoundRender', function (event, args) { ipc.on('customSoundRender', function(event, args) {
postMessage(["customSoundSave", [args[0], args[1]]], "*") postMessage(['customSoundSave', [args[0], args[1]]], '*')
}); })
ipc.on('theme-json-list-response', function (event, args) { ipc.on('theme-json-list-response', function(event, args) {
postMessage(["ctLoadCore", args], "*") postMessage(['ctLoadCore', args], '*')
}); })
ipc.on('theme-json-delete-complete', function (event, args) { ipc.on('theme-json-delete-complete', function(event, args) {
postMessage(["ctLoad", ""], "*") postMessage(['ctLoad', ''], '*')
}); })
ipc.on('theme-json-response', function (event, args) { ipc.on('theme-json-response', function(event, args) {
postMessage(["customConnect", args], "*") postMessage(['customConnect', args], '*')
}); })
ipc.on('theme-json-create-complete', function (event, args) { ipc.on('theme-json-create-complete', function(event, args) {
postMessage(["clearCustomImport", ""], "*") if(args != '') alert(args)
postMessage(["ctLoad", ""], "*") postMessage(['clearCustomImport', ''], '*')
}); postMessage(['ctLoad', ''], '*')
})
//spotify.js //spotify.js
ipc.on('itunes-np', function (event, arg) { ipc.on('itunes-np', function(event, arg) {
postMessage(["npCore", arg], "*") postMessage(['npCore', arg], '*')
}) })
//tips.js //tips.js
ipc.on('memory', function (event, arg) { ipc.on('memory', function(event, arg) {
var use = arg[0]; var use = arg[0]
var cpu = arg[1]; var cpu = arg[1]
var total = arg[2] var total = arg[2]
postMessage(["renderMem", [use, cpu, total]], "*") postMessage(['renderMem', [use, cpu, total]], '*')
})
//log
ipc.on('logData', function(event, args) {
postMessage(['logData', args], '*')
}) })
//update.html //update.html
ipc.on('prog', function (event, arg) { ipc.on('prog', function(event, arg) {
postMessage(["updateProg", arg], "*") postMessage(['updateProg', arg], '*')
}) })
ipc.on('mess', function (event, arg) { ipc.on('mess', function(event, arg) {
postMessage(["updateMess", arg], "*") postMessage(['updateMess', arg], '*')
}) })
var webviewDom = document.getElementById('webview'); //misc
ipc.on('asRead', function(event, arg) {
postMessage(['asRead', ''], '*')
})
ipc.on('asReadEnd', function(event, arg) {
postMessage(['asReadEnd', ''], '*')
})
ipc.on('accessibility', function(event, arg) {
postMessage(['accessibility', 'true'], '*')
})
var webviewDom = document.getElementById('webview')
if (webviewDom) { if (webviewDom) {
webviewDom.addEventListener('new-window', function (e) { webviewDom.addEventListener('new-window', function(e) {
shell.openExternal(e.url); shell.openExternal(e.url)
}); })
} }

View File

@@ -1,18 +1,15 @@
/*! https://mths.be/punycode v1.4.1 by @mathias */ /*! https://mths.be/punycode v1.4.1 by @mathias */
;(function(root) { ;(function(root) {
/** Detect free variables */ /** Detect free variables */
var freeExports = typeof exports == 'object' && exports && var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports
!exports.nodeType && exports; var freeModule = typeof module == 'object' && module && !module.nodeType && module
var freeModule = typeof module == 'object' && module && var freeGlobal = typeof global == 'object' && global
!module.nodeType && module;
var freeGlobal = typeof global == 'object' && global;
if ( if (
freeGlobal.global === freeGlobal || freeGlobal.global === freeGlobal ||
freeGlobal.window === freeGlobal || freeGlobal.window === freeGlobal ||
freeGlobal.self === freeGlobal freeGlobal.self === freeGlobal
) { ) {
root = freeGlobal; root = freeGlobal
} }
/** /**
@@ -21,39 +18,33 @@
* @type Object * @type Object
*/ */
var punycode, var punycode,
/** Highest positive signed 32-bit float value */
/** Highest positive signed 32-bit float value */ maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 /** Bootstring parameters */
base = 36,
/** Bootstring parameters */ tMin = 1,
base = 36, tMax = 26,
tMin = 1, skew = 38,
tMax = 26, damp = 700,
skew = 38, initialBias = 72,
damp = 700, initialN = 128, // 0x80
initialBias = 72, delimiter = '-', // '\x2D'
initialN = 128, // 0x80 /** Regular expressions */
delimiter = '-', // '\x2D' regexPunycode = /^xn--/,
regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
/** Regular expressions */ regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
regexPunycode = /^xn--/, /** Error messages */
regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars errors = {
regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators overflow: 'Overflow: input needs wider integers to process',
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
/** Error messages */ 'invalid-input': 'Invalid input'
errors = { },
'overflow': 'Overflow: input needs wider integers to process', /** Convenience shortcuts */
'not-basic': 'Illegal input >= 0x80 (not a basic code point)', baseMinusTMin = base - tMin,
'invalid-input': 'Invalid input' floor = Math.floor,
}, stringFromCharCode = String.fromCharCode,
/** Temporary variable */
/** Convenience shortcuts */ key
baseMinusTMin = base - tMin,
floor = Math.floor,
stringFromCharCode = String.fromCharCode,
/** Temporary variable */
key;
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
@@ -64,7 +55,7 @@
* @returns {Error} Throws a `RangeError` with the applicable error message. * @returns {Error} Throws a `RangeError` with the applicable error message.
*/ */
function error(type) { function error(type) {
throw new RangeError(errors[type]); throw new RangeError(errors[type])
} }
/** /**
@@ -76,12 +67,12 @@
* @returns {Array} A new array of values returned by the callback function. * @returns {Array} A new array of values returned by the callback function.
*/ */
function map(array, fn) { function map(array, fn) {
var length = array.length; var length = array.length
var result = []; var result = []
while (length--) { while (length--) {
result[length] = fn(array[length]); result[length] = fn(array[length])
} }
return result; return result
} }
/** /**
@@ -95,19 +86,19 @@
* function. * function.
*/ */
function mapDomain(string, fn) { function mapDomain(string, fn) {
var parts = string.split('@'); var parts = string.split('@')
var result = ''; var result = ''
if (parts.length > 1) { if (parts.length > 1) {
// In email addresses, only the domain name should be punycoded. Leave // In email addresses, only the domain name should be punycoded. Leave
// the local part (i.e. everything up to `@`) intact. // the local part (i.e. everything up to `@`) intact.
result = parts[0] + '@'; result = parts[0] + '@'
string = parts[1]; string = parts[1]
} }
// Avoid `split(regex)` for IE8 compatibility. See #17. // Avoid `split(regex)` for IE8 compatibility. See #17.
string = string.replace(regexSeparators, '\x2E'); string = string.replace(regexSeparators, '\x2E')
var labels = string.split('.'); var labels = string.split('.')
var encoded = map(labels, fn).join('.'); var encoded = map(labels, fn).join('.')
return result + encoded; return result + encoded
} }
/** /**
@@ -125,28 +116,29 @@
*/ */
function ucs2decode(string) { function ucs2decode(string) {
var output = [], var output = [],
counter = 0, counter = 0,
length = string.length, length = string.length,
value, value,
extra; extra
while (counter < length) { while (counter < length) {
value = string.charCodeAt(counter++); value = string.charCodeAt(counter++)
if (value >= 0xD800 && value <= 0xDBFF && counter < length) { if (value >= 0xd800 && value <= 0xdbff && counter < length) {
// high surrogate, and there is a next character // high surrogate, and there is a next character
extra = string.charCodeAt(counter++); extra = string.charCodeAt(counter++)
if ((extra & 0xFC00) == 0xDC00) { // low surrogate if ((extra & 0xfc00) == 0xdc00) {
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); // low surrogate
output.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000)
} else { } else {
// unmatched surrogate; only append this code unit, in case the next // unmatched surrogate; only append this code unit, in case the next
// code unit is the high surrogate of a surrogate pair // code unit is the high surrogate of a surrogate pair
output.push(value); output.push(value)
counter--; counter--
} }
} else { } else {
output.push(value); output.push(value)
} }
} }
return output; return output
} }
/** /**
@@ -159,15 +151,15 @@
*/ */
function ucs2encode(array) { function ucs2encode(array) {
return map(array, function(value) { return map(array, function(value) {
var output = ''; var output = ''
if (value > 0xFFFF) { if (value > 0xffff) {
value -= 0x10000; value -= 0x10000
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); output += stringFromCharCode(((value >>> 10) & 0x3ff) | 0xd800)
value = 0xDC00 | value & 0x3FF; value = 0xdc00 | (value & 0x3ff)
} }
output += stringFromCharCode(value); output += stringFromCharCode(value)
return output; return output
}).join(''); }).join('')
} }
/** /**
@@ -181,15 +173,15 @@
*/ */
function basicToDigit(codePoint) { function basicToDigit(codePoint) {
if (codePoint - 48 < 10) { if (codePoint - 48 < 10) {
return codePoint - 22; return codePoint - 22
} }
if (codePoint - 65 < 26) { if (codePoint - 65 < 26) {
return codePoint - 65; return codePoint - 65
} }
if (codePoint - 97 < 26) { if (codePoint - 97 < 26) {
return codePoint - 97; return codePoint - 97
} }
return base; return base
} }
/** /**
@@ -206,7 +198,7 @@
function digitToBasic(digit, flag) { function digitToBasic(digit, flag) {
// 0..25 map to ASCII a..z or A..Z // 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9 // 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5)
} }
/** /**
@@ -215,13 +207,13 @@
* @private * @private
*/ */
function adapt(delta, numPoints, firstTime) { function adapt(delta, numPoints, firstTime) {
var k = 0; var k = 0
delta = firstTime ? floor(delta / damp) : delta >> 1; delta = firstTime ? floor(delta / damp) : delta >> 1
delta += floor(delta / numPoints); delta += floor(delta / numPoints)
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { for (; /* no initialization */ delta > (baseMinusTMin * tMax) >> 1; k += base) {
delta = floor(delta / baseMinusTMin); delta = floor(delta / baseMinusTMin)
} }
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); return floor(k + ((baseMinusTMin + 1) * delta) / (delta + skew))
} }
/** /**
@@ -234,95 +226,91 @@
function decode(input) { function decode(input) {
// Don't use UCS-2 // Don't use UCS-2
var output = [], var output = [],
inputLength = input.length, inputLength = input.length,
out, out,
i = 0, i = 0,
n = initialN, n = initialN,
bias = initialBias, bias = initialBias,
basic, basic,
j, j,
index, index,
oldi, oldi,
w, w,
k, k,
digit, digit,
t, t,
/** Cached calculation results */ /** Cached calculation results */
baseMinusT; baseMinusT
// Handle the basic code points: let `basic` be the number of input code // Handle the basic code points: let `basic` be the number of input code
// points before the last delimiter, or `0` if there is none, then copy // points before the last delimiter, or `0` if there is none, then copy
// the first basic code points to the output. // the first basic code points to the output.
basic = input.lastIndexOf(delimiter); basic = input.lastIndexOf(delimiter)
if (basic < 0) { if (basic < 0) {
basic = 0; basic = 0
} }
for (j = 0; j < basic; ++j) { for (j = 0; j < basic; ++j) {
// if it's not a basic code point // if it's not a basic code point
if (input.charCodeAt(j) >= 0x80) { if (input.charCodeAt(j) >= 0x80) {
error('not-basic'); error('not-basic')
} }
output.push(input.charCodeAt(j)); output.push(input.charCodeAt(j))
} }
// Main decoding loop: start just after the last delimiter if any basic code // Main decoding loop: start just after the last delimiter if any basic code
// points were copied; start at the beginning otherwise. // points were copied; start at the beginning otherwise.
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { for (index = basic > 0 ? basic + 1 : 0; index < inputLength /* no final expression */; ) {
// `index` is the index of the next character to be consumed. // `index` is the index of the next character to be consumed.
// Decode a generalized variable-length integer into `delta`, // Decode a generalized variable-length integer into `delta`,
// which gets added to `i`. The overflow checking is easier // which gets added to `i`. The overflow checking is easier
// if we increase `i` as we go, then subtract off its starting // if we increase `i` as we go, then subtract off its starting
// value at the end to obtain `delta`. // value at the end to obtain `delta`.
for (oldi = i, w = 1, k = base; /* no condition */; k += base) { for (oldi = i, w = 1, k = base /* no condition */; ; k += base) {
if (index >= inputLength) { if (index >= inputLength) {
error('invalid-input'); error('invalid-input')
} }
digit = basicToDigit(input.charCodeAt(index++)); digit = basicToDigit(input.charCodeAt(index++))
if (digit >= base || digit > floor((maxInt - i) / w)) { if (digit >= base || digit > floor((maxInt - i) / w)) {
error('overflow'); error('overflow')
} }
i += digit * w; i += digit * w
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias
if (digit < t) { if (digit < t) {
break; break
} }
baseMinusT = base - t; baseMinusT = base - t
if (w > floor(maxInt / baseMinusT)) { if (w > floor(maxInt / baseMinusT)) {
error('overflow'); error('overflow')
} }
w *= baseMinusT; w *= baseMinusT
} }
out = output.length + 1; out = output.length + 1
bias = adapt(i - oldi, out, oldi == 0); bias = adapt(i - oldi, out, oldi == 0)
// `i` was supposed to wrap around from `out` to `0`, // `i` was supposed to wrap around from `out` to `0`,
// incrementing `n` each time, so we'll fix that now: // incrementing `n` each time, so we'll fix that now:
if (floor(i / out) > maxInt - n) { if (floor(i / out) > maxInt - n) {
error('overflow'); error('overflow')
} }
n += floor(i / out); n += floor(i / out)
i %= out; i %= out
// Insert `n` at position `i` of the output // Insert `n` at position `i` of the output
output.splice(i++, 0, n); output.splice(i++, 0, n)
} }
return ucs2encode(output); return ucs2encode(output)
} }
/** /**
@@ -334,109 +322,105 @@
*/ */
function encode(input) { function encode(input) {
var n, var n,
delta, delta,
handledCPCount, handledCPCount,
basicLength, basicLength,
bias, bias,
j, j,
m, m,
q, q,
k, k,
t, t,
currentValue, currentValue,
output = [], output = [],
/** `inputLength` will hold the number of code points in `input`. */ /** `inputLength` will hold the number of code points in `input`. */
inputLength, inputLength,
/** Cached calculation results */ /** Cached calculation results */
handledCPCountPlusOne, handledCPCountPlusOne,
baseMinusT, baseMinusT,
qMinusT; qMinusT
// Convert the input in UCS-2 to Unicode // Convert the input in UCS-2 to Unicode
input = ucs2decode(input); input = ucs2decode(input)
// Cache the length // Cache the length
inputLength = input.length; inputLength = input.length
// Initialize the state // Initialize the state
n = initialN; n = initialN
delta = 0; delta = 0
bias = initialBias; bias = initialBias
// Handle the basic code points // Handle the basic code points
for (j = 0; j < inputLength; ++j) { for (j = 0; j < inputLength; ++j) {
currentValue = input[j]; currentValue = input[j]
if (currentValue < 0x80) { if (currentValue < 0x80) {
output.push(stringFromCharCode(currentValue)); output.push(stringFromCharCode(currentValue))
} }
} }
handledCPCount = basicLength = output.length; handledCPCount = basicLength = output.length
// `handledCPCount` is the number of code points that have been handled; // `handledCPCount` is the number of code points that have been handled;
// `basicLength` is the number of basic code points. // `basicLength` is the number of basic code points.
// Finish the basic string - if it is not empty - with a delimiter // Finish the basic string - if it is not empty - with a delimiter
if (basicLength) { if (basicLength) {
output.push(delimiter); output.push(delimiter)
} }
// Main encoding loop: // Main encoding loop:
while (handledCPCount < inputLength) { while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled already. Find the next // All non-basic code points < n have been handled already. Find the next
// larger one: // larger one:
for (m = maxInt, j = 0; j < inputLength; ++j) { for (m = maxInt, j = 0; j < inputLength; ++j) {
currentValue = input[j]; currentValue = input[j]
if (currentValue >= n && currentValue < m) { if (currentValue >= n && currentValue < m) {
m = currentValue; m = currentValue
} }
} }
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
// but guard against overflow // but guard against overflow
handledCPCountPlusOne = handledCPCount + 1; handledCPCountPlusOne = handledCPCount + 1
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
error('overflow'); error('overflow')
} }
delta += (m - n) * handledCPCountPlusOne; delta += (m - n) * handledCPCountPlusOne
n = m; n = m
for (j = 0; j < inputLength; ++j) { for (j = 0; j < inputLength; ++j) {
currentValue = input[j]; currentValue = input[j]
if (currentValue < n && ++delta > maxInt) { if (currentValue < n && ++delta > maxInt) {
error('overflow'); error('overflow')
} }
if (currentValue == n) { if (currentValue == n) {
// Represent delta as a generalized variable-length integer // Represent delta as a generalized variable-length integer
for (q = delta, k = base; /* no condition */; k += base) { for (q = delta, k = base /* no condition */; ; k += base) {
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias
if (q < t) { if (q < t) {
break; break
} }
qMinusT = q - t; qMinusT = q - t
baseMinusT = base - t; baseMinusT = base - t
output.push( output.push(stringFromCharCode(digitToBasic(t + (qMinusT % baseMinusT), 0)))
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) q = floor(qMinusT / baseMinusT)
);
q = floor(qMinusT / baseMinusT);
} }
output.push(stringFromCharCode(digitToBasic(q, 0))); output.push(stringFromCharCode(digitToBasic(q, 0)))
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength)
delta = 0; delta = 0
++handledCPCount; ++handledCPCount
} }
} }
++delta; ++delta
++n; ++n
} }
return output.join(''); return output.join('')
} }
/** /**
@@ -452,10 +436,8 @@
*/ */
function toUnicode(input) { function toUnicode(input) {
return mapDomain(input, function(string) { return mapDomain(input, function(string) {
return regexPunycode.test(string) return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string
? decode(string.slice(4).toLowerCase()) })
: string;
});
} }
/** /**
@@ -471,10 +453,8 @@
*/ */
function toASCII(input) { function toASCII(input) {
return mapDomain(input, function(string) { return mapDomain(input, function(string) {
return regexNonASCII.test(string) return regexNonASCII.test(string) ? 'xn--' + encode(string) : string
? 'xn--' + encode(string) })
: string;
});
} }
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
@@ -486,7 +466,7 @@
* @memberOf punycode * @memberOf punycode
* @type String * @type String
*/ */
'version': '1.4.1', version: '1.4.1',
/** /**
* An object of methods to convert from JavaScript's internal character * An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to Unicode code points, and back. * representation (UCS-2) to Unicode code points, and back.
@@ -494,40 +474,35 @@
* @memberOf punycode * @memberOf punycode
* @type Object * @type Object
*/ */
'ucs2': { ucs2: {
'decode': ucs2decode, decode: ucs2decode,
'encode': ucs2encode encode: ucs2encode
}, },
'decode': decode, decode: decode,
'encode': encode, encode: encode,
'toASCII': toASCII, toASCII: toASCII,
'toUnicode': toUnicode toUnicode: toUnicode
}; }
/** Expose `punycode` */ /** Expose `punycode` */
// Some AMD build optimizers, like r.js, check for specific condition patterns // Some AMD build optimizers, like r.js, check for specific condition patterns
// like the following: // like the following:
if ( if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
typeof define == 'function' &&
typeof define.amd == 'object' &&
define.amd
) {
define('punycode', function() { define('punycode', function() {
return punycode; return punycode
}); })
} else if (freeExports && freeModule) { } else if (freeExports && freeModule) {
if (module.exports == freeExports) { if (module.exports == freeExports) {
// in Node.js, io.js, or RingoJS v0.8.0+ // in Node.js, io.js, or RingoJS v0.8.0+
freeModule.exports = punycode; freeModule.exports = punycode
} else { } else {
// in Narwhal or RingoJS v0.7.0- // in Narwhal or RingoJS v0.7.0-
for (key in punycode) { for (key in punycode) {
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key])
} }
} }
} else { } else {
// in Rhino or a web browser // in Rhino or a web browser
root.punycode = punycode; root.punycode = punycode
} }
})(this)
}(this));

File diff suppressed because one or more lines are too long

View File

@@ -1,316 +1,346 @@
//BBCodeとMarkdownの入力・パーサー //BBCodeとMarkdownの入力・パーサー
//アカウント変えた時にBBとかMDとか //アカウント変えた時にBBとかMDとか
function mdCheck() { function mdCheck() {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
var profimg = localStorage.getItem("prof_" + acct_id); var profimg = localStorage.getItem('prof_' + acct_id)
if (!profimg) { if (!profimg) {
profimg = "../../img/missing.svg"; profimg = '../../img/missing.svg'
} }
$("#acct-sel-prof").attr("src", profimg); $('#acct-sel-prof').attr('src', profimg)
if (localStorage.getItem("post_" + acct_id)) { if (localStorage.getItem('post_' + acct_id)) {
$("#toot-post-btn").text(localStorage.getItem("post_" + acct_id) + "(" + localStorage.getItem("domain_" + acct_id) + ")"); $('#toot-post-btn').text(
localStorage.getItem('post_' + acct_id) +
'(' +
localStorage.getItem('domain_' + acct_id) +
')'
)
} else { } else {
$("#toot-post-btn").text(lang.lang_toot + "(" + localStorage.getItem("domain_" + acct_id) + ")"); $('#toot-post-btn').text(lang.lang_toot + '(' + localStorage.getItem('domain_' + acct_id) + ')')
} }
if (!localStorage.getItem("bb_" + acct_id) && !localStorage.getItem("md_" + acct_id)) { if (!localStorage.getItem('bb_' + acct_id) && !localStorage.getItem('md_' + acct_id)) {
$(".markdown").addClass("hide"); $('.markdown').addClass('hide')
$(".anti-markdown").addClass("hide"); $('.anti-markdown').addClass('hide')
} else { } else {
$(".anti-markdown").removeClass("hide"); $('.anti-markdown').removeClass('hide')
} }
if ($(".markdown").hasClass("hide")) { if ($('.markdown').hasClass('hide')) {
localStorage.setItem("md", "hide"); localStorage.setItem('md', 'hide')
} else { } else {
localStorage.removeItem("md"); localStorage.removeItem('md')
} }
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
if (domain == "itabashi.0j0.jp") { if (domain == 'itabashi.0j0.jp') {
$("#limited-button").removeClass("hide"); $('#limited-button').removeClass('hide')
} else { } else {
$("#limited-button").addClass("hide"); $('#limited-button').addClass('hide')
} }
if (domain == "kirishima.cloud") { if (domain == 'kirishima.cloud') {
$("#faicon-btn").show(); $('#faicon-btn').show()
} else { } else {
$("#faicon-btn").hide(); $('#faicon-btn').hide()
} }
if (domain == "imastodon.net") { if (domain == 'imastodon.net') {
trendTag(); trendTag()
} else { } else {
$("#trendtag").html(""); $('#trendtag').html('')
} }
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem('mode_' + domain) == 'misskey') {
M.toast({ html: lang.lang_bbmd_misskey, displayLength: 5000 }) M.toast({ html: lang.lang_bbmd_misskey, displayLength: 5000 })
} }
if (idata[domain + "_letters"]) { if (idata[domain + '_letters']) {
$("#textarea").attr("data-length", idata[domain + "_letters"]) $('#textarea').attr('data-length', idata[domain + '_letters'])
} else { } else {
$("#textarea").attr("data-length", 500) var maxletters = localStorage.getItem('letters_' + acct_id)
} if (maxletters > 0) {
if (idata[domain + "_glitch"] === "true") { $('#textarea').attr('data-length', maxletters)
$("#local-button").removeClass("hide");
} else {
$("#local-button").addClass("hide");
}
var multi = localStorage.getItem("multi");
if (multi) {
var obj = JSON.parse(multi);
if (obj[acct_id].background && obj[acct_id].background != "def" && obj[acct_id].text && obj[acct_id].text != "def") {
$("#toot-post-btn").removeClass("indigo");
$("#toot-post-btn").css("background-color", "#" + obj[acct_id].background);
$("#toot-post-btn").css("color", obj[acct_id].text);
} else { } else {
$("#toot-post-btn").css("background-color", ""); $('#textarea').attr('data-length', 500)
$("#toot-post-btn").css("color", "");
$("#toot-post-btn").addClass("indigo");
} }
} }
loadVis(); if (idata[domain + '_glitch'] === 'true') {
$('#local-button').removeClass('hide')
} else {
$('#local-button').addClass('hide')
}
var multi = localStorage.getItem('multi')
if (multi) {
var obj = JSON.parse(multi)
if (
obj[acct_id].background &&
obj[acct_id].background != 'def' &&
obj[acct_id].text &&
obj[acct_id].text != 'def'
) {
$('#toot-post-btn').removeClass('indigo')
$('#toot-post-btn').css('background-color', '#' + obj[acct_id].background)
$('#toot-post-btn').css('color', obj[acct_id].text)
} else {
$('#toot-post-btn').css('background-color', '')
$('#toot-post-btn').css('color', '')
$('#toot-post-btn').addClass('indigo')
}
}
loadVis()
} }
//BOXのトグルボタン //BOXのトグルボタン
function mdToggle() { function mdToggle() {
$(".markdown").toggleClass("hide"); $('.markdown').toggleClass('hide')
$(".anti-markdown").toggleClass("hide"); $('.anti-markdown').toggleClass('hide')
if ($(".markdown").hasClass("hide")) { if ($('.markdown').hasClass('hide')) {
localStorage.setItem("md", "hide"); localStorage.setItem('md', 'hide')
} else { } else {
localStorage.removeItem("md"); localStorage.removeItem('md')
} }
} }
//最初に読み込みます(MD対応インスタンスかチェック) //最初に読み込みます(MD対応インスタンスかチェック)
if (localStorage.getItem("md") == "hide") { if (localStorage.getItem('md') == 'hide') {
$(".markdown").addClass("hide"); $('.markdown').addClass('hide')
$(".anti-markdown").removeClass("hide"); $('.anti-markdown').removeClass('hide')
} }
//タグを選んだ時に(BB版) //タグを選んだ時に(BB版)
function tagsel(tag) { function tagsel(tag) {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
if (!localStorage.getItem("bb_" + acct_id)) { if (!localStorage.getItem('bb_' + acct_id)) {
return false; return false
} }
if (tag == "large" || tag == "size" || tag == "color" || tag == "colorhex") { if (tag == 'large' || tag == 'size' || tag == 'color' || tag == 'colorhex') {
var sub = $("#" + tag).val(); var sub = $('#' + tag).val()
var sub = sub.replace(/#/g, ""); var sub = sub.replace(/#/g, '')
surroundHTML(tag + "=" + sub, tag); surroundHTML(tag + '=' + sub, tag)
} else if (tag == "flip=vertical" || tag == "flip=horizontal") { } else if (tag == 'flip=vertical' || tag == 'flip=horizontal') {
surroundHTML(tag, "flip"); surroundHTML(tag, 'flip')
} else { } else {
surroundHTML(tag, tag); surroundHTML(tag, tag)
} }
$("#textarea").focus(); $('#textarea').focus()
} }
//HTMLをエスケープしてXSSを防ぐ //HTMLをエスケープしてXSSを防ぐ
function escape_html(string) { function escape_html(string) {
if (typeof string !== 'string') { if (typeof string !== 'string') {
return string; return string
} }
return string.replace(/[&'`"<>]/g, function (match) { return string.replace(/[&'`"<>]/g, function(match) {
return { return {
'&': '&amp;', '&': '&amp;',
"'": '&#x27;', "'": '&#x27;',
'`': '&#x60;', '`': '&#x60;',
'"': '&quot;', '"': '&quot;',
'<': '&lt;', '<': '&lt;',
'>': '&gt;', '>': '&gt;'
}[match] }[match]
}); })
} }
//テキストボックスで選択したやつをタグで囲む(BB版) //テキストボックスで選択したやつをタグで囲む(BB版)
function surroundHTML(tagS, tagE) { function surroundHTML(tagS, tagE) {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
if (!localStorage.getItem("bb_" + acct_id)) { if (!localStorage.getItem('bb_' + acct_id)) {
return false; return false
} }
var target = document.getElementById("textarea"); var target = document.getElementById('textarea')
var pos = getAreaRange(target); var pos = getAreaRange(target)
var val = target.value; var val = target.value
var range = val.slice(pos.start, pos.end); var range = val.slice(pos.start, pos.end)
var beforeNode = val.slice(0, pos.start); var beforeNode = val.slice(0, pos.start)
var afterNode = val.slice(pos.end); var afterNode = val.slice(pos.end)
var insertNode; var insertNode
if (range || pos.start != pos.end) { if (range || pos.start != pos.end) {
insertNode = '[' + tagS + ']' + range + '[/' + tagE + ']'; insertNode = '[' + tagS + ']' + range + '[/' + tagE + ']'
target.value = beforeNode + insertNode + afterNode; target.value = beforeNode + insertNode + afterNode
} } else if (pos.start == pos.end) {
insertNode = '[' + tagS + ']' + '[/' + tagE + ']'
else if (pos.start == pos.end) { target.value = beforeNode + insertNode + afterNode
insertNode = '[' + tagS + ']' + '[/' + tagE + ']';
target.value = beforeNode + insertNode + afterNode;
} }
} }
function markdown(tag, ck, br, space) { function markdown(tag, ck, br, space) {
if (space == "before") { if (space == 'before') {
tagE = tag; tagE = tag
tag = " " + tag; tag = ' ' + tag
} else { } else {
tagE = tag; tagE = tag
} }
surroundMD(tag, tagE, ck, br); surroundMD(tag, tagE, ck, br)
$("#textarea").focus(); $('#textarea').focus()
} }
function surroundMD(tagS, tagE, ck, br) { function surroundMD(tagS, tagE, ck, br) {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
if (!localStorage.getItem("md_" + acct_id)) { if (!localStorage.getItem('md_' + acct_id)) {
return false; return false
} }
var target = document.getElementById("textarea"); var target = document.getElementById('textarea')
var pos = getAreaRange(target); var pos = getAreaRange(target)
var val = target.value; var val = target.value
var range = val.slice(pos.start, pos.end); var range = val.slice(pos.start, pos.end)
var beforeNode = val.slice(0, pos.start); var beforeNode = val.slice(0, pos.start)
var afterNode = val.slice(pos.end); var afterNode = val.slice(pos.end)
var insertNode; var insertNode
if (br == "yes") { if (br == 'yes') {
var br = "\n"; var br = '\n'
} else { } else {
var br = ""; var br = ''
} }
if ((range || pos.start != pos.end) && ck == "yes") { if ((range || pos.start != pos.end) && ck == 'yes') {
insertNode = tagS + range + tagE; insertNode = tagS + range + tagE
target.value = beforeNode + insertNode + br + afterNode; target.value = beforeNode + insertNode + br + afterNode
} } else if (pos.start == pos.end || ck == 'no') {
insertNode = tagS + range
else if (pos.start == pos.end || ck == "no") { target.value = beforeNode + insertNode + br + afterNode
insertNode = tagS + range;
target.value = beforeNode + insertNode + br + afterNode;
} }
} }
//テキストボックスの前後チェック //テキストボックスの前後チェック
function getAreaRange(obj) { function getAreaRange(obj) {
var pos = new Object(); var pos = new Object()
if (window.getSelection()) { if (window.getSelection()) {
pos.start = obj.selectionStart; pos.start = obj.selectionStart
pos.end = obj.selectionEnd; pos.end = obj.selectionEnd
} }
return pos; return pos
} }
//Markdownのリンク挿入 //Markdownのリンク挿入
function markdownLink() { function markdownLink() {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
if (!localStorage.getItem("md_" + acct_id)) { if (!localStorage.getItem('md_' + acct_id)) {
return false; return false
} }
var linkIns = "[" + $("#linkt").val() + "]" + "(" + $("#link2").val() + ")"; var linkIns = '[' + $('#linkt').val() + ']' + '(' + $('#link2').val() + ')'
if (linkIns != "[]()") { if (linkIns != '[]()') {
$("#textarea").val($("#textarea").val() + linkIns); $('#textarea').val($('#textarea').val() + linkIns)
$("#linkt").val(""); $('#linkt').val('')
$("#link2").val(""); $('#link2').val('')
$("#textarea").focus(); $('#textarea').focus()
} }
} }
//Markdownのimg挿入 //Markdownのimg挿入
function markdownImage() { function markdownImage() {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
if (!localStorage.getItem("md_" + acct_id)) { if (!localStorage.getItem('md_' + acct_id)) {
return false; return false
} }
var imgIns = "![" + $("#image").val() + "]" + "(" + $("#image2").val() + ")"; var imgIns = '![' + $('#image').val() + ']' + '(' + $('#image2').val() + ')'
if (imgIns != "![]()") { if (imgIns != '![]()') {
$("#textarea").val($("#textarea").val() + imgIns); $('#textarea').val($('#textarea').val() + imgIns)
$("#image").val(""); $('#image').val('')
$("#image2").val(""); $('#image2').val('')
$("#textarea").focus(); $('#textarea').focus()
} }
} }
//文字数をチェック(hタグ用) //文字数をチェック(hタグ用)
function str_count(all, part) { function str_count(all, part) {
return (all.match(new RegExp(part, "g")) || []).length; return (all.match(new RegExp(part, 'g')) || []).length
} }
//プレビュー //プレビュー
function preview() { function preview() {
$("#preview-field").show(); $('#preview-field').show()
$("#toot-field").hide(); $('#toot-field').hide()
$("#preview-btn").hide(); $('#preview-btn').hide()
var bb = escape_html($("#textarea").val()); var bb = escape_html($('#textarea').val())
//quote //quote
var bb = bb.replace(/>(.+)$/g, '<blockquote>$1<\/blockquote>'); var bb = bb.replace(/>(.+)$/g, '<blockquote>$1</blockquote>')
//spin //spin
var bb = bb.replace(/\[spin\](.+)\[\/spin\]/g, '<span class="fa fa-spin">$1<\/span>'); var bb = bb.replace(/\[spin\](.+)\[\/spin\]/g, '<span class="fa fa-spin">$1</span>')
//pulse //pulse
var bb = bb.replace(/\[pulse\](.+)\[\/pulse\]/g, '<span class="bbcode-pulse-loading">$1<\/span>'); var bb = bb.replace(/\[pulse\](.+)\[\/pulse\]/g, '<span class="bbcode-pulse-loading">$1</span>')
//large //large
var bb = bb.replace(/\[large=([0-9]{1,2})x\](.+)\[\/large\]/g, '<span class="fa fa-$1x">$2<\/span>'); var bb = bb.replace(
/\[large=([0-9]{1,2})x\](.+)\[\/large\]/g,
'<span class="fa fa-$1x">$2</span>'
)
//vertical //vertical
var bb = bb.replace(/\[flip=vertical\](.+)\[\/flip\]/g, '<span class="fa fa-flip-vertical">$1<\/span>'); var bb = bb.replace(
/\[flip=vertical\](.+)\[\/flip\]/g,
'<span class="fa fa-flip-vertical">$1</span>'
)
//horizontal //horizontal
var bb = bb.replace(/\[flip=horizontal\](.+)\[\/flip\]/g, '<span class="fa fa-flip-horizontal">$1<\/span>'); var bb = bb.replace(
/\[flip=horizontal\](.+)\[\/flip\]/g,
'<span class="fa fa-flip-horizontal">$1</span>'
)
//b //b
var bb = bb.replace(/\[b\](.+)\[\/b\]/g, '<b>$1<\/b>'); var bb = bb.replace(/\[b\](.+)\[\/b\]/g, '<b>$1</b>')
//i //i
var bb = bb.replace(/\[i\](.+)\[\/i\]/g, '<i>$1<\/i>'); var bb = bb.replace(/\[i\](.+)\[\/i\]/g, '<i>$1</i>')
//u //u
var bb = bb.replace(/\[u\](.+)\[\/u\]/g, '<u>$1<\/u>'); var bb = bb.replace(/\[u\](.+)\[\/u\]/g, '<u>$1</u>')
//s //s
var bb = bb.replace(/\[s\](.+)\[\/s\]/g, '<s>$1<\/s>'); var bb = bb.replace(/\[s\](.+)\[\/s\]/g, '<s>$1</s>')
//size //size
var bb = bb.replace(/\[size=([0-9]{1,2})\](.+)\[\/size\]/g, '<span style="font-size:$1px">$2<\/span>'); var bb = bb.replace(
/\[size=([0-9]{1,2})\](.+)\[\/size\]/g,
'<span style="font-size:$1px">$2</span>'
)
//colorhex //colorhex
var bb = bb.replace(/\[colorhex=([A-Fa-f0-9]+)\](.+)\[\/colorhex\]/g, '<span style="color:#$1">$2<\/span>'); var bb = bb.replace(
/\[colorhex=([A-Fa-f0-9]+)\](.+)\[\/colorhex\]/g,
'<span style="color:#$1">$2</span>'
)
//code //code
var bb = bb.replace(/`(.+)`/g, '<code>$1<\/code>'); var bb = bb.replace(/`(.+)`/g, '<code>$1</code>')
//head //head
var m; var m
m = bb.match(/^#{1,6}(.+)$/gm); m = bb.match(/^#{1,6}(.+)$/gm)
if (m) { if (m) {
for (let i = 0; i < m.length; i++) { for (let i = 0; i < m.length; i++) {
var t = m[i].match(/^#{1,6}(.+)$/); var t = m[i].match(/^#{1,6}(.+)$/)
var indexct = '<h' + str_count(m[i], "#") + '>' + t[1] + '</h' + str_count(m[i], "#") + '>'; var indexct = '<h' + str_count(m[i], '#') + '>' + t[1] + '</h' + str_count(m[i], '#') + '>'
var bb = bb.replace(new RegExp(m[i], ""), indexct); var bb = bb.replace(new RegExp(m[i], ''), indexct)
} }
} }
//list(ul) //list(ul)
var li; var li
li = bb.match(/^\- (.+)$/gm); li = bb.match(/^\- (.+)$/gm)
if (li) { if (li) {
for (let l = 0; l < li.length; l++) { for (let l = 0; l < li.length; l++) {
var u = li[l].match(/^\- (.+)$/); var u = li[l].match(/^\- (.+)$/)
var listUl = '<li>' + u[1] + '</li>'; var listUl = '<li>' + u[1] + '</li>'
if (l == 0) { if (l == 0) {
listUl = '<ul>' + listUl; listUl = '<ul>' + listUl
} }
if (l == li.length - 1) { if (l == li.length - 1) {
listUl = listUl + '</ul>'; listUl = listUl + '</ul>'
} }
var bb = bb.replace(new RegExp(li[l], ""), listUl); var bb = bb.replace(new RegExp(li[l], ''), listUl)
} }
} }
//list(ol) //list(ol)
var li; var li
li = bb.match(/^1\. (.+)$/gm); li = bb.match(/^1\. (.+)$/gm)
if (li) { if (li) {
for (let l = 0; l < li.length; l++) { for (let l = 0; l < li.length; l++) {
var u = li[l].match(/^1\. (.+)$/); var u = li[l].match(/^1\. (.+)$/)
var listUl = '<li>' + u[1] + '</li>'; var listUl = '<li>' + u[1] + '</li>'
if (l === 0) { if (l === 0) {
listUl = '<ol>' + listUl; listUl = '<ol>' + listUl
} }
if (l === li.length - 1) { if (l === li.length - 1) {
listUl = listUl + '</ol>'; listUl = listUl + '</ol>'
} }
var bb = bb.replace(new RegExp(li[l], ""), listUl); var bb = bb.replace(new RegExp(li[l], ''), listUl)
} }
} }
//img //img
var bb = bb.replace(/!\[(.+)\]\((https:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)\)/g, '<img src="$2" text="$1" style="width:100%">'); var bb = bb.replace(
/!\[(.+)\]\((https:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)\)/g,
'<img src="$2" text="$1" style="width:100%">'
)
//link //link
var bb = bb.replace(/\[(.+)\]\((https?:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)\)/g, '<a href="$2" target="_blank">$1<\/a>'); var bb = bb.replace(
bb = nl2br(bb); /\[(.+)\]\((https?:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)\)/g,
bb = bb.replace(new RegExp("</li><br />", "g"), ""); '<a href="$2" target="_blank">$1</a>'
$("#md-preview").html(bb); )
bb = nl2br(bb)
bb = bb.replace(new RegExp('</li><br />', 'g'), '')
$('#md-preview').html(bb)
} }
//Editで戻る //Editで戻る
function previewEdit() { function previewEdit() {
$("#preview-field").hide(); $('#preview-field').hide()
$("#toot-field").show(); $('#toot-field').show()
$("#preview-btn").show(); $('#preview-btn').show()
$("#md-preview").html(""); $('#md-preview').html('')
} }

View File

@@ -1,227 +1,349 @@
//絵文字ピッカー //絵文字ピッカー
//最初に読み込む //最初に読み込む
$("#emoji-before").addClass("disabled"); $('#emoji-before').addClass('disabled')
$("#emoji-next").addClass("disabled"); $('#emoji-next').addClass('disabled')
//絵文字ボタンのトグル //絵文字ボタンのトグル
function emojiToggle(reaction) { function emojiToggle(reaction) {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
var selin = $("#textarea").prop('selectionStart'); var selin = $('#textarea').prop('selectionStart')
if (!selin) { if (!selin) {
selin = 0; selin = 0
} }
if ($("#emoji").hasClass("hide")) { if ($('#emoji').hasClass('hide')) {
$("#emoji").removeClass("hide") $('#emoji').removeClass('hide')
$("#right-side").show() $('#right-side').show()
$("#right-side").css("width", "300px") $('#right-side').css('width', '300px')
$("#left-side").css("width", "calc(100% - 300px)") $('#left-side').css('width', 'calc(100% - 300px)')
var width = localStorage.getItem("postbox-width"); var width = localStorage.getItem('postbox-width')
if (width) { if (width) {
width = width.replace("px", "") * 1 + 300 width = width.replace('px', '') * 1 + 300
} else { } else {
width = 600 width = 600
} }
$("#post-box").css("width", width + "px") $('#post-box').css('width', width + 'px')
$("#suggest").html(""); $('#suggest').html('')
if (!localStorage.getItem("emoji_" + acct_id)) { if (!localStorage.getItem('emojis_' + acct_id)) {
var html = var html = `<button class="btn waves-effect green" style="width:100%; padding:0; margin-top:0;" onclick="emojiGet('true');">${lang.lang_emoji_get}</button>`
'<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)
$("#emoji-list").html(html);
} else { } else {
emojiList('home', reaction); emojiList('home', reaction)
} }
} else { } else {
$("#poll").addClass("hide") $('#poll').addClass('hide')
$("#right-side").hide() $('#right-side').hide()
$("#right-side").css("width", "300px") $('#right-side').css('width', '300px')
$("#emoji").addClass("hide") $('#emoji').addClass('hide')
$("#suggest").html(""); $('#suggest').html('')
$("#left-side").css("width", "100%") $('#left-side').css('width', '100%')
var width = localStorage.getItem("postbox-width"); var width = localStorage.getItem('postbox-width')
if (width) { if (width) {
width = width.replace("px", "") * 1 width = width.replace('px', '') * 1
} else { } else {
width = 300 width = 300
} }
$("#post-box").css("width", width + "px") $('#post-box').css('width', width + 'px')
} }
} }
//絵文字リスト挿入 //絵文字リスト挿入
function emojiGet(parse, started) { function emojiGet(parse, started) {
$('#emoji-list').text('Loading...'); $('#emoji-list').text('Loading...')
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
if (localStorage.getItem("mode_" + domain) != "misskey") { if (localStorage.getItem('mode_' + domain) != 'misskey') {
var start = "https://" + domain + "/api/v1/custom_emojis"; var start = 'https://' + domain + '/api/v1/custom_emojis'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (parse == "true") {
$('#emoji-list').text('Parsing...');
//絵文字をマストドン公式と同順にソート
json.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(json));
} else {
localStorage.setItem("emoji_" + acct_id, JSON.stringify(json));
} }
localStorage.setItem("emojiseek", 0); })
if (!started) { .then(function(response) {
emojiList('home') if (!response.ok) {
} response.text().then(function(text) {
}); setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
if (parse == 'true') {
$('#emoji-list').text('Parsing...')
var md = {
categorized: {},
uncategorized: []
}
var if_categorized = false
Object.keys(json).forEach(function(key) {
var emoji = json[key]
if (emoji.visible_in_picker) {
var listed = true
} else {
var listed = false
}
if (emoji.category) {
var cat = emoji.category
if (!md['categorized'][cat]) {
md['categorized'][cat] = []
}
md['categorized'][cat].push({
shortcode: emoji.shortcode,
url: emoji.url,
listed: listed
})
if_categorized = true
} else {
md['uncategorized'].push({
shortcode: emoji.shortcode,
url: emoji.url,
listed: listed
})
}
})
console.log(md)
//絵文字をマストドン公式と同順にソート
md['uncategorized'].sort(function(a, b) {
if (a.shortcode < b.shortcode) return -1
if (a.shortcode > b.shortcode) return 1
return 0
})
Object.keys(md['categorized']).forEach(function(key) {
md['categorized'][key].sort(function(a, b) {
if (a.shortcode < b.shortcode) return -1
if (a.shortcode > b.shortcode) return 1
return 0
})
})
md['if_categorized'] = if_categorized
localStorage.setItem('emojis_' + acct_id, JSON.stringify(md))
} else {
localStorage.setItem('emojis_' + acct_id, JSON.stringify(md))
}
localStorage.setItem('emojiseek', 0)
if (!started) {
emojiList('home')
}
})
} else { } else {
var start = "https://" + domain + "/api/meta"; var start = 'https://' + domain + '/api/meta'
fetch(start, { fetch(start, {
method: 'POST', method: 'POST',
headers: { headers: {
'content-type': 'application/json' '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 = []; .then(function(response) {
Object.keys(emojis).forEach(function (key) { if (!response.ok) {
var emoji = emojis[key]; response.text().then(function(text) {
md.push({ setLog(response.url, response.status, text)
"shortcode": emoji.name, })
"url": emoji.url }
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', 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 = { uncategorized: [] }
Object.keys(emojis).forEach(function(key) {
var emoji = emojis[key]
md['uncategorized'].push({
shortcode: emoji.name,
url: emoji.url,
listed: true
})
}) })
}); md['if_categorized'] = false
if (parse == "true") { if (parse == 'true') {
$('#emoji-list').text('Parsing...'); $('#emoji-list').text('Parsing...')
//絵文字をマストドン公式と同順にソート //絵文字をマストドン公式と同順にソート
md.sort(function (a, b) { md['uncategorized'].sort(function(a, b) {
if (a.shortcode < b.shortcode) return -1; if (a.shortcode < b.shortcode) return -1
if (a.shortcode > b.shortcode) return 1; if (a.shortcode > b.shortcode) return 1
return 0; return 0
}); })
localStorage.setItem("emoji_" + acct_id, JSON.stringify(md)); localStorage.setItem('emojis_' + acct_id, JSON.stringify(md))
} else { } else {
localStorage.setItem("emoji_" + acct_id, JSON.stringify(md)); localStorage.setItem('emojis_' + acct_id, JSON.stringify(md))
} }
localStorage.setItem("emojiseek", 0); localStorage.setItem('emojiseek', 0)
if (!started) { if (!started) {
emojiList('home') emojiList('home')
} }
}); })
} }
} }
//リストの描画 //リストの描画
function emojiList(target, reaction) { function emojiList(target, reaction) {
$("#now-emoji").text(lang.lang_emoji_custom); $('#now-emoji').text(lang.lang_emoji_custom)
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
if (reaction && localStorage.getItem("emojiReaction_" + acct_id) != "true") { if(reaction && $('#media').val() == 'misskey') {
console.error("Disabled") var misskeyReact = true
} else {
var misskeyReact = false
}
if (
misskeyReact &&
localStorage.getItem('emojiReaction_' + acct_id) != 'true'
) {
console.error('Disabled')
clear() clear()
hide(); hide()
return false; return false
} }
var start = localStorage.getItem("emojiseek"); var start = localStorage.getItem('emojiseek')
if (target == "next") { if (target == 'next') {
var start = start * 1 + 127; var start = start * 1 + 127
localStorage.setItem("emojiseek", start); localStorage.setItem('emojiseek', start)
} else if (target == "before") { } else if (target == 'before') {
var start = start - 127; var start = start - 127
localStorage.setItem("emojiseek", start); localStorage.setItem('emojiseek', start)
} else { } else {
var start = 0; var start = 0
localStorage.getItem("emojiseek", 0) localStorage.getItem('emojiseek', 0)
} }
var html = ''; var html = ''
var obj = JSON.parse(localStorage.getItem("emoji_" + acct_id)); var raw = JSON.parse(localStorage.getItem('emojis_' + acct_id))
var num = obj.length; console.log(raw)
if (raw.if_categorized) {
var obj = [
{
divider: true,
cat: lang.lang_emoji_uncat
}
]
var cats = raw['uncategorized']
obj = obj.concat(cats)
Object.keys(raw['categorized']).forEach(function(key) {
var cats = raw['categorized'][key]
obj = obj.concat([
{
divider: true,
cat: key
}
])
obj = obj.concat(cats)
})
} else {
var obj = raw['uncategorized']
}
console.log(obj)
var num = obj.length
if (num < start) { if (num < start) {
var start = 0; var start = 0
localStorage.setItem("emojiseek", start); localStorage.setItem('emojiseek', start)
} }
var page = Math.ceil(num / 126); var page = Math.ceil(num / 126)
$("#emoji-sum").text(page); $('#emoji-sum').text(page)
var ct = Math.ceil(start / 126); var ct = Math.ceil(start / 126)
if (ct === 0) { if (ct === 0) {
var ct = 1; if (num > 0) {
$("#emoji-before").addClass("disabled"); var ct = 1
}
$('#emoji-before').addClass('disabled')
} else { } else {
$("#emoji-before").removeClass("disabled"); $('#emoji-before').removeClass('disabled')
} }
$("#emoji-next").removeClass("disabled"); if (page != 1) {
$("#emoji-count").text(ct); $('#emoji-next').removeClass('disabled')
} else {
$('#emoji-next').addClass('disabled')
}
$('#emoji-count').text(ct)
for (i = start; i < start + 126; i++) { for (i = start; i < start + 126; i++) {
var emoji = obj[i]; var emoji = obj[i]
if (emoji) { if (emoji) {
if (reaction) { if (reaction) {
html = html + '<a onclick="emojiReaction(\':' + emoji.shortcode + if (emoji.divider) {
':\')" class="pointer"><img src="' + emoji.url + '" width="20"></a>'; html = html + '<p style="margin-bottom:0">' + emoji.cat + '</p>'
} else {
if (emoji.listed) {
if(misskeyReact) {
var shortcode = `:${emoji.shortcode}:`
} else {
var shortcode = emoji.shortcode
}
html =
html +
`<a onclick="emojiReaction('${shortcode}')" class="pointer"><img src="${emoji.url}" width="20" title="${emoji.shortcode}"></a>`
}
}
} else { } else {
html = html + '<a onclick="emojiInsert(\':' + emoji.shortcode + if (emoji.divider) {
':\')" class="pointer"><img src="' + emoji.url + '" width="20"></a>'; html = html + '<p style="margin-bottom:0">' + emoji.cat + '</p>'
} else {
if (emoji.listed) {
html =
html +
`<a onclick="emojiInsert(':${emoji.shortcode}:')" class="pointer"><img src="${emoji.url}" width="20" title="${emoji.shortcode}"></a>`
}
}
} }
} }
} }
$("#emoji-list").html(html); $('#emoji-list').html(html)
} }
//絵文字など様々なものをテキストボックスに挿入 //絵文字など様々なものをテキストボックスに挿入
function emojiInsert(code, del) { function emojiInsert(code, del) {
var now = $("#textarea").val(); if (localStorage.getItem('emoji-zero-width') == 'yes') {
var selin = $("#textarea").prop('selectionStart'); var blankBefore = ''
if (localStorage.getItem("emoji-zero-width") == "yes") { var blankAfter = ''
var blank = "";
} else { } else {
var blank = " "; var blankBefore = ' '
var blankAfter = ' '
} }
var before = now.substr(0, selin); var textarea = document.querySelector('#textarea')
if (before.slice(-1) != " ") { var sentence = textarea.value
before = before + blank var len = sentence.length
} var pos = textarea.selectionStart
var after = now.substr(selin, now.length); if (del) {
if (after.slice(-1) != " ") { var delLen = del.length
after = blank + after
}
newt = before + code + after;
if (!del) {
$("#textarea").val(newt);
//emoji();
} else { } else {
var regExp = new RegExp(del.replace(/[.*+?^=!:${}()|[\]\/\\]/g, "\\$&"), "g"); var delLen = 0
var now = now.replace(regExp, "");
$("#textarea").val(now + blank + code);
} }
var before = sentence.substr(0, pos - delLen)
$("#textarea").focus(); var last = before.substr(-1, 1)
if (last == ' ') blankBefore = ''
var after = sentence.substr(pos, len)
var start = after.substr(0, 1)
if (start == ' ') blankAfter = ''
if (len == 0) {
var word = code
} else if (len == pos) {
var word = blankBefore + code
} else if (pos == 0) {
var word = code + blankAfter
} else {
var word = blankBefore + code + blankAfter
}
sentence = before + word + after
textarea.value = sentence
} }
//改行挿入 //改行挿入
function brInsert(code) { function brInsert(code) {
if (!$('#post-box').hasClass("appear")) { if (!$('#post-box').hasClass('appear')) {
localStorage.setItem("nohide", true); localStorage.setItem('nohide', true)
show(); show()
} }
var now = $("#textarea").val(); var now = $('#textarea').val()
$("#textarea").val(now + code); $('#textarea').val(now + code)
$("#textarea").focus(); $('#textarea').focus()
} }

View File

@@ -1,219 +1,276 @@
//ドラッグ・アンド・ドロップからアップロードまで。uiのimg.jsとは異なります。 //ドラッグ・アンド・ドロップからアップロードまで。uiのimg.jsとは異なります。
var obj = $("body"); var obj = $('body')
var system; var system
//ドラッグスタート //ドラッグスタート
obj.on('dragstart', function (e) { obj.on('dragstart', function(e) {
system = "locked" system = 'locked'
}); })
//何もなくファイルが通過 //何もなくファイルが通過
obj.on('dragend', function (e) { obj.on('dragend', function(e) {
system = ""; system = ''
}); })
//ドラッグファイルが画面上に //ドラッグファイルが画面上に
obj.on('dragenter', function (e) { obj.on('dragenter', function(e) {
if (system != "locked") { if (system != 'locked') {
$("#drag").css('display', 'flex'); $('#drag').css('display', 'flex')
} }
})
}); $('body').on('dragover', function(e) {
$("body").on('dragover', function (e) { e.stopPropagation()
e.stopPropagation(); e.preventDefault()
e.preventDefault(); })
});
//ドロップした //ドロップした
$("body").on('drop', function (e) { $('body').on('drop', function(e) {
if (system != "locked") { if (system != 'locked') {
$("#drag").css('display', 'none'); $('#drag').css('display', 'none')
e.preventDefault(); e.preventDefault()
var files = e.originalEvent.dataTransfer.files; var files = e.originalEvent.dataTransfer.files
pimg(files); pimg(files)
} }
}); })
//何もなくファイルが通過 //何もなくファイルが通過
$("#drag").on('dragleave', function (e) { $('#drag').on('dragleave', function(e) {
$("#drag").css('display', 'none'); $('#drag').css('display', 'none')
}); })
//複数アップ //複数アップ
function pimg(files) { function pimg(files) {
console.table(files); console.table(files)
for (i = 0; i < files.length; i++) { for (i = 0; i < files.length; i++) {
var dot = files[i].path.match(/\.(.+)$/)[1]; var dot = files[i].path.match(/\.(.+)$/)[1]
if (dot == "bmp" || dot == "BMP") { if (dot == 'bmp' || dot == 'BMP') {
postMessage(["bmpImage", [files[i].path, i]], "*") postMessage(['bmpImage', [files[i].path, i]], '*')
todo(lang.lang_progress); todo(lang.lang_progress)
} else { } else {
handleFileUpload(files[i], obj, i); handleFileUpload(files[i], obj, i)
} }
} }
} }
//ドラッグ・アンド・ドロップを終了 //ドラッグ・アンド・ドロップを終了
function closedrop() { function closedrop() {
$("#drag").css('display', 'none'); $('#drag').css('display', 'none')
} }
//ファイル選択 //ファイル選択
function fileselect() { function fileselect() {
postMessage(["sendSinmpleIpc", "file-select"], "*") postMessage(['sendSinmpleIpc', 'file-select'], '*')
} }
//ファイル読み込み //ファイル読み込み
function handleFileUpload(files, obj, no) { function handleFileUpload(files, obj, no) {
var fr = new FileReader(); var fr = new FileReader()
fr.onload = function (evt) { fr.onload = function(evt) {
var b64 = evt.target.result; var b64 = evt.target.result
$('#b64-box').val(b64); var resize = localStorage.getItem('uploadCrop') * 1
var ret = media(b64, files["type"], no) if (resize > 0) {
var element = new Image()
var width
element.onload = function() {
var width = element.naturalWidth
var height = element.naturalHeight
if (width > resize || height > resize) {
postMessage(['resizeImage', [b64, resize]], '*')
return false
} else {
$('#b64-box').val(b64)
var ret = media(b64, files['type'], no)
}
}
element.src = b64
return false
}
$('#b64-box').val(b64)
var ret = media(b64, files['type'], no)
} }
fr.readAsDataURL(files); fr.readAsDataURL(files)
$("#mec").append(files["name"] + "/"); $('#mec').append(files['name'] + '/')
} }
//ファイルアップロード //ファイルアップロード
function media(b64, type, no) { async function media(b64, type, no, stamped) {
var l = 4; var acct_id = $('#post-acct-sel').val()
var c = "abcdefghijklmnopqrstuvwxyz0123456789"; var domain = localStorage.getItem('domain_' + acct_id)
var cl = c.length; var user = localStorage.getItem('user_' + acct_id)
var r = ""; if ($('#stamp').hasClass('stamp-avail') && !stamped) {
postMessage(['stampImage', [b64, user + '@' + domain]], '*')
return false
}
var l = 4
var c = 'abcdefghijklmnopqrstuvwxyz0123456789'
var cl = c.length
var r = ''
for (var i = 0; i < l; i++) { for (var i = 0; i < l; i++) {
r += c[Math.floor(Math.random() * cl)]; r += c[Math.floor(Math.random() * cl)]
} }
if ($("#media").val()) { if ($('#media').val()) {
$("#media").val($("#media").val() + ',' + "tmp_" + r); $('#media').val($('#media').val() + ',' + 'tmp_' + r)
} else { } else {
$("#media").val("tmp_" + r); $('#media').val('tmp_' + r)
} }
$(".toot-btn-group").prop("disabled", true); $('.toot-btn-group').prop('disabled', true)
$("#post-acct-sel").prop("disabled", true); $('#post-acct-sel').prop('disabled', true)
localStorage.setItem("image", "busy"); localStorage.setItem('image', 'busy')
todo("Image Upload..."); todo('Image Upload...')
var media = toBlob(b64, type); var media = toBlob(b64, type)
var fd = new FormData(); var fd = new FormData()
fd.append('file', media); fd.append('file', media)
var acct_id = $("#post-acct-sel").val(); var at = localStorage.getItem('acct_' + acct_id + '_at')
var domain = localStorage.getItem("domain_" + acct_id); var httpreq = new XMLHttpRequest()
var at = localStorage.getItem("acct_" + acct_id + "_at"); if (localStorage.getItem('mode_' + domain) == 'misskey') {
var httpreq = new XMLHttpRequest(); var start = 'https://' + domain + '/api/drive/files/create'
if (localStorage.getItem("mode_" + domain) == "misskey") { httpreq.open('POST', start, true)
var start = "https://" + domain + "/api/drive/files/create"; httpreq.upload.addEventListener('progress', progshow, false)
httpreq.open('POST', start, true); httpreq.responseType = 'json'
httpreq.upload.addEventListener("progress", progshow, false); if ($('#nsfw').hasClass('nsfw-avail')) {
httpreq.responseType = "json"; var nsfw = true
if ($("#nsfw").hasClass("nsfw-avail")) {
var nsfw = true;
} else { } else {
var nsfw = false; var nsfw = false
} }
var previewer = "url" var previewer = 'url'
fd.append('i', at); fd.append('i', at)
//fd.append('isSensitive', nsfw); httpreq.send(fd)
httpreq.send(fd);
} else { } else {
var previewer = "preview_url" var previewer = 'preview_url'
var start = "https://" + domain + "/api/v1/media"; //v2/media
httpreq.open('POST', start, true); try {
httpreq.upload.addEventListener("progress", progshow, false); var id = await v2MediaUpload(domain, at, fd)
httpreq.responseType = "json"; if(!id) {
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); var start = 'https://' + domain + '/api/v1/media'
httpreq.send(fd); httpreq.open('POST', start, true)
httpreq.upload.addEventListener('progress', progshow, false)
httpreq.responseType = 'json'
httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.send(fd)
} else {
var mediav = $('#media').val()
var regExp = new RegExp('tmp_' + r, 'g')
mediav = mediav.replace(regExp, id)
$('#media').val(mediav)
var html = `<img src="../../img/picture.svg" class="preview-img pointer unknown" data-media="${id}" oncontextmenu="deleteImage('${id}')" onclick="altImage('${acct_id}','${id}')" title="${lang.lang_postimg_delete}">`
$('#preview').append(html)
todc()
if (localStorage.getItem('nsfw_' + acct_id)) {
$('#nsfw').addClass('yellow-text')
$('#nsfw').html('visibility')
$('#nsfw').addClass('nsfw-avail')
}
$('.toot-btn-group').prop('disabled', false)
$('select').formSelect()
$('#mec').text(lang.lang_there)
M.toast({ html: '<span>' + lang.lang_postimg_sync + '</span><button class="btn-flat toast-action" onclick="syncDetail()">Click</button>', displayLength: 3000 })
$('#imgup').text('')
$('#imgsel').show()
localStorage.removeItem('image')
}
} catch {
var start = 'https://' + domain + '/api/v1/media'
httpreq.open('POST', start, true)
httpreq.upload.addEventListener('progress', progshow, false)
httpreq.responseType = 'json'
httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.send(fd)
}
} }
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
if (this.status !== 200) {
setLog(start, this.status, json)
$('.toot-btn-group').prop('disabled', false)
$('select').formSelect()
$('#mec').text(lang.lang_there)
M.toast({ html: this.status + ':' +json, displayLength: 2000 })
$('#imgup').text('')
$('#imgsel').show()
}
if (!json.id) { if (!json.id) {
todc(); todc()
$("#imgup").text(""); $('#imgup').text('')
$(".toot-btn-group").prop("disabled", false); $('.toot-btn-group').prop('disabled', false)
$("#post-acct-sel").prop("disabled", false); $('#post-acct-sel').prop('disabled', false)
$('select').formSelect(); $('select').formSelect()
$("#imgsel").show(); $('#imgsel').show()
M.toast({ html: lang.lang_postimg_failupload, displayLength: 5000 }) M.toast({ html: lang.lang_postimg_failupload, displayLength: 5000 })
return false return false
} }
var img = localStorage.getItem("img"); $('#imgup').text('')
if (json.type.indexOf("image") != -1) { $('.toot-btn-group').prop('disabled', false)
var html = '<img src="' + json[previewer] + '" class="preview-img pointer" data-media="' + json["id"] + '" onclick="deleteImage(\'' + json["id"] + '\')" title="' + lang.lang_postimg_delete + '">'; $('select').formSelect()
$('#preview').append(html); $('#imgsel').show()
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']}" oncontextmenu="deleteImage('${json['id']}')" onclick="altImage('${acct_id}','${json['id']}')" title="${lang.lang_postimg_delete}">`
$('#preview').append(html)
} else { } else {
$('#preview').append(lang.lang_postimg_previewdis); $('#preview').append(lang.lang_postimg_previewdis)
} }
if (!img) { if (!img) {
var img = "no-act"; var img = 'no-act'
} }
if (img != "inline") { if (img != 'inline') {
var mediav = $("#media").val(); var mediav = $('#media').val()
var regExp = new RegExp("tmp_" + r, "g"); var regExp = new RegExp('tmp_' + r, 'g')
mediav = mediav.replace(regExp, json["id"]); mediav = mediav.replace(regExp, json['id'])
$("#media").val(mediav); $('#media').val(mediav)
} }
if (img == "url") { if (img == 'url' && json['text_url']) {
$("#textarea").val($("#textarea").val() + " " + json["text_url"]) $('#textarea').val($('#textarea').val() + ' ' + json['text_url'])
} }
todc();
$(".toot-btn-group").prop("disabled", false);
$('select').formSelect();
$("#mec").text(lang.lang_there);
M.toast({ html: lang.lang_postimg_aftupload, displayLength: 1000 })
$("#imgup").text("");
$("#imgsel").show();
localStorage.removeItem("image");
} }
} }
} }
//Base64からBlobへ //Base64からBlobへ
function toBlob(base64, type) { function toBlob(base64, type) {
var bin = atob(base64.replace(/^.*,/, '')); var bin = atob(base64.replace(/^.*,/, ''))
var buffer = new Uint8Array(bin.length); var buffer = new Uint8Array(bin.length)
for (var i = 0; i < bin.length; i++) { for (var i = 0; i < bin.length; i++) {
buffer[i] = bin.charCodeAt(i); buffer[i] = bin.charCodeAt(i)
} }
// Blobを作成 // Blobを作成
try { try {
var blob = new Blob([new Uint8Array(buffer)], { var blob = new Blob([new Uint8Array(buffer)], {
type: type type: type
}); })
} catch (e) { } catch (e) {
return false; return false
} }
return blob; return blob
} }
//画像を貼り付けたら… //画像を貼り付けたら…
var element = document.querySelector("#textarea"); var element = document.querySelector('#textarea')
element.addEventListener("paste", function (e) { element.addEventListener('paste', function(e) {
if (!e.clipboardData || !e.clipboardData.items) { if (!e.clipboardData || !e.clipboardData.items) {
return true; return true
} }
// DataTransferItemList に画像が含まれいない場合は終了する // DataTransferItemList に画像が含まれいない場合は終了する
var imageItems = [...e.clipboardData.items].filter(i => i.type.startsWith('image')); var imageItems = [...e.clipboardData.items].filter(i => i.type.startsWith('image'))
if (imageItems.length == 0) { if (imageItems.length == 0) {
console.warn("it is not image") console.warn('it is not image')
return true; return true
} }
// ファイルとして得る // ファイルとして得る
// DataTransferItem の kind は file なので getAsString ではなく getAsFile を呼ぶ // DataTransferItem の kind は file なので getAsString ではなく getAsFile を呼ぶ
var imageFile = imageItems[0].getAsFile(); var imageFile = imageItems[0].getAsFile()
var imageType = imageItems[0].type; var imageType = imageItems[0].type
// FileReaderで読み込む // FileReaderで読み込む
var fr = new FileReader(); var fr = new FileReader()
fr.onload = function (e) { fr.onload = function(e) {
// onload内ではe.target.resultにbase64が入っているのであとは煮るなり焼くなり // onload内ではe.target.resultにbase64が入っているのであとは煮るなり焼くなり
var base64 = e.target.result; var base64 = e.target.result
var mediav = $("#media").val(); var mediav = $('#media').val()
if (mediav) { if (mediav) {
var i = mediav.split(",").length; var i = mediav.split(',').length
} }
// DataTransferItem の type に mime tipes があるのでそれを使う // DataTransferItem の type に mime tipes があるのでそれを使う
media(base64, imageType, i) media(base64, imageType, i)
}; }
fr.readAsDataURL(imageFile); fr.readAsDataURL(imageFile)
// 画像以外がペーストされたときのために、元に戻しておく // 画像以外がペーストされたときのために、元に戻しておく
}); })
function deleteImage(key) { function deleteImage(key) {
Swal.fire({ Swal.fire({
title: lang.lang_postimg_delete, title: lang.lang_postimg_delete,
@@ -223,19 +280,148 @@ function deleteImage(key) {
cancelButtonColor: '#d33', cancelButtonColor: '#d33',
confirmButtonText: lang.lang_yesno, confirmButtonText: lang.lang_yesno,
cancelButtonText: lang.lang_no cancelButtonText: lang.lang_no
}).then((result) => { }).then(result => {
if (result.value) { if (result.value) {
var media = $("#media").val(); var media = $('#media').val()
var arr = media.split(","); var arr = media.split(',')
for (var i = 0; i < media.length; i++) { for (var i = 0; i < media.length; i++) {
if (arr[i] == key) { if (arr[i] == key) {
arr.splice(i, 1); arr.splice(i, 1)
break; break
} }
} }
$("#media").val(arr.join(",")); $('#media').val(arr.join(','))
$('#preview [data-media=' + key + ']').remove(); $('#preview [data-media=' + key + ']').remove()
} }
}) })
}
function altImage(acct_id, id) {
var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = 'https://' + domain + '/api/v1/media/' + id
if($('[data-media=' + id + ']').hasClass('unknown')) {
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
Authorization: 'Bearer ' + at
}
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
console.log(json)
$('[data-media=' + id + ']').removeClass('unknown')
if(json.preview_url) {
$('[data-media=' + id + ']').attr('src', json.preview_url)
}
})
} else {
Swal.fire({
title: lang.lang_postimg_desc,
text: lang.lang_postimg_leadContext,
input: 'text',
inputAttributes: {
autocapitalize: 'off'
},
showCancelButton: true,
confirmButtonText: 'Post',
showLoaderOnConfirm: true,
preConfirm: data => {
return fetch(start, {
method: 'PUT',
headers: {
'content-type': 'application/json',
Authorization: 'Bearer ' + at
},
body: JSON.stringify({
description: data
})
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
console.log(json)
$('[data-media=' + id + ']').attr('title', data)
})
},
allowOutsideClick: () => !Swal.isLoading()
}).then(result => {
if (result.value) {
Swal.fire({
title: 'Complete'
})
}
})
}
}
function stamp() {
if ($('#stamp').hasClass('stamp-avail')) {
$('#stamp').html('Off')
$('#stamp').removeClass('stamp-avail')
} else {
$('#stamp').html('On')
$('#stamp').addClass('stamp-avail')
}
}
//v2/media対応
async function v2MediaUpload(domain, at, fd) {
var start = 'https://' + domain + '/api/v2/media'
let promise = await fetch(start, {
method: 'POST',
headers: {
Authorization:
'Bearer ' + at
},
body: fd
})
var json = await promise.json()
if(json.id) {
return json.id
} else {
return false
}
}
function alertProcessUnfinished() {
Swal.fire({
title: lang.lang_post_unfinishedMedia,
type: 'error',
showCancelButton: true,
confirmButtonText: lang.lang_post_retry,
cancelButtonText: lang.lang_no
}).then(result => {
if (result.value) {
post()
}
})
}
function syncDetail() {
Swal.fire({
title: lang.lang_post_syncDetail,
text: lang.lang_post_syncDetailText,
type: 'info'
})
} }

View File

@@ -1,241 +1,278 @@
//Renpost //Renpost
function renote(id, acct_id, remote) { function renote(id, acct_id, remote) {
if ($("#pub_" + id).hasClass("rted")) { if ($('#pub_' + id).hasClass('rted')) {
return false; return false
} }
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/notes/create"; var start = 'https://' + domain + '/api/notes/create'
if (localStorage.getItem("mode_" + domain) != "misskey") { if (localStorage.getItem('mode_' + domain) != 'misskey') {
return false; return false
} }
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify({ i: at, renoteId: id })); httpreq.send(JSON.stringify({ i: at, renoteId: id }))
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
console.log(["Success: renote", json]); if (this.status !== 200) {
$("[toot-id=" + id + "]").addClass("rted"); setLog(start, this.status, json)
$(".rt_" + id).toggleClass("teal-text"); }
} console.log(['Success: renote', json])
} $('[toot-id=' + id + ']').addClass('rted')
$('.rt_' + id).toggleClass('teal-text')
}
}
} }
//Renote //Renote
function renoteqt(id, acct_id) { function renoteqt(id, acct_id) {
localStorage.setItem("nohide", true); localStorage.setItem('nohide', true)
show(); show()
$("#reply").val("renote_" + id); $('#reply').val('renote_' + id)
$("#rec").text("Renote"); $('#rec').text('Renote')
$("#post-acct-sel").val(acct_id); $('#post-acct-sel').val(acct_id)
$("#post-acct-sel").prop("disabled", true); $('#post-acct-sel').prop('disabled', true)
$('select').formSelect(); $('select').formSelect()
$("#textarea").attr("placeholder", lang.lang_misskeyparse_qt); $('#textarea').attr('placeholder', lang.lang_misskeyparse_qt)
$("#textarea").focus(); $('#textarea').focus()
} }
//Reply //Reply
function misskeyreply(id, acct_id) { function misskeyreply(id, acct_id) {
localStorage.setItem("nohide", true); localStorage.setItem('nohide', true)
show(); show()
$("#reply").val(id); $('#reply').val(id)
$("#rec").text("Renote"); $('#rec').text('Renote')
$("#post-acct-sel").val(acct_id); $('#post-acct-sel').val(acct_id)
$("#post-acct-sel").prop("disabled", true); $('#post-acct-sel').prop('disabled', true)
$('select').formSelect(); $('select').formSelect()
$("#textarea").attr("placeholder", lang.lang_misskeyparse_qt); $('#textarea').attr('placeholder', lang.lang_misskeyparse_qt)
$("#textarea").focus(); $('#textarea').focus()
} }
//Reaction //Reaction
function reactiontoggle(id, acct_id, tlid) { function reactiontoggle(id, acct_id, tlid) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/notes/show"; var start = 'https://' + domain + '/api/notes/show'
if (localStorage.getItem("mode_" + domain) != "misskey") { if (localStorage.getItem('mode_' + domain) != 'misskey') {
return false; return false
} }
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify({ i: at, noteId: id })); httpreq.send(JSON.stringify({ i: at, noteId: id }))
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
console.log(["Success: reaction", json]); if (this.status !== 200) {
if (json.reactions) { setLog(start, this.status, json)
var reactions = ["like", "love", "laugh", "hmm", "surprise", "congrats", "angry", "confused", "pudding", "rip"]; }
for (var i = 0; i < reactions.length; i++) { console.log(['Success: reaction', json])
if (json.reactions[reactions[i]]) { if (json.reactions) {
$("#pub_" + id + " .re-" + reactions[i] + "ct").text(json.reactions[reactions[i]]) var reactions = [
$("#pub_" + id + " .re-" + reactions[i]).removeClass("hide") 'like',
} else { 'love',
$("#pub_" + id + " .re-" + reactions[i] + "ct").text(0) 'laugh',
if ($("#pub_" + id + " .reactions").hasClass("fullreact")) { 'hmm',
$("#pub_" + id + " .re-" + reactions[i]).addClass("hide") 'surprise',
} else { 'congrats',
$("#pub_" + id + " .re-" + reactions[i]).removeClass("hide") 'angry',
} 'confused',
$("#pub_" + id + " .re-" + reactions[i] + "ct").text(json.reactions[reactions[i]]) 'pudding',
} 'rip'
} ]
$("#pub_" + id + " .reactions").removeClass("hide"); for (var i = 0; i < reactions.length; i++) {
$("#pub_" + id + " .reactions").toggleClass("fullreact") if (json.reactions[reactions[i]]) {
} else { $('#pub_' + id + ' .re-' + reactions[i] + 'ct').text(json.reactions[reactions[i]])
if ($("#pub_" + id + " .reactions").hasClass("fullreact")) { $('#pub_' + id + ' .re-' + reactions[i]).removeClass('hide')
$("#pub_" + id + " .reactions").addClass("hide") } else {
$("#pub_" + id + " .reactions").removeClass("fullreact") $('#pub_' + id + ' .re-' + reactions[i] + 'ct').text(0)
} else { if ($('#pub_' + id + ' .reactions').hasClass('fullreact')) {
$("#pub_" + id + " .reactions").removeClass("hide"); $('#pub_' + id + ' .re-' + reactions[i]).addClass('hide')
$("#pub_" + id + " .reaction").removeClass("hide"); } else {
$("#pub_" + id + " .reactions").addClass("fullreact"); $('#pub_' + id + ' .re-' + reactions[i]).removeClass('hide')
} }
} $('#pub_' + id + ' .re-' + reactions[i] + 'ct').text(json.reactions[reactions[i]])
} }
} }
$("#pub_" + id + " .freeReact").toggleClass("hide"); $('#pub_' + id + ' .reactions').removeClass('hide')
$('#pub_' + id + ' .reactions').toggleClass('fullreact')
} else {
if ($('#pub_' + id + ' .reactions').hasClass('fullreact')) {
$('#pub_' + id + ' .reactions').addClass('hide')
$('#pub_' + id + ' .reactions').removeClass('fullreact')
} else {
$('#pub_' + id + ' .reactions').removeClass('hide')
$('#pub_' + id + ' .reaction').removeClass('hide')
$('#pub_' + id + ' .reactions').addClass('fullreact')
}
}
}
}
$('#pub_' + id + ' .freeReact').toggleClass('hide')
} }
//reactioncustom //reactioncustom
function reactioncustom(acct_id, id) { function reactioncustom(acct_id, id) {
$("#reply").val(id); $('#reply').val(id)
$("#unreact").hide(); $('#media').val('misskey')
$("#addreact").removeClass("hide"); $('#unreact').hide()
$("#post-acct-sel").val(acct_id); $('#addreact').removeClass('hide')
$('select').formSelect(); $('#post-acct-sel').val(acct_id)
localStorage.setItem("nohide", true); $('select').formSelect()
show() localStorage.setItem('nohide', true)
emojiToggle(true) show()
$("#left-side").hide(); emojiToggle(true)
$("#default-emoji").hide(); $('#left-side').hide()
$('#default-emoji').hide()
} }
function reactRefresh(acct_id, id) { function reactRefresh(acct_id, id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/notes/show"; var start = 'https://' + domain + '/api/notes/show'
var req = {}; var req = {}
req.i = at; req.i = at
req.noteId = id; req.noteId = id
var i = { var i = {
method: "POST", method: 'POST',
body: JSON.stringify(req), body: JSON.stringify(req)
} }
fetch(start, i, fetch(start, i)
).then(function (response) { .then(function(response) {
return response.json(); if (!response.ok) {
}).catch(function (error) { response.text().then(function(text) {
todo(error); setLog(response.url, response.status, text)
console.error(error); })
}).then(function (json) { }
if (!json) { return response.json()
return false; })
} .catch(function(error) {
var poll = ""; todo(error)
if (json.error) { setLog(start, 'JSON', error)
$("[toot-id=" + id + "]").hide(); console.error(error)
$("[toot-id=" + id + "]").remove(); })
} else { .then(function(json) {
reactRefreshCore(json) if (!json) {
} return false
}); }
var poll = ''
if (json.error) {
$('[toot-id=' + id + ']').hide()
$('[toot-id=' + id + ']').remove()
} else {
reactRefreshCore(json)
}
})
} }
function reactRefreshCore(json) { function reactRefreshCore(json) {
var id = json.id; var id = json.id
if (json.reactions) { if (json.reactions) {
$("#pub_" + id + " .reactions").removeClass("hide") $('#pub_' + id + ' .reactions').removeClass('hide')
var regExp = new RegExp(":", "g"); var regExp = new RegExp(':', 'g')
Object.keys(json.reactions).forEach(function (keye) { Object.keys(json.reactions).forEach(function(keye) {
keyeClass = keye.replace(regExp, ''); keyeClass = keye.replace(regExp, '')
if (json.reactions[keye]) { if (json.reactions[keye]) {
$("#pub_" + id + " .re-" + keyeClass + "ct").text(json.reactions[keye]) $('#pub_' + id + ' .re-' + keyeClass + 'ct').text(json.reactions[keye])
$("#pub_" + id + " .re-" + keyeClass).removeClass("hide") $('#pub_' + id + ' .re-' + keyeClass).removeClass('hide')
} else { } else {
$("#pub_" + id + " .re-" + keyeClass + "ct").text(0) $('#pub_' + id + ' .re-' + keyeClass + 'ct').text(0)
if ($("#pub_" + id + " .reactions").hasClass("fullreact")) { if ($('#pub_' + id + ' .reactions').hasClass('fullreact')) {
$("#pub_" + id + " .re-" + keyeClass).addClass("hide") $('#pub_' + id + ' .re-' + keyeClass).addClass('hide')
} }
$("#pub_" + id + " .re-" + keyeClass + "ct").text(json.reactions[keye]) $('#pub_' + id + ' .re-' + keyeClass + 'ct').text(json.reactions[keye])
} }
}); })
} }
} }
function emojiReaction(emoji) { function emojiReaction(emoji) {
var acct_id = $("#post-acct-sel").val(); var media = $('#media').val()
var id = $("#reply").val(); var acct_id = $('#post-acct-sel').val()
reaction(emoji, id, acct_id, null) var id = $('#reply').val()
clear(); if(media == 'announcement') {
hide(); announReaction(id, acct_id, 0, false, emoji)
} else {
reaction(emoji, id, acct_id, null)
}
clear()
hide()
} }
function reaction(mode, id, acct_id, tlid) { function reaction(mode, id, acct_id, tlid) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if ($(".fav_" + id).hasClass("yellow-text")) { if ($('.fav_' + id).hasClass('yellow-text')) {
var flag = "delete"; var flag = 'delete'
} else { } else {
var flag = "create"; var flag = 'create'
} }
var start = "https://" + domain + "/api/notes/reactions/" + flag; var start = 'https://' + domain + '/api/notes/reactions/' + flag
if (localStorage.getItem("mode_" + domain) != "misskey") { if (localStorage.getItem('mode_' + domain) != 'misskey') {
return false; return false
} }
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify({ i: at, noteId: id, reaction: mode })); httpreq.send(JSON.stringify({ i: at, noteId: id, reaction: mode }))
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
$(".fav_" + id).toggleClass("yellow-text"); if (this.status !== 200) {
} setLog(start, this.status, this.response)
} }
$('.fav_' + id).toggleClass('yellow-text')
}
}
} }
//Vote //Vote
function vote(acct_id, id, to) { function vote(acct_id, id, to) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/notes/polls/vote"; var start = 'https://' + domain + '/api/notes/polls/vote'
if (localStorage.getItem("mode_" + domain) != "misskey") { if (localStorage.getItem('mode_' + domain) != 'misskey') {
return false; return false
} }
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify({ i: at, noteId: id, choice: to })); httpreq.send(JSON.stringify({ i: at, noteId: id, choice: to }))
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
voterefresh(acct_id, id) voterefresh(acct_id, id)
} }
} }
function voterefresh(acct_id, id) { function voterefresh(acct_id, id) {
var httpreqd = new XMLHttpRequest(); var httpreqd = new XMLHttpRequest()
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/notes/show"; var start = 'https://' + domain + '/api/notes/show'
httpreqd.open('POST', start, true); httpreqd.open('POST', start, true)
httpreqd.setRequestHeader('Content-Type', 'application/json'); httpreqd.setRequestHeader('Content-Type', 'application/json')
httpreqd.responseType = 'json'; httpreqd.responseType = 'json'
httpreqd.send(JSON.stringify({ i: at, noteId: id })); httpreqd.send(JSON.stringify({ i: at, noteId: id }))
httpreqd.onreadystatechange = function () { httpreqd.onreadystatechange = function() {
if (httpreqd.readyState == 4) { if (httpreqd.readyState == 4) {
var json = httpreqd.response; var json = httpreqd.response
if (!json) { if (this.status !== 200) {
return false; setLog(start, this.status, json)
} }
var poll = ""; if (!json) {
if (json.poll) { return false
var choices = json.poll.choices; }
Object.keys(choices).forEach(function (keyc) { var poll = ''
var choice = choices[keyc]; if (json.poll) {
if (choice.isVoted) { var choices = json.poll.choices
var myvote = twemoji.parse("✅"); Object.keys(choices).forEach(function(keyc) {
} else { var choice = choices[keyc]
var myvote = ""; if (choice.isVoted) {
} var myvote = twemoji.parse('✅')
poll = poll + '<div class="pointer vote" onclick="vote(\'' + acct_id + '\',\'' + json.id + '\',' + choice.id + ')">' + escapeHTML(choice.text) + '(' + choice.votes + '' + myvote + ')</div>'; } else {
}); var myvote = ''
$(".vote_" + json.id).html(poll) }
} 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

@@ -1,35 +1,46 @@
/*投稿系*/ /*投稿系*/
//投稿 //投稿
function sec() { function sec() {
var mode = localStorage.getItem("sec"); var mode = localStorage.getItem('sec')
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
if (~domain.indexOf("kirishima.cloud") >= 0 && mode == "local") { if (~domain.indexOf('kirishima.cloud') >= 0 && mode == 'local') {
mode = "unlisted"; mode = 'unlisted'
} }
post(null, mode); post(null, mode)
} }
function post(mode, postvis) { function post(mode, postvis) {
if ($("#toot-post-btn").prop("disabled")) { if ($('#toot-post-btn').prop('disabled')) {
return false; return false
} }
var str = $("#textarea").val(); var str = $('#textarea').val()
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
localStorage.setItem("last-use", acct_id); localStorage.setItem('last-use', acct_id)
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
if (!localStorage.getItem("cw_sentence")) { if ($('#ideKey').val() != '') {
var cw_sent = 500; var ideKey = $('#ideKey').val()
} else { } else {
var cw_sent = localStorage.getItem("cw_sentence"); var user = localStorage.getItem('user_' + acct_id)
var ideKey = Math.floor(Date.now() / 1000) + '/TheDesk/' + user + '@' + domain
$('#ideKey').val(ideKey)
} }
if (!localStorage.getItem("cw_letters")) { if (!localStorage.getItem('cw_sentence')) {
var cw_ltres = 7000; var cw_sent = 500
} else { } else {
var cw_ltres = localStorage.getItem("cw_letters"); var cw_sent = localStorage.getItem('cw_sentence')
} }
if (domain != "kirishima.cloud") { if (!localStorage.getItem('cw_letters')) {
if (mode != "pass" && !$("#cw").hasClass("cw-avail") && (str.length > cw_sent || (str.split("\n").length - 1) > cw_ltres)) { var cw_ltres = 7000
var plus = str.replace(/\n/g, "").slice(0, 10) + "..."; } else {
var cw_ltres = localStorage.getItem('cw_letters')
}
if (domain != 'kirishima.cloud') {
if (
mode != 'pass' &&
!$('#cw').hasClass('cw-avail') &&
(str.length > cw_sent || str.split('\n').length - 1 > cw_ltres)
) {
var plus = str.replace(/\n/g, '').slice(0, 10) + '...'
Swal.fire({ Swal.fire({
title: lang.lang_post_cwtitle, title: lang.lang_post_cwtitle,
text: lang.lang_post_cwtxt + plus, text: lang.lang_post_cwtxt + plus,
@@ -40,34 +51,34 @@ function post(mode, postvis) {
confirmButtonText: lang.lang_post_btn2, confirmButtonText: lang.lang_post_btn2,
cancelButtonText: lang.lang_post_btn3, cancelButtonText: lang.lang_post_btn3,
showCloseButton: true, showCloseButton: true,
focusConfirm: false, focusConfirm: false
}).then((result) => { }).then(result => {
if (result.dismiss == "cancel") { if (result.dismiss == 'cancel') {
//btn3:sonomama //btn3:sonomama
post("pass") post('pass')
} else if (result.value) { } else if (result.value) {
//btn2:auto-CW //btn2:auto-CW
$("#cw-text").show(); $('#cw-text').show()
$("#cw").addClass("yellow-text"); $('#cw').addClass('yellow-text')
$("#cw").addClass("cw-avail"); $('#cw').addClass('cw-avail')
$("#cw-text").val(plus); $('#cw-text').val(plus)
post("pass") post('pass')
} }
}) })
return false; return false
} }
} }
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem('mode_' + domain) == 'misskey') {
misskeyPost(); misskeyPost()
return; return
} }
$(".toot-btn-group").prop("disabled", true); $('.toot-btn-group').prop('disabled', true)
todo("Posting"); todo('Posting')
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/statuses"; var start = 'https://' + domain + '/api/v1/statuses'
var reply = $("#reply").val(); var reply = $('#reply').val()
if (str.indexOf(localStorage.getItem("stable")) == -1) { if (str.indexOf(localStorage.getItem('stable')) == -1) {
str + " #" + localStorage.getItem("stable"); str + ' #' + localStorage.getItem('stable')
} }
var toot = { var toot = {
status: str status: str
@@ -75,66 +86,70 @@ function post(mode, postvis) {
if (reply) { if (reply) {
toot.in_reply_to_id = reply toot.in_reply_to_id = reply
} }
var media = $("#media").val(); var media = $('#media').val()
if (media) { if (media) {
toot.media_ids = media.split(","); toot.media_ids = media.split(',')
} }
var quote = $("#quote").val(); var quote = $('#quote').val()
if (quote) { if (quote) {
toot.quote_id = quote; toot.quote_id = quote
} }
if ($("#nsfw").hasClass("nsfw-avail")) { if ($('#nsfw').hasClass('nsfw-avail')) {
var nsfw = "true"; var nsfw = 'true'
toot.sensitive = nsfw; toot.sensitive = nsfw
} else { } else {
var nsfw = "false"; var nsfw = 'false'
} }
if (postvis) { if (postvis) {
var vis = postvis; var vis = postvis
} else { } else {
var vis = $("#vis").text(); var vis = $('#vis').text()
} }
if (vis != "inherit" && vis != "local") { if (vis != 'inherit' && vis != 'local') {
toot.visibility = vis; toot.visibility = vis
} else if (vis == "local") { } else if (vis == 'local') {
toot.status = str + "👁️"; toot.status = str + '👁️'
} }
if ($("#cw").hasClass("cw-avail")) { if ($('#cw').hasClass('cw-avail')) {
var spo = $("#cw-text").val(); var spo = $('#cw-text').val()
cw(); cw()
toot.spoiler_text = spo; toot.spoiler_text = spo
} else { } else {
var spo = ""; var spo = ''
} }
if ($("#sch-box").hasClass("sch-avail")) { if ($('#sch-box').hasClass('sch-avail')) {
var scheduled = formattimeutc(new Date(Date.parse($("#sch-date").val()))) var scheduled = formattimeutc(new Date(Date.parse($('#sch-date').val())))
console.log("This toot will be posted at:" + scheduled) console.log('This toot will be posted at:' + scheduled)
schedule(); schedule()
toot.scheduled_at = scheduled; toot.scheduled_at = scheduled
if($('#sch-box').hasClass('expire')) {
toot.scheduled_at = null
toot.expires_at = scheduled
}
} else { } else {
var scheduled = ""; var scheduled = ''
} }
if (!$("#poll").hasClass("hide")) { if (!$('#poll').hasClass('hide')) {
var options = []; var options = []
$(".mastodon-choice").map(function () { $('.mastodon-choice').map(function() {
var choice = $(this).val(); var choice = $(this).val()
if (choice != "") { if (choice != '') {
options.push(choice); options.push(choice)
} }
}); })
if ($("#poll-multiple:checked").val() == "1") { if ($('#poll-multiple:checked').val() == '1') {
var mul = true; var mul = true
} else { } else {
var mul = false; var mul = false
} }
if ($("#poll-until:checked").val() == "1") { if ($('#poll-until:checked').val() == '1') {
var htt = true; var htt = true
} else { } else {
var htt = false; var htt = false
} }
var exin = pollCalc(); var exin = pollCalc()
if (!exin) { if (!exin) {
todc("Error: Poll expires_in param") todc('Error: Poll expires_in param')
} }
toot.poll = { toot.poll = {
options: options, options: options,
@@ -143,154 +158,208 @@ function post(mode, postvis) {
hide_totals: htt hide_totals: htt
} }
} }
console.table(toot); console.table(toot)
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = "json"; httpreq.setRequestHeader('Idempotency-Key', ideKey)
httpreq.send(JSON.stringify(toot)); httpreq.responseType = 'json'
httpreq.onreadystatechange = function () { httpreq.send(JSON.stringify(toot))
httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
var box = localStorage.getItem("box"); if (this.status !== 200) {
if (box == "yes" || !box) { if(media && this.status == 422) {
$("#textarea").blur(); $('#ideKey').val('')
hide(); $('.toot-btn-group').prop('disabled', false)
alertProcessUnfinished()
} else {
setLog(start, this.status, json)
var box = localStorage.getItem('box')
if (box == 'yes' || !box) {
$('#textarea').blur()
hide()
}
$('.toot-btn-group').prop('disabled', false)
todc()
clear()
}
} else {
$('#ideKey').val('')
var box = localStorage.getItem('box')
if (box == 'yes' || !box) {
$('#textarea').blur()
hide()
}
$('.toot-btn-group').prop('disabled', false)
todc()
clear()
} }
$(".toot-btn-group").prop("disabled", false);
todc();
clear();
} }
} }
} }
function expPostMode() {
$('#sch-box').toggleClass('expire')
if($('#sch-box').hasClass('expire')) {
Swal.fire({
type: 'info',
title: 'Expiring toot On'
})
} else {
Swal.fire({
type: 'info',
title: 'Expireing toot Off'
})
}
}
function misskeyPost() { function misskeyPost() {
var str = $("#textarea").val(); var str = $('#textarea').val()
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
localStorage.setItem("last-use", acct_id); localStorage.setItem('last-use', acct_id)
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
$(".toot-btn-group").prop("disabled", true); $('.toot-btn-group').prop('disabled', true)
todo("Posting"); todo('Posting')
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/notes/create"; var start = 'https://' + domain + '/api/notes/create'
var reply = $("#reply").val(); var reply = $('#reply').val()
var toot = { var toot = {
text: str text: str
} }
if (reply) { if (reply) {
if (reply.indexOf("renote") !== -1) { if (reply.indexOf('renote') !== -1) {
toot.renoteId = reply.replace("renote_", "") toot.renoteId = reply.replace('renote_', '')
} else { } else {
toot.replyId = reply toot.replyId = reply
} }
} }
var media = $("#media").val(); var media = $('#media').val()
if (media) { if (media) {
toot.mediaIds = media.split(","); toot.mediaIds = media.split(',')
} }
if ($("#nsfw").hasClass("nsfw-avail")) { if ($('#nsfw').hasClass('nsfw-avail')) {
var nsfw = "true"; var nsfw = 'true'
toot.sensitive = nsfw; toot.sensitive = nsfw
} else { } else {
var nsfw = "false"; var nsfw = 'false'
} }
var vis = $("#vis").text(); var vis = $('#vis').text()
if (vis == "unlisted") { if (vis == 'unlisted') {
vis = "home" vis = 'home'
} else if (vis == "direct") { } else if (vis == 'direct') {
vis = "specified"; vis = 'specified'
toot.visibleUserIds = str.match(/@([a-zA-Z0-9_@.-]+)(\s|$)/g).join('').split("@"); toot.visibleUserIds = str
.match(/@([a-zA-Z0-9_@.-]+)(\s|$)/g)
.join('')
.split('@')
} }
if (vis != "inherit") { if (vis != 'inherit') {
toot.visibility = vis; toot.visibility = vis
} }
if ($("#cw").hasClass("cw-avail")) { if ($('#cw').hasClass('cw-avail')) {
var spo = $("#cw-text").val(); var spo = $('#cw-text').val()
cw(); cw()
toot.cw = spo; toot.cw = spo
} else { } else {
var spo = ""; var spo = ''
} }
toot.i = at; toot.i = at
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify(toot)); httpreq.send(JSON.stringify(toot))
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
if (str.indexOf(localStorage.getItem("stable")) == -1) { if (str.indexOf(localStorage.getItem('stable')) == -1) {
localStorage.removeItem("stable") localStorage.removeItem('stable')
} }
var json = httpreq.response; var json = httpreq.response
console.log(["Success: toot", json]); if (this.status !== 200) {
var box = localStorage.getItem("box"); setLog(start, this.status, json)
if (box == "yes") {
hide();
} else if (box == "hide") {
$("body").addClass("mini-post");
$(".mini-btn").text("expand_less");
} }
$(".toot-btn-group").prop("disabled", false); console.log(['Success: toot', json])
todc(); var box = localStorage.getItem('box')
clear(); if (box == 'yes') {
hide()
} else if (box == 'hide') {
$('body').addClass('mini-post')
$('.mini-btn').text('expand_less')
}
$('.toot-btn-group').prop('disabled', false)
todc()
clear()
} }
} }
} }
//クリア(Shift+C) //クリア(Shift+C)
function clear() { function clear() {
$("#textarea").val(""); $('#textarea').val('')
if (localStorage.getItem("stable")) { $('#ideKey').val('')
$("#textarea").val("#" + localStorage.getItem("stable") + " ") if (localStorage.getItem('stable')) {
$('#textarea').val('#' + localStorage.getItem('stable') + ' ')
} }
$("#textarea").attr("placeholder", lang.lang_toot); $('#textarea').attr('placeholder', lang.lang_toot)
$("#reply").val(""); $('#reply').val('')
$("#quote").val(""); $('#quote').val('')
$("#media").val(""); $('#media').val('')
var cwt = localStorage.getItem("cw-text"); var cwt = localStorage.getItem('cw-text')
if (cwt) { if (cwt) {
$("#cw-text").val(cwt); $('#cw-text').val(cwt)
} else { } else {
$("#cw-text").val(""); $('#cw-text').val('')
} }
var acw = localStorage.getItem("always-cw"); var acw = localStorage.getItem('always-cw')
if (acw != "yes") { if (acw != 'yes') {
$("#cw").removeClass("yellow-text"); $('#cw').removeClass('yellow-text')
$("#cw").removeClass("cw-avail"); $('#cw').removeClass('cw-avail')
$("#cw-text").hide(); $('#cw-text').hide()
} else { } else {
$("#cw").addClass("yellow-text"); $('#cw').addClass('yellow-text')
$("#cw").addClass("cw-avail"); $('#cw').addClass('cw-avail')
$("#cw-text").show(); $('#cw-text').show()
} }
$("#rec").text(lang.lang_no); $('#rec').text(lang.lang_no)
$("#mec").text(lang.lang_nothing); $('#mec').text(lang.lang_nothing)
loadVis(); loadVis()
$("#nsfw").removeClass("yellow-text"); $('#nsfw').removeClass('yellow-text')
$("#nsfw").html("visibility_off"); $('#nsfw').html('visibility_off')
$("#nsfw").removeClass("nsfw-avail"); $('#nsfw').removeClass('nsfw-avail')
$("#nsc").text(lang.lang_nothing); $('#stamp').html('Off')
$("#drag").css("background-color", "#e0e0e0"); $('#stamp').removeClass('stamp-avail')
$("#preview").html(""); $('#nsc').text(lang.lang_nothing)
$(".toot-btn-group").prop("disabled", false); $('#drag').css('background-color', '#e0e0e0')
$("#post-acct-sel").prop("disabled", false); $('#preview').html('')
$("#days_poll").val(0); $('.toot-btn-group').prop('disabled', false)
$("#hours_poll").val(0); $('#post-acct-sel').prop('disabled', false)
$("#mins_poll").val(6); $('#days_poll').val(0)
$("#poll").addClass("hide") $('#hours_poll').val(0)
$("#pollsta").text(lang.lang_no) $('#mins_poll').val(6)
$(".mastodon-choice").map(function () { $('#poll').addClass('hide')
$(this).val(""); $('#pollsta').text(lang.lang_no)
}); $('.mastodon-choice').map(function() {
localStorage.removeItem("image"); $(this).val('')
if (localStorage.getItem("mainuse") == "main") { })
$("#post-acct-sel").val(localStorage.getItem("main")); localStorage.removeItem('image')
if (localStorage.getItem('mainuse') == 'main') {
$('#post-acct-sel').val(localStorage.getItem('main'))
} }
$('select').formSelect(); $('#emoji').addClass('hide')
$("#left-side").show(); $('select').formSelect()
$("#default-emoji").show(); $('#default-emoji').show()
$("#unreact").show(); $('#unreact').show()
$("#addreact").addClass("hide"); $('#addreact').addClass('hide')
} $('#right-side').hide()
$('#right-side').css('width', '300px')
$('#left-side').css('width', '100%')
var width = localStorage.getItem('postbox-width')
if (width) {
width = width.replace('px', '') * 1
} else {
width = 300
}
$('#post-box').css('width', width)
mdCheck()
}

View File

@@ -1,130 +1,128 @@
/*保護系*/ /*保護系*/
//画像保護 //画像保護
function nsfw() { function nsfw() {
if ($("#nsfw").hasClass("nsfw-avail")) { if ($('#nsfw').hasClass('nsfw-avail')) {
$("#nsfw").removeClass("yellow-text"); $('#nsfw').removeClass('yellow-text')
$("#nsfw").html("visibility_off"); $('#nsfw').html('visibility_off')
$("#nsfw").removeClass("nsfw-avail"); $('#nsfw').removeClass('nsfw-avail')
} else { } else {
$("#nsfw").addClass("yellow-text"); $('#nsfw').addClass('yellow-text')
$("#nsfw").html("visibility"); $('#nsfw').html('visibility')
$("#nsfw").addClass("nsfw-avail"); $('#nsfw').addClass('nsfw-avail')
} }
} }
//投稿公開範囲 //投稿公開範囲
function vis(set) { function vis(set) {
$("#vis").text(set); $('#vis').text(set)
$("#vis-icon").removeClass("red-text"); $('#vis-icon').removeClass('red-text')
$("#vis-icon").removeClass("orange-text"); $('#vis-icon').removeClass('orange-text')
$("#vis-icon").removeClass("blue-text"); $('#vis-icon').removeClass('blue-text')
$("#vis-icon").removeClass("purple-text"); $('#vis-icon').removeClass('purple-text')
$("#vis-icon").removeClass("light-blue-text"); $('#vis-icon').removeClass('light-blue-text')
$("#vis-icon").removeClass("teal-text"); $('#vis-icon').removeClass('teal-text')
if (set == "public") { if (set == 'public') {
$("#vis-icon").text("public"); $('#vis-icon').text('public')
$("#vis-icon").addClass("purple-text"); $('#vis-icon').addClass('purple-text')
} else if (set == "unlisted") { } else if (set == 'unlisted') {
$("#vis-icon").text("lock_open"); $('#vis-icon').text('lock_open')
$("#vis-icon").addClass("blue-text"); $('#vis-icon').addClass('blue-text')
} else if (set == "private") { } else if (set == 'private') {
$("#vis-icon").text("lock"); $('#vis-icon').text('lock')
$("#vis-icon").addClass("orange-text"); $('#vis-icon').addClass('orange-text')
} else if (set == "direct") { } else if (set == 'direct') {
$("#vis-icon").text("mail"); $('#vis-icon').text('mail')
$("#vis-icon").addClass("red-text"); $('#vis-icon').addClass('red-text')
} else if (set == "limited") { } else if (set == 'limited') {
$("#vis-icon").text("group"); $('#vis-icon').text('group')
$("#vis-icon").addClass("teal-text"); $('#vis-icon').addClass('teal-text')
} else if (set == "local") { } else if (set == 'local') {
$("#vis-icon").text("visibility"); $('#vis-icon').text('visibility')
$("#vis-icon").addClass("light-blue-text"); $('#vis-icon').addClass('light-blue-text')
} }
var vis = localStorage.getItem("vis"); var vis = localStorage.getItem('vis')
if (vis == "memory") { if (vis == 'memory') {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
localStorage.setItem("vis-memory-" + acct_id, set); localStorage.setItem('vis-memory-' + acct_id, set)
} }
var ins = M.Dropdown.getInstance($('#dropdown1')) var ins = M.Dropdown.getInstance($('#dropdown1'))
if(ins){ if (ins) {
ins.close(); ins.close()
} }
} }
function loadVis() { function loadVis() {
var vist = localStorage.getItem("vis"); var vist = localStorage.getItem('vis')
if (!vist) { if (!vist) {
vis("public"); vis('public')
} else { } else {
if (vist == "memory") { if (vist == 'memory') {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
var memory = localStorage.getItem("vis-memory-" + acct_id); var memory = localStorage.getItem('vis-memory-' + acct_id)
if (!memory) { if (!memory) {
memory = "public"; memory = 'public'
} }
vis(memory); vis(memory)
} else if (vist == "useapi") { } else if (vist == 'useapi') {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
var multi = localStorage.getItem("multi"); var multi = localStorage.getItem('multi')
var obj = JSON.parse(multi); var obj = JSON.parse(multi)
var memory = obj[acct_id]["vis"]; var memory = obj[acct_id]['vis']
if (!memory) { if (!memory) {
memory = "public"; memory = 'public'
} }
vis(memory); vis(memory)
} else { } else {
vis(vist); vis(vist)
} }
} }
} }
loadVis(); loadVis()
//コンテントワーニング //コンテントワーニング
function cw() { function cw() {
if ($("#cw").hasClass("cw-avail")) { if ($('#cw').hasClass('cw-avail')) {
$("#cw-text").val(); $('#cw-text').val()
$("#cw-text").hide(); $('#cw-text').hide()
$("#cw").removeClass("yellow-text"); $('#cw').removeClass('yellow-text')
$("#cw").removeClass("cw-avail"); $('#cw').removeClass('cw-avail')
} else { } else {
$("#cw-text").show(); $('#cw-text').show()
$("#cw").addClass("yellow-text"); $('#cw').addClass('yellow-text')
$("#cw").addClass("cw-avail"); $('#cw').addClass('cw-avail')
var cwt = localStorage.getItem("cw-text"); var cwt = localStorage.getItem('cw-text')
if (cwt) { if (cwt) {
$("#cw-text").val(cwt); $('#cw-text').val(cwt)
} }
} }
} }
//TLでコンテントワーニングを表示トグル //TLでコンテントワーニングを表示トグル
function cw_show(id) { function cw_show(e) {
$(".cw_hide_" + id).toggleClass("cw"); $(e).parent().parent().find('.cw_hide').toggleClass('cw')
$(".cw-long-" + id).toggleClass("hide"); $(e).parent().find('.cw_long').toggleClass('hide')
} }
$(function () { $(function() {
$('#cw-text').on('change', function (event) { $('#cw-text').on('change', function(event) {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var cwlen = $('#cw-text').val().length; var cwlen = $('#cw-text').val().length
if (idata[domain + "_letters"]) { if (idata[domain + '_letters']) {
$("#textarea").attr("data-length", idata[domain + "_letters"] - cwlen) $('#textarea').attr('data-length', idata[domain + '_letters'] - cwlen)
} else { } else {
$("#textarea").attr("data-length", 500 - cwlen) $('#textarea').attr('data-length', 500 - cwlen)
} }
})
})
});
});
//スケジュール //スケジュール
function schedule() { function schedule() {
if ($("#sch-box").hasClass("sch-avail")) { if ($('#sch-box').hasClass('sch-avail')) {
$("#sch-box").hide(); $('#sch-box').hide()
$("#sch-box").removeClass("sch-avail"); $('#sch-box').removeClass('sch-avail')
} else { } else {
var date = new Date(); var date = new Date()
$("#sch-box").show(); $('#sch-box').show()
$("#sch-date").val(formattime(date)); $('#sch-date').val(formattime(date))
$("#sch-box").addClass("sch-avail"); $('#sch-box').addClass('sch-avail')
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,278 +1,279 @@
//入力時にハッシュタグと@をサジェスト //入力時にハッシュタグと@をサジェスト
var timer = null; var timer = null
var input = document.getElementById("textarea"); var input = document.getElementById('textarea')
var prev_val = input.value; var prev_val = input.value
var oldSuggest; var oldSuggest
var suggest; var suggest
input.addEventListener("focus", function () { input.addEventListener(
localStorage.removeItem("cursor"); 'focus',
var acct_id = $("#post-acct-sel").val(); function() {
$("#suggest").html(""); localStorage.removeItem('cursor')
window.clearInterval(timer); var acct_id = $('#post-acct-sel').val()
timer = window.setInterval(function () { $('#suggest').html('')
var new_val = input.value; window.clearInterval(timer)
if (new_val == "") { timer = window.setInterval(function() {
$("#suggest").html(""); var new_val = input.value
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) { if (new_val == '') {
$("#right-side").hide() $('#suggest').html('')
$("#right-side").css("width", "300px") if ($('#poll').hasClass('hide') && $('#emoji').hasClass('hide')) {
$("#left-side").css("width", "100%") $('#right-side').hide()
var width = localStorage.getItem("postbox-width"); $('#right-side').css('width', '300px')
if (width) { $('#left-side').css('width', '100%')
width = width.replace("px", "") * 1 var width = localStorage.getItem('postbox-width')
} else {
width = 300
}
$("#post-box").css("width", width + "px")
}
return;
}
if (prev_val != new_val) {
var semoji = new_val.match(/:(\S{3,})/);
if (semoji) {
var obj = JSON.parse(localStorage.getItem("emoji_" + acct_id));
if (!obj) {
var ehtml = lang.lang_suggest_nodata;
} else {
var num = obj.length;
var ehtml = "";
for (i = 0; i < num; i++) {
var emoji = obj[i];
if (~emoji.shortcode.indexOf(semoji[1])) {
if (emoji) {
ehtml = ehtml + '<a onclick="emojiInsert(\':' + emoji.shortcode +
': \',\':' + semoji[1] + '\')" class="pointer"><img src="' + emoji.url + '" width="20"></a>';
}
}
}
}
if (ehtml != "") {
$("#right-side").show()
$("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width");
if (width) { if (width) {
width = width.replace("px", "") * 1 + 200 width = width.replace('px', '') * 1
} else {
width = 600
}
$("#post-box").css("width", width + "px")
$("#poll").addClass("hide")
$("#emoji").addClass("hide")
} else {
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width");
if (width) {
width = width.replace("px", "") * 1
} else {
width = 300
}
$("#post-box").css("width", width + "px")
}
}
$("#suggest").html(ehtml);
}
var tag = new_val.match(/#(\S{3,})/);
var acct = new_val.match(/@(\S{3,})/);
if (tag && tag[1]) {
var q = tag[1];
} else if (acct && acct[1]) {
var q = acct[1];
} else {
$("#suggest").html("");
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width");
if (width) {
width = width.replace("px", "") * 1
} else { } else {
width = 300 width = 300
} }
$("#post-box").css("width", width + "px") $('#post-box').css('width', width + 'px')
} }
return; return
} }
var domain = localStorage.getItem("domain_" + acct_id); if (prev_val != new_val) {
var at = localStorage.getItem("acct_" + acct_id + "_at"); var tag = new_val.match(/#(\S{3,})/)
suggest = "https://" + domain + "/api/v2/search?q=" + q var acct = new_val.match(/@(\S{3,})/)
if (suggest != oldSuggest) { if (tag && tag[1]) {
console.log("Try to get suggest at " + suggest) var q = tag[1]
fetch(suggest, { } else if (acct && acct[1]) {
method: 'GET', var q = acct[1]
headers: { } else {
'content-type': 'application/json', $('#suggest').html('')
'Authorization': 'Bearer ' + at if ($('#poll').hasClass('hide') && $('#emoji').hasClass('hide')) {
}, $('#right-side').hide()
}).then(function (response) { $('#right-side').css('width', '300px')
return response.json(); $('#left-side').css('width', '100%')
}).catch(function (error) { var width = localStorage.getItem('postbox-width')
todo(error);
console.error(error);
}).then(function (json) {
console.log(["Search", json]);
//ハッシュタグ
if (json.hashtags[0] && tag) {
if (tag[1]) {
var tags = [];
Object.keys(json.hashtags).forEach(function (key4) {
var tag = json.hashtags[key4];
var his = tag.history;
var uses = his[0].uses * 1 + his[1].uses * 1 + his[2].uses * 1 + his[3].uses * 1 + his[4].uses * 1 + his[5].uses * 1 + his[6].uses * 1;
tagHTML = '<br><a onclick="tagInsert(\'#' + escapeHTML(tag.name) + '\',\'#' + q + '\')" class="pointer">#' +
escapeHTML(tag.name) + '</a>&nbsp;' + uses + 'toot(s)'
var item = {
"uses": uses,
"html": tagHTML
}
tags.push(item)
});
var num_a = -1;
var num_b = 1;
tags = tags.sort(function (a, b) {
var x = a["uses"];
var y = b["uses"];
if (x > y) return num_a;
if (x < y) return num_b;
return 0;
});
var ins = ""
var nev = false
Object.keys(tags).forEach(function (key7) {
ins = ins + tags[key7].html
if (key7 <= 0 && !nev) {
ins = ins + '<br>'
nev = true
}
});
$("#suggest").html(ins);
$("#right-side").show()
$("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width");
if (width) {
width = width.replace("px", "") * 1 + 200
} else {
width = 600
}
$("#post-box").css("width", width + "px")
$("#poll").addClass("hide")
$("#emoji").addClass("hide")
}
} else if (json.accounts[0] && acct[1]) {
var accts = "";
Object.keys(json.accounts).forEach(function (key3) {
var acct = json.accounts[key3];
if (acct.acct != q) {
//Instance Actorって…
if (acct.username.indexOf(".") < 0) {
accts = accts + '<a onclick="tagInsert(\'@' + acct.acct +
'\',\'@' + q + '\')" class="pointer">@' + acct.acct + '</a><br>';
}
}
});
$("#right-side").show()
$("#right-side").css("width", "200px")
$("#left-side").css("width", "calc(100% - 200px)")
var width = localStorage.getItem("postbox-width");
if (width) { if (width) {
width = width.replace("px", "") * 1 + 200 width = width.replace('px', '') * 1
} else { } else {
width = 600 width = 300
}
$("#post-box").css("width", width + "px")
$("#suggest").html(accts);
$("#poll").addClass("hide")
$("#emoji").addClass("hide")
} else {
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) {
$("#right-side").hide()
$("#right-side").css("width", "300px")
$("#left-side").css("width", "100%")
var width = localStorage.getItem("postbox-width");
if (width) {
width = width.replace("px", "") * 1
} else {
width = 300
}
$("#post-box").css("width", width + "px")
} }
$('#post-box').css('width', width + 'px')
} }
}); return
} }
}; var domain = localStorage.getItem('domain_' + acct_id)
oldSuggest = suggest; var at = localStorage.getItem('acct_' + acct_id + '_at')
prev_value = new_val; suggest = 'https://' + domain + '/api/v2/search?q=' + q
}, 1000); if (suggest != oldSuggest) {
}, false); console.log('Try to get suggest at ' + suggest)
fetch(suggest, {
method: 'GET',
headers: {
'content-type': 'application/json',
Authorization: 'Bearer ' + at
}
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
console.log(['Search', json])
//ハッシュタグ
if (json.hashtags[0] && tag) {
if (tag[1]) {
var tags = []
Object.keys(json.hashtags).forEach(function(key4) {
var tag = json.hashtags[key4]
var his = tag.history
var uses =
his[0].uses * 1 +
his[1].uses * 1 +
his[2].uses * 1 +
his[3].uses * 1 +
his[4].uses * 1 +
his[5].uses * 1 +
his[6].uses * 1
tagHTML = `<br><a onclick="tagInsert('#${escapeHTML(
tag.name
)}','#${q}')" class="pointer">#${escapeHTML(tag.name)}</a>&nbsp;${uses}toot(s)`
input.addEventListener("blur", function () { var item = {
window.clearInterval(timer); uses: uses,
favTag(); html: tagHTML
}, false); }
tags.push(item)
})
var num_a = -1
var num_b = 1
tags = tags.sort(function(a, b) {
var x = a['uses']
var y = b['uses']
if (x > y) return num_a
if (x < y) return num_b
return 0
})
var ins = ''
var nev = false
Object.keys(tags).forEach(function(key7) {
ins = ins + tags[key7].html
if (key7 <= 0 && !nev) {
ins = ins + '<br>'
nev = true
}
})
$('#suggest').html(ins)
$('#right-side').show()
$('#right-side').css('width', '200px')
$('#left-side').css('width', 'calc(100% - 200px)')
var width = localStorage.getItem('postbox-width')
if (width) {
width = width.replace('px', '') * 1 + 200
} else {
width = 500
}
$('#post-box').css('width', width + 'px')
$('#poll').addClass('hide')
$('#emoji').addClass('hide')
}
} else if (json.accounts[0] && acct[1]) {
var accts = ''
Object.keys(json.accounts).forEach(function(key3) {
var acct = json.accounts[key3]
if (acct.acct != q) {
//Instance Actorって…
if (acct.username.indexOf('.') < 0) {
accts =
accts +
`<a onclick="tagInsert('@${acct.acct}','@${q}')" class="pointer">@${acct.acct}</a><br>`
}
}
})
$('#right-side').show()
$('#right-side').css('width', '200px')
$('#left-side').css('width', 'calc(100% - 200px)')
var width = localStorage.getItem('postbox-width')
if (width) {
width = width.replace('px', '') * 1 + 200
} else {
width = 500
}
$('#post-box').css('width', width + 'px')
$('#suggest').html(accts)
$('#poll').addClass('hide')
$('#emoji').addClass('hide')
} else {
if ($('#poll').hasClass('hide') && $('#emoji').hasClass('hide')) {
$('#right-side').hide()
$('#right-side').css('width', '300px')
$('#left-side').css('width', '100%')
var width = localStorage.getItem('postbox-width')
if (width) {
width = width.replace('px', '') * 1
} else {
width = 300
}
$('#post-box').css('width', width + 'px')
}
}
})
}
}
oldSuggest = suggest
prev_value = new_val
}, 1000)
},
false
)
input.addEventListener(
'blur',
function() {
window.clearInterval(timer)
favTag()
},
false
)
function tagInsert(code, del) { function tagInsert(code, del) {
var now = $("#textarea").val(); var blankBefore = ' '
var selin = $("#textarea").prop('selectionStart'); var blankAfter = ' '
if (!del) { var textarea = document.querySelector('#textarea')
var sentence = textarea.value
var len = sentence.length
var pos = textarea.selectionStart
if (del) {
var delLen = del.length
} else { } else {
var regExp = new RegExp(del.replace(/[.*+?^=!:${}()|[\]\/\\]/g, "\\$&"), "g"); var delLen = 0
var now = now.replace(regExp, "");
selin = selin - del.length;
} }
if (selin > 0) { var before = sentence.substr(0, pos - delLen)
var before = now.substr(0, selin); var last = before.substr(-1, 1)
var after = now.substr(selin, now.length); if (last == ' ') blankBefore = ''
newt = before + " " + code + " " + after; var after = sentence.substr(pos, len)
var start = after.substr(0, 1)
if (start == ' ') blankAfter = ''
if (len == 0) {
var word = code
} else if (len == pos) {
var word = blankBefore + code
} else if (pos == 0) {
var word = code + blankAfter
} else { } else {
newt = code + " " + now; var word = blankBefore + code + blankAfter
} }
$("#textarea").val(newt); sentence = before + word + after
$("#textarea").focus(); textarea.value = sentence
if ($("#poll").hasClass("hide") && $("#emoji").hasClass("hide")) { if ($('#poll').hasClass('hide') && $('#emoji').hasClass('hide')) {
$("#right-side").hide() $('#right-side').hide()
$("#right-side").css("width", "300px") $('#right-side').css('width', '300px')
$("#left-side").css("width", "50%") $('#left-side').css('width', '50%')
var width = localStorage.getItem("postbox-width").replace("px", "") * 1; var width = localStorage.getItem('postbox-width').replace('px', '') * 1
if (!width) { if (!width) {
width = 300 width = 300
} }
$("#post-box").css("width", width + "px") $('#post-box').css('width', width + 'px')
} }
$("#suggest").html(""); $('#suggest').html('')
} }
function cgNPs(q) { function cgNPs(q) {
suggest = "https://cg.toot.app/api/v1/search/light?q=" + q suggest = 'https://cg.toot.app/api/v1/search/light?q=' + q
if (suggest != oldSuggest) { if (suggest != oldSuggest) {
console.log("Try to get suggest at " + suggest) console.log('Try to get suggest at ' + suggest)
fetch(suggest, { fetch(suggest, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (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">' + escapeHTML(json[key4]) + '</a> ';
});
$("#suggest").html("Cinderella NowPlaying:" + tags);
} else {
$("#suggest").html("Cinderella NowPlaying:Not Found");
} }
}); })
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
if (json[0]) {
var tags = ''
Object.keys(json).forEach(function(key4) {
var tag = json[key4]
tags =
tags +
`<a onclick="cgNp('${json[key4]}')" class="pointer">${escapeHTML(json[key4])}</a>`
})
$('#suggest').html('Cinderella NowPlaying:' + tags)
} else {
$('#suggest').html('Cinderella NowPlaying:Not Found')
}
})
} }
} }

View File

@@ -1,79 +1,81 @@
/*リプライ*/ /*リプライ*/
function re(id, ats_cm, acct_id, mode) { function re(id, ats_cm, acct_id, mode) {
clear(); clear()
var ats = ats_cm.split(','); var ats = ats_cm.split(',')
localStorage.setItem("nohide", true); localStorage.setItem('nohide', true)
show(); show()
$("#reply").val(id); $('#reply').val(id)
for (var i = 0; i < ats.length; i++) { for (var i = 0; i < ats.length; i++) {
var at = ats[i]; var at = ats[i]
var te = $("#textarea").val(); var te = $('#textarea').val()
if (at != localStorage.getItem("user_" + acct_id)) { if (at != localStorage.getItem('user_' + acct_id)) {
$("#textarea").val("@" + at + " " + te); $('#textarea').val('@' + at + ' ' + te)
} }
} }
$("#rec").text(lang.lang_yesno); $('#rec').text(lang.lang_yesno)
$("#post-acct-sel").val(acct_id); $('#post-acct-sel').val(acct_id)
$("#post-acct-sel").prop("disabled", true); $('#post-acct-sel').prop('disabled', true)
$('select').formSelect(); $('select').formSelect()
$("#textarea").attr("placeholder", lang.lang_usetxtbox_reply); mdCheck()
$("#textarea").focus(); $('#textarea').attr('placeholder', lang.lang_usetxtbox_reply)
var profimg = localStorage.getItem("prof_" + acct_id); $('#textarea').focus()
var profimg = localStorage.getItem('prof_' + acct_id)
if (!profimg) { if (!profimg) {
profimg = "../../img/missing.svg"; profimg = '../../img/missing.svg'
} }
$("#acct-sel-prof").attr("src", profimg); $('#acct-sel-prof').attr('src', profimg)
vis(mode); vis(mode)
} }
function reEx(id) { function reEx(id) {
$('#tootmodal').modal('close'); $('#tootmodal').modal('close')
var at = $("#tootmodal").attr("data-user"); var at = $('#tootmodal').attr('data-user')
var acct_id = $("#status-acct-sel").val(); var acct_id = $('#status-acct-sel').val()
var mode = $("#tootmodal .vis-data").attr("data-vis"); var mode = $('#tootmodal .vis-data').attr('data-vis')
re(id, at, acct_id, mode); re(id, at, acct_id, mode)
} }
//引用 //引用
function qt(id, acct_id, at, url) { function qt(id, acct_id, at, url) {
localStorage.setItem("nohide", true); localStorage.setItem('nohide', true)
var qt = localStorage.getItem("quote"); var qt = localStorage.getItem('quote')
if (!qt) { if (!qt) {
var qt = "simple"; var qt = 'simple'
} }
if (qt == "nothing") { if (qt == 'nothing') {
return false; return false
} }
if (qt == "simple") { if (qt == 'simple') {
show(); show()
$("#textarea").val("\n" + url); $('#textarea').val('\n' + url)
} else if (qt == "mention") { } else if (qt == 'mention') {
show(); show()
$("#textarea").val("\n" + url + " From:@" + at); $('#textarea').val('\n' + url + ' From:@' + at)
} else if (qt == "full") { } else if (qt == 'full') {
show(); show()
var html = $("[toot-id=" + id + "] .toot").html(); var html = $('[toot-id=' + id + '] .toot').html()
html = html.match(/^<p>(.+)<\/p>$/)[1]; html = html.match(/^<p>(.+)<\/p>$/)[1]
html = html.replace(/<br\s?\/?>/, "\n"); html = html.replace(/<br\s?\/?>/, '\n')
html = html.replace(/<p>/, "\n"); html = html.replace(/<p>/, '\n')
html = html.replace(/<\/p>/, "\n"); html = html.replace(/<\/p>/, '\n')
html = $.strip_tags(html); html = $.strip_tags(html)
$("#textarea").val("\n" + "@" + at + " " + html + "\n" + url); $('#textarea').val('\n' + '@' + at + ' ' + html + '\n' + url)
} else if (qt == "apiQuote") { } else if (qt == 'apiQuote') {
clear(); clear()
localStorage.setItem("nohide", true); localStorage.setItem('nohide', true)
show(); show()
$("#quote").val(id); $('#quote').val(id)
$("#post-acct-sel").val(acct_id); $('#post-acct-sel').val(acct_id)
$("#post-acct-sel").prop("disabled", true); $('#post-acct-sel').prop('disabled', true)
$('select').formSelect(); $('select').formSelect()
$("#textarea").attr("placeholder", lang.lang_usetxtbox_reply); $('#textarea').attr('placeholder', lang.lang_usetxtbox_reply)
$("#textarea").focus(); $('#textarea').focus()
var profimg = localStorage.getItem("prof_" + acct_id); var profimg = localStorage.getItem('prof_' + acct_id)
if (!profimg) { if (!profimg) {
profimg = "../../img/missing.svg"; profimg = '../../img/missing.svg'
} }
$("#acct-sel-prof").attr("src", profimg); $('#acct-sel-prof').attr('src', profimg)
} }
$("#post-acct-sel").val(acct_id); $('#post-acct-sel').val(acct_id)
$('select').formSelect(); $('select').formSelect()
$("#textarea").focus(); mdCheck()
} $('#textarea').focus()
}

145
app/js/tl/announParse.js Normal file
View File

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

View File

@@ -4,278 +4,389 @@ function additional(acct_id, tlid) {
//メンション系 //メンション系
//$(".mention").attr("href", ""); //$(".mention").attr("href", "");
$("#timeline-container .mention").addClass("parsed"); $('#timeline-container .mention').addClass('parsed')
$("#timeline-container .hashtag").each(function (i, elem) { $('#timeline-container .hashtag, #timeline-container [rel=tag]').each(function(i, elem) {
var tags = $(this).attr("href").match( var tags = $(this)
/https?:\/\/([-a-zA-Z0-9@.]+)\/tags\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/ .attr('href')
); .match(/https?:\/\/([-a-zA-Z0-9@.]+)\/tags?\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/)
$(this).attr("href", "#");
if (tags) { if (tags) {
if (tags[2]) { var tagThis = tags[2]
$(this).attr("onclick", 'tagShow(\'' + tags[2] + '\')'); } else {
} var tagThis = $(this).attr('data-regTag')
} }
});
if (tagThis) {
$(this).attr('href', "javascript:tagShow('" + tagThis + "')")
}
})
//トゥートサムネ //トゥートサムネ
$("#timeline_" + tlid + " .toot a:not(.parsed)").each(function (i, elem) { $('#timeline_' + tlid + ' .toot a:not(.parsed)').each(function(i, elem) {
var domain = localStorage.getItem("domain_" + acct_id); var text = $(this).attr('href')
var at = localStorage.getItem("acct_" + acct_id + "_at");
var card = localStorage.getItem("card_" + tlid);
var text = $(this).attr('href');
if (text) { if (text) {
if (text.indexOf("twimg.com") === -1) { if (text.indexOf('twimg.com') === -1) {
var urls = text.match( var urls = text.match(
/https?:\/\/([-a-zA-Z0-9@.]+)\/media\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/ /https?:\/\/([-a-zA-Z0-9@.]+)\/media\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
); )
} }
} else { } else {
text = "" text = ''
var urls = [] var urls = []
} }
//トゥートのURLぽかったら //トゥートのURLぽかったら
toot = text.match(/https:\/\/([a-zA-Z0-9.-]+)\/@([a-zA-Z0-9_]+)\/([0-9]+)/); toot = text.match(/https:\/\/([a-zA-Z0-9.-]+)\/@([a-zA-Z0-9_]+)\/([0-9]+)/)
if (toot) { if (toot) {
if (toot[1]) { if (toot[1]) {
$(this).attr("data-acct", acct_id); $(this).attr('data-acct', acct_id)
} }
} }
if (urls) { if (urls) {
$(this).remove(); $(this).remove()
} else if (!card) {
var id = $(this).parents('.cvo').attr("toot-id");
if (localStorage.getItem("mode_" + domain) == "misskey") {
var start = "https://" + domain + "/url?url=" + text;
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json'
},
//body: JSON.stringify({})
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json.title) {
$("[toot-id=" + id + "] .additional").html(
"<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");
}
});
}
} else { } else {
$(this).attr("title", text); $(this).attr('title', text)
} }
}); })
$("i.unparsed").each(function (i, elem) { $('i.unparsed').each(function(i, elem) {
var dem = $(this).text(); var dem = $(this).text()
var dom = $(this); var dom = $(this)
var start = "./js/emoji/emoji-map.json"; var start = './js/emoji/emoji-map.json'
var xmlHttpRequest = new XMLHttpRequest(); var xmlHttpRequest = new XMLHttpRequest()
xmlHttpRequest.onreadystatechange = function () { xmlHttpRequest.onreadystatechange = function() {
if (this.readyState === 4 && this.status === 200) { if (this.readyState === 4 && this.status === 200) {
if (this.response) { if (this.response) {
var json = this.response; var json = this.response
var emojis = json.emojis; if (this.status !== 200) {
setLog(start, this.status, this.response)
}
var emojis = json.emojis
for (i = 0; i < emojis.length; i++) { for (i = 0; i < emojis.length; i++) {
var emojie = emojis[i]; var emojie = emojis[i]
var regExp = new RegExp(dem, "g"); var regExp = new RegExp(dem, 'g')
if (emojie.emoji.match(regExp)) { if (emojie.emoji.match(regExp)) {
var sc = emojie.name; var sc = emojie.name
var sc = "twa-" + sc.replace(/_/g, "-"); var sc = 'twa-' + sc.replace(/_/g, '-')
dom.addClass(sc); dom.addClass(sc)
dom.text(""); dom.text('')
dom.removeClass("unparsed"); dom.removeClass('unparsed')
break; break
} }
} }
} }
} }
} }
xmlHttpRequest.open('GET', start, true); xmlHttpRequest.open('GET', start, true)
xmlHttpRequest.responseType = 'json'; xmlHttpRequest.responseType = 'json'
xmlHttpRequest.send(null); xmlHttpRequest.send(null)
}); })
$("#timeline_" + tlid + " .toot:not(:has(a:not(.add-show,.parsed)))").each(function (i, elem) { $('#timeline_' + tlid + ' .toot:not(:has(a:not(.add-show,.parsed)))').each(function(i, elem) {
$(this).parent().find(".add-show").hide(); $(this)
}); .parent()
.find('.add-show')
.hide()
})
//Markdownイメージビューワー //Markdownイメージビューワー
$("#timeline_" + tlid + " .toot a:not(.img-parsed):has(img)").each(function (i, elem) { $('#timeline_' + tlid + ' .toot a:not(.img-parsed):has(img)').each(function(i, elem) {
var ilink = $(this).attr("href"); var ilink = $(this).attr('href')
var id = $(this).parents('.cvo').attr("toot-id"); var id = $(this)
$(this).attr("href", "#"); .parents('.cvo')
$(this).attr("onclick", "imgv('" + id + "','" + i + "')"); .attr('toot-id')
$(this).attr("data-type", "image"); $(this).attr('href', `javascript:imgv('${id}','${i}')`)
$(this).attr("id", id + "-image-" + i); $(this).attr('data-type', 'image')
$(this).attr("data-url", ilink); $(this).attr('id', id + '-image-' + i)
$(this).addClass("img-parsed"); $(this).attr('data-url', ilink)
}); $(this).addClass('img-parsed')
})
} }
function additionalIndv(tlid, acct_id, id) { function additionalIndv(tlid, acct_id, id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var text = $("[toot-id=" + id + "] .toot a").attr('href'); var text = $('[toot-id=' + id + '] .toot a').attr('href')
var urls = text.match( var urls = text.match(
/https?:\/\/([-a-zA-Z0-9@.]+)\/media\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/ /https?:\/\/([-a-zA-Z0-9@.]+)\/media\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
); )
if (urls) { if (urls) {
$("[toot-id=" + id + "] .toot a").remove(); $('[toot-id=' + id + '] .toot a').remove()
} else { } else {
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem('mode_' + domain) == 'misskey') {
var start = "https://" + domain + "/url?url=" + text; var start = 'https://' + domain + '/url?url=' + text
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
},
//body: JSON.stringify({})
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json.title) {
$("[toot-id=" + id + "] .additional").html(
"<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");
} }
}); //body: JSON.stringify({})
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
if (json.title) {
$('[toot-id=' + id + '] .additional').html(
`<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')
}
})
} else { } else {
var id = $("[toot-id=" + id + "] .toot a").parents('.cvo').attr("toot-id"); var id = $('[toot-id=' + id + '] .toot a')
var start = "https://" + domain + "/api/v1/statuses/" + id; .parents('.cvo')
.attr('toot-id')
var start = 'https://' + domain + '/api/v1/statuses/' + id
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
}, }
//body: JSON.stringify({}) //body: JSON.stringify({})
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
json = json.card;
//このリンク鳥やんけ、ってとき
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">';
} else {
var twiImg = '';
} }
$("[toot-id=" + id + "] .additional").html( return response.json()
'<div class="twitter-tweet"><b>' + escapeHTML(json.author_name) + '</b><br>' + escapeHTML(json.description) + twiImg + '</div>'); })
} else if (json.provider_name == "pixiv") { .catch(function(error) {
if (json.image) { todo(error)
var pxvImg = '<br><img src="' + json.image + '" style="max-width:100%" onclick="imgv(\'pixiv_' + id + '\', 0, \'pixiv\');" id="pixiv_' + id + '-image-0" data-url="' + json.embed_url + '" data-type="image">'; setLog(start, 'JSON', error)
} else { console.error(error)
var pxvImg = ''; })
} .then(function(json) {
$("[toot-id=" + id + "] .additional").html( cards = json.card
'<div class="pixiv-post"><b><a href="' + json.author_url + '" target="_blank">' + escapeHTML(json.author_name) + '</a></b><br>' + escapeHTML(json.title) + pxvImg + '</div>'); var analyze = cardHtml(cards, acct_id, id)
} else { $('[toot-id=' + id + '] .additional').html(analyze)
if (json.title) { if (json.title) {
$("[toot-id=" + id + "] .additional").html( $('[toot-id=' + id + '] a:not(.parsed)').addClass('parsed')
"<span class=\"gray\">URL" + lang.lang_cards_check + ":<br>Title:" + escapeHTML(json.title) + "<br>" + $('[toot-id=' + id + ']').addClass('parsed')
escapeHTML(json.description) + "</span>");
} }
if (json.html) { })
$("[toot-id=" + id + "] .additional").html(json.html + '<i class="material-icons sml pointer" onclick="pip(\'' + id + '\')" title="' + lang.lang_cards_pip + '">picture_in_picture_alt</i>');
}
}
if (json.title) {
$("[toot-id=" + id + "] a:not(.parsed)").addClass("parsed");
$("[toot-id=" + id + "]").addClass("parsed");
}
});
} }
} }
} }
function cardHtml(json, acct_id, id) {
var analyze = ''
var domain = json.url.match(/^https?:\/{2,}(.*?)(?:\/|\?|#|$)/)[1];
var ok = [
"pixiv.net",
"twitter.com",
"mobile.twitter.com",
"open.spotify.com",
"youtube.com",
"youtu.be",
"m.youtube.com",
"www.youtube.com",
"nicovideo.jp",
"twitcasting.tv"
]
var isHad = _.includes(ok, domain);
if (json.provider_name == 'pixiv') {
if (json.image) {
var pxvImg = `
<br><img src="${json.image}" style="max-width:100%"
onclick="imgv('pixiv_${id}',0,'pixiv')" id="pixiv_${id}-image-0"
data-url="${json.embed_url}"
data-type="image">
`
} else {
var pxvImg = ''
}
analyze = `<div class="pixiv-post"><b><a href="
${json.author_url}
" target="_blank">
${escapeHTML(json.author_name)}
</a></b><br>
${escapeHTML(json.title)}
${pxvImg}
</div>`
} else {
if (json.title) {
analyze = `<span class="gray">URL
${lang.lang_cards_check}
:<br>Title:
${escapeHTML(json.title)}
<br>
${escapeHTML(json.description)}
</span>`
}
if (json.html || json.provider_name == 'Twitter') {
if(isHad) {
var prved = `<img class="emoji" draggable="false" alt="✅"
src="https://twemoji.maxcdn.com/v/12.1.3/72x72/2705.png">`
var title = lang.lang_cards_trusted
}else{
var prved = '<img class="emoji" draggable="false" alt="⚠️" src="https://twemoji.maxcdn.com/v/12.1.4/72x72/26a0.png">'
var title = lang.lang_cards_untrusted
}
analyze =`<a onclick="cardHtmlShow('${acct_id}','${id}')" class="add-show pointer" title="${title}">
${lang.lang_parse_html}(${domain})${prved}
</a>${analyze}<br>`
}
}
return analyze
}
function cardHtmlShow(acct_id, id) {
var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem('acct_' + acct_id + '_at')
var text = $('[toot-id=' + id + '] .toot a').attr('href')
var urls = text.match(
/https?:\/\/([-a-zA-Z0-9@.]+)\/media\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/
)
var id = $('[toot-id=' + id + '] .toot a')
.parents('.cvo')
.attr('toot-id')
var start = 'https://' + domain + '/api/v1/statuses/' + id
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
Authorization: 'Bearer ' + at
}
//body: JSON.stringify({})
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
json = json.card
if (json.html) {
analyze =
json.html +
`<i class="material-icons sml pointer" onclick="pip('
${id}
')" title="
${lang.lang_cards_pip}
">picture_in_picture_alt</i>`
}
if (json.provider_name == 'Twitter') {
var url = json.author_url
var status = json.url.match(/^https:\/\/twitter.com\/[_a-zA-Z0-9-]+\/status\/([0-9]+)/);
var statusId = false
if(status){
if(status.length > 0){
var statusId = status[1]
}
}
console.log(statusId)
if(statusId){
url = json.url
analyze = `
<blockquote class="twitter-tweet" data-dnt="true"><strong>${json.author_name}</strong><br>${json.description}<a href="${url}">${json.url}</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
`
}
}
$('[toot-id=' + id + '] .additional').html(analyze)
})
}
//各TL上方のLink[On/Off] //各TL上方のLink[On/Off]
function cardToggle(tlid) { function cardToggle(tlid) {
var card = localStorage.getItem("card_" + tlid); var card = localStorage.getItem('card_' + tlid)
if (!card) { if (!card) {
localStorage.setItem("card_" + tlid, "true"); localStorage.setItem('card_' + tlid, 'true')
$("#sta-card-" + tlid).text("Off"); $('#sta-card-' + tlid).text('Off')
$("#sta-card-" + tlid).css("color", 'red'); $('#sta-card-' + tlid).css('color', 'red')
} else { } else {
localStorage.removeItem("card_" + tlid); localStorage.removeItem('card_' + tlid)
$("#sta-card-" + tlid).text("On"); $('#sta-card-' + tlid).text('On')
$("#sta-card-" + tlid).css("color", '#009688'); $('#sta-card-' + tlid).css('color', '#009688')
} }
} }
//各TL上方のLink[On/Off]をチェック //各TL上方のLink[On/Off]をチェック
function cardCheck(tlid) { function cardCheck(tlid) {
var card = localStorage.getItem("card_" + tlid); var card = localStorage.getItem('card_' + tlid)
if (!card) { if (!card) {
$("#sta-card-" + tlid).text("On"); $('#sta-card-' + tlid).text('On')
$("#sta-card-" + tlid).css("color", '#009688'); $('#sta-card-' + tlid).css('color', '#009688')
} else { } else {
$("#sta-card-" + tlid).text("Off"); $('#sta-card-' + tlid).text('Off')
$("#sta-card-" + tlid).css("color", 'red'); $('#sta-card-' + tlid).css('color', 'red')
} }
} }
function mov(id, tlid, type) { function mov(id, tlid, type) {
if (tlid == "notf") { var click = false
var tlide = "[data-notf=" + acct_id + "]"; if (tlid == 'notf') {
} else if (tlid == "user") { var tlide = '[data-notf=' + acct_id + ']'
var tlide = "#his-data"; } else if (tlid == 'user') {
var tlide = '#his-data'
} else { } else {
var tlide = "[tlid=" + tlid + "]"; var tlide = '[tlid=' + tlid + ']'
} }
var mouseover = localStorage.getItem("mouseover"); var mouseover = localStorage.getItem('mouseover')
if (!mouseover) { if (!mouseover) {
mouseover = ""; mouseover = ''
} }
if (mouseover == "yes") { if (mouseover == 'yes') {
mouseover = "hide"; mouseover = 'hide'
} else if (mouseover == "click") { } else if (mouseover == 'click') {
if (type == "mv") { if (type == 'mv') {
mouseover = ""; mouseover = ''
} else { } else {
mouseover = "hide"; mouseover = 'hide'
} }
} else if (mouseover == "no") { click = true
mouseover = ""; } else if (mouseover == 'no') {
mouseover = ''
} }
if (mouseover == "hide") { if (mouseover == 'hide') {
$(tlide + " [toot-id=" + id + "] .area-actions").toggleClass("hide") if (click) {
$(tlide + " [toot-id=" + id + "] .area-side").toggleClass("hide") $(tlide + ' [toot-id=' + id + ']').toggleClass('hide-actions')
} else {
$(tlide + ' [toot-id=' + id + ']').removeClass('hide-actions')
}
//$(tlide + " [toot-id=" + id + "] .area-vis").toggleClass("hide")
//$(tlide + " [toot-id=" + id + "] .area-actions").toggleClass("hide")
//$(tlide + " [toot-id=" + id + "] .area-side").toggleClass("hide")
} }
} }
function resetmv(type) { function resetmv(type) {
var mouseover = localStorage.getItem("mouseover"); var mouseover = localStorage.getItem('mouseover')
if (!mouseover) { if (!mouseover) {
mouseover = ""; mouseover = ''
} else if (mouseover == "yes") { } else if (mouseover == 'yes') {
mouseover = "hide"; mouseover = 'hide'
} else if (mouseover == "no") { } else if (mouseover == 'no') {
mouseover = ""; mouseover = ''
} else if (mouseover == "click" && type != "mv") { } else if (mouseover == 'click' && type != 'mv') {
mouseover = "hide"; mouseover = 'hide'
} }
if (mouseover == "hide") { if (mouseover == 'hide') {
$(".area-actions").addClass("hide"); $('.cvo').addClass('hide-actions')
$(".area-side").addClass("hide"); //$(".area-vis").addClass("hide");
//$(".area-actions").addClass("hide");
//$(".area-side").addClass("hide");
} }
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,95 +1,98 @@
//日付パーサー //日付パーサー
function date(str, datetype) { function date(str, datetype, lastStatus) {
if (datetype == "relative") { if (lastStatus) {
return '<time class="timeago" datetime="' + str + '"></time>'; var date = new Date(str)
return date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate()
} else if (datetype == "relative") {
return '<time class="timeago" datetime="' + str + '"></time>'
} else { } else {
var date = new Date(str); var date = new Date(str)
if (datetype == "unix") { if (datetype == "unix") {
var unixm = date.getTime(); var unixm = date.getTime()
return Math.floor(unixm / 1000); return Math.floor(unixm / 1000)
} }
var now = new Date(); var now = new Date()
var month = date.getMonth() + 1; var month = date.getMonth() + 1
if (date.getMinutes() < 10) { if (date.getMinutes() < 10) {
var min = "0" + date.getMinutes(); var min = "0" + date.getMinutes()
} else { } else {
var min = date.getMinutes(); var min = date.getMinutes()
} }
var sec = null; var sec = null
if (date.getSeconds() < 10) { if (date.getSeconds() < 10) {
sec = "0" + date.getSeconds(); sec = "0" + date.getSeconds()
} else { } else {
sec = date.getSeconds(); sec = date.getSeconds()
} }
if (datetype == "full") { if (datetype == "full") {
var ret = date.getFullYear() + "/" + month + "/" + date.getDate() + "/ " + var ret = date.getFullYear() + "/" + month + "/" + date.getDate() + "/ " +
date.getHours() + ":" + min + ":" + sec; date.getHours() + ":" + min + ":" + sec
} }
if (date.getFullYear() == now.getFullYear()) { if (date.getFullYear() == now.getFullYear()) {
if (date.getMonth() == now.getMonth()) { if (date.getMonth() == now.getMonth()) {
if (date.getDate() == now.getDate()) { if (date.getDate() == now.getDate()) {
if (datetype == "medium") { if (datetype == "medium") {
var ret = '<time class="timeago" datetime="' + str + '"></time>'; var ret = '<time class="timeago" datetime="' + str + '"></time>'
} else { } else {
var ret = date.getHours() + ":" + min + ":" + sec; var ret = date.getHours() + ":" + min + ":" + sec
} }
} else { } else {
var ret = month + "/" + date.getDate() + " " + date.getHours() + ":" + var ret = month + "/" + date.getDate() + " " + date.getHours() + ":" +
min + ":" + sec; min + ":" + sec
} }
} else { } else {
var ret = month + "/" + date.getDate() + " " + date.getHours() + ":" + min + var ret = month + "/" + date.getDate() + " " + date.getHours() + ":" + min +
":" + sec; ":" + sec
} }
} else { } else {
var ret = date.getFullYear() + "/" + month + "/" + date.getDate() + " " + var ret = date.getFullYear() + "/" + month + "/" + date.getDate() + " " +
date.getHours() + ":" + min + ":" + sec; date.getHours() + ":" + min + ":" + sec
} }
if (datetype == "double") { if (datetype == "double") {
return '<time class="timeago" datetime="' + str + '"></time>/' + ret; return '<time class="timeago" datetime="' + str + '"></time>/' + ret
} else { } else {
return ret; return ret
} }
} }
} }
//特殊フォーマット(インスタンス情報で利用) //特殊フォーマット(インスタンス情報で利用)
function crat(str) { function crat(str) {
var date = new Date(str); var date = new Date(str)
var mnt = null; var mnt = null
if (date.getMonth() < 9) { if (date.getMonth() < 9) {
mnt = "0" + (date.getMonth() + 1); mnt = "0" + (date.getMonth() + 1)
} else { } else {
mnt = date.getMonth() + 1; mnt = date.getMonth() + 1
} }
if (date.getDate() < 10) { if (date.getDate() < 10) {
var dat = "0" + date.getDate(); var dat = "0" + date.getDate()
} else { } else {
var dat = date.getDate(); var dat = date.getDate()
} }
if (date.getHours() < 10) { if (date.getHours() < 10) {
var hrs = "0" + date.getHours(); var hrs = "0" + date.getHours()
} else { } else {
var hrs = date.getHours(); var hrs = date.getHours()
} }
if (date.getMinutes() < 10) { if (date.getMinutes() < 10) {
var mns = "0" + date.getMinutes(); var mns = "0" + date.getMinutes()
} else { } else {
var mns = date.getMinutes(); var mns = date.getMinutes()
} }
if (date.getSeconds() < 10) { if (date.getSeconds() < 10) {
var sec = "0" + date.getSeconds(); var sec = "0" + date.getSeconds()
} else { } else {
var sec = date.getSeconds(); var sec = date.getSeconds()
} }
format_str = 'YYYY-MM-DD hh:mm:ss'; format_str = 'YYYY-MM-DD hh:mm:ss'
format_str = format_str.replace(/YYYY/g, date.getFullYear()); format_str = format_str.replace(/YYYY/g, date.getFullYear())
format_str = format_str.replace(/MM/g, mnt); format_str = format_str.replace(/MM/g, mnt)
format_str = format_str.replace(/DD/g, dat); format_str = format_str.replace(/DD/g, dat)
format_str = format_str.replace(/hh/g, hrs); format_str = format_str.replace(/hh/g, hrs)
format_str = format_str.replace(/mm/g, mns); format_str = format_str.replace(/mm/g, mns)
format_str = format_str.replace(/ss/g, sec); format_str = format_str.replace(/ss/g, sec)
return format_str; return format_str
} }

View File

@@ -1,69 +1,76 @@
//ディレクトリ //ディレクトリ
//ディレクトリトグル //ディレクトリトグル
function dirMenu() { function dirMenu() {
$("#dir-contents").html(""); $("#dir-contents").html("")
directory(); directory()
$("#left-menu div").removeClass("active"); $("#left-menu a").removeClass("active")
$("#dirMenu").addClass("active"); $("#dirMenu").addClass("active")
$(".menu-content").addClass("hide"); $(".menu-content").addClass("hide")
$("#dir-box").removeClass("hide"); $("#dir-box").removeClass("hide")
} }
function dirselCk() { function dirselCk() {
var acct = $("#dir-acct-sel").val(); var acct = $("#dir-acct-sel").val()
if (acct == "noauth") { if (acct == "noauth") {
$("#dirNoAuth").removeClass("hide"); $("#dirNoAuth").removeClass("hide")
} else { } else {
$("#dirNoAuth").addClass("hide"); $("#dirNoAuth").addClass("hide")
directory(); directory()
} }
} }
function directory(isMore) { function directory(isMore) {
var order = $("[name=sort]:checked").val() var order = $("[name=sort]:checked").val()
if (!order) { if (!order) {
order = "active" order = "active"
} }
var local_only = $("#local_only:checked").val() var local_only = $("#local_only:checked").val()
if (local_only) { if (local_only) {
local_only = "true" local_only = "true"
} else { } else {
local_only = "false" local_only = "false"
} }
var acct_id = $("#dir-acct-sel").val(); var acct_id = $("#dir-acct-sel").val()
if (acct_id == "noauth") { if (acct_id == "noauth") {
var domain = $("#dirNoAuth-url").val(); var domain = $("#dirNoAuth-url").val()
var at = ""; var at = ""
} else { } else {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem("domain_" + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem("acct_" + acct_id + "_at")
} }
if (isMore) { if (isMore) {
var addOffset = $("#dir-contents .cvo").length var addOffset = $("#dir-contents .cvo").length
} else { } else {
var addOffset = 0 var addOffset = 0
$("#dir-contents").html(""); $("#dir-contents").html("")
} }
var start = "https://" + domain + "/api/v1/directory?order=" + order + "&local=" + local_only + "&offset=" + addOffset var start = "https://" + domain + "/api/v1/directory?order=" + order + "&local=" + local_only + "&offset=" + addOffset
console.log(start) console.log(start)
fetch(start, { fetch(start, {
method: 'GET', method: "GET",
headers: { headers: {
'content-type': 'application/json', "content-type": "application/json",
'Authorization': 'Bearer ' + at Authorization: "Bearer " + at
}, }
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
//todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
if (json) { }
$("#moreDir").removeClass("disabled") return response.json()
var html = userparse(json, null, acct_id, "dir", null) })
$("#dir-contents").append(html) .catch(function(error) {
jQuery("time.timeago").timeago(); setLog(start, "JSON", error)
} else { console.error(error)
$("#moreDir").addClass("disabled") })
} .then(function(json) {
if (json) {
}); $("#moreDir").removeClass("disabled")
} var html = userparse(json, null, acct_id, "dir", null)
$("#dir-contents").append(html)
jQuery("time.timeago").timeago()
} else {
$("#moreDir").addClass("disabled")
}
})
}

View File

@@ -1,522 +1,498 @@
//DM(Conv) TL //DM(Conv) TL
function dm(acct_id, tlid, type, delc, voice) { function dm(acct_id, tlid, type, delc, voice) {
var domain = localStorage.getItem("domain_" + acct_id)
var domain = localStorage.getItem("domain_" + acct_id); var at = localStorage.getItem("acct_" + acct_id + "_at")
var at = localStorage.getItem("acct_" + acct_id + "_at"); var start = "https://" + domain + "/api/v1/conversations"
var start = "https://" + domain + "/api/v1/conversations";
fetch(start, { fetch(start, {
method: 'GET', method: "GET",
headers: { headers: {
'content-type': 'application/json', "content-type": "application/json",
'Authorization': 'Bearer ' + at Authorization: "Bearer " + at
}, }
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
var templete = '<div id="convList' + tlid + '">' + dmListParse(json, type, acct_id, tlid, "", mute) + '</div>'; }
localStorage.setItem("lastobj_" + tlid, json[0].id) return response.json()
$("#timeline_" + tlid).html(templete); })
additional(acct_id, tlid); .catch(function(error) {
jQuery("time.timeago").timeago(); todo(error)
todc(); setLog(start, "JSON", error)
//reload(type, '', acct_id, tlid, data, mute, delc,voice); console.error(error)
$(window).scrollTop(0); })
}); .then(function(json) {
var templete = '<div id="convList' + tlid + '">' + dmListParse(json, type, acct_id, tlid, "", mute) + "</div>"
localStorage.setItem("lastobj_" + tlid, json[0].id)
$("#timeline_" + tlid).html(templete)
additional(acct_id, tlid)
jQuery("time.timeago").timeago()
todc()
//reload(type, '', acct_id, tlid, data, mute, delc,voice);
$(window).scrollTop(0)
})
} }
function dmmore(tlid) { function dmmore(tlid) {
var multi = localStorage.getItem("column"); var multi = localStorage.getItem("column")
var obj = JSON.parse(multi); var obj = JSON.parse(multi)
var acct_id = obj[tlid].domain; var acct_id = obj[tlid].domain
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem("domain_" + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem("acct_" + acct_id + "_at")
var sid = $("#timeline_" + tlid + " .cvo").last().attr("unique-id"); var sid = $("#timeline_" + tlid + " .cvo")
var start = "https://" + domain + "/api/v1/conversations?max_id=" + sid; .last()
var type = "dm"; .attr("unique-id")
var start = "https://" + domain + "/api/v1/conversations?max_id=" + sid
var type = "dm"
fetch(start, { fetch(start, {
method: 'GET', method: "GET",
headers: { headers: {
'content-type': 'application/json', "content-type": "application/json",
'Authorization': 'Bearer ' + at Authorization: "Bearer " + at
}, }
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
var templete = '<div id="convList' + tlid + '">' + dmListParse(json, type, acct_id, tlid, "", mute) + '</div>';
$("#timeline_" + tlid).append(templete);
additional(acct_id, tlid);
jQuery("time.timeago").timeago();
moreloading = false;
}) })
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, "JSON", error)
console.error(error)
})
.then(function(json) {
var templete = '<div id="convList' + tlid + '">' + dmListParse(json, type, acct_id, tlid, "", mute) + "</div>"
$("#timeline_" + tlid).append(templete)
additional(acct_id, tlid)
jQuery("time.timeago").timeago()
moreloading = false
})
} }
//DMオブジェクトパーサー(トゥート) //DMオブジェクトパーサー(トゥート)
function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) { function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
var templete = ''; var templete = ""
if (obj[0]) { if (obj[0]) {
localStorage.setItem("lastunix_" + tlid, date(obj[0].created_at, 'unix')); localStorage.setItem("lastunix_" + tlid, date(obj[0].created_at, "unix"))
} }
var actb = localStorage.getItem("action_btns"); var actb = localStorage.getItem("action_btns")
var actb = 're,rt,fav,qt,del,pin,red'; var actb = "re,rt,fav,qt,del,pin,red"
if (actb) { if (actb) {
var actb = actb.split(','); var actb = actb.split(",")
var disp = {}; var disp = {}
for (var k = 0; k < actb.length; k++) { for (var k = 0; k < actb.length; k++) {
if (k < 4) { if (k < 4) {
var tp = "type-a"; var tp = "type-a"
} else { } else {
var tp = "type-b"; var tp = "type-b"
} }
disp[actb[k]] = tp; disp[actb[k]] = tp
} }
} }
var datetype = localStorage.getItem("datetype"); var datetype = localStorage.getItem("datetype")
var nsfwtype = localStorage.getItem("nsfw"); var nsfwtype = localStorage.getItem("nsfw")
var sent = localStorage.getItem("sentence"); var sent = localStorage.getItem("sentence")
var ltr = localStorage.getItem("letters"); var ltr = localStorage.getItem("letters")
var gif = localStorage.getItem("gif"); var gif = localStorage.getItem("gif")
var imh = localStorage.getItem("img-height"); var imh = localStorage.getItem("img-height")
//独自ロケール //独自ロケール
var locale = localStorage.getItem("locale"); var locale = localStorage.getItem("locale")
if (locale == "yes") { if (locale == "yes") {
var locale = false; var locale = false
} }
//ネイティブ通知 //ネイティブ通知
var native = localStorage.getItem("nativenotf"); var native = localStorage.getItem("nativenotf")
if (!native) { if (!native) {
native = "yes"; native = "yes"
} }
//クライアント強調 //クライアント強調
var emp = localStorage.getItem("client_emp"); var emp = localStorage.getItem("client_emp")
if (emp) { if (emp) {
var emp = JSON.parse(emp); var emp = JSON.parse(emp)
} }
//クライアントミュート //クライアントミュート
var mute = localStorage.getItem("client_mute"); var mute = localStorage.getItem("client_mute")
if (mute) { if (mute) {
var mute = JSON.parse(mute); var mute = JSON.parse(mute)
} }
//ユーザー強調 //ユーザー強調
var useremp = localStorage.getItem("user_emp"); var useremp = localStorage.getItem("user_emp")
if (useremp) { if (useremp) {
var useremp = JSON.parse(useremp); var useremp = JSON.parse(useremp)
} }
//ワード強調 //ワード強調
var wordemp = localStorage.getItem("word_emp"); var wordemp = localStorage.getItem("word_emp")
if (wordemp) { if (wordemp) {
var wordemp = JSON.parse(wordemp); var wordemp = JSON.parse(wordemp)
} }
//ワードミュート //ワードミュート
var wordmute = localStorage.getItem("word_mute"); var wordmute = localStorage.getItem("word_mute")
if (wordmute) { if (wordmute) {
var wordmute = JSON.parse(wordmute); var wordmute = JSON.parse(wordmute)
wordmute = wordmute.concat(mutefilter); wordmute = wordmute.concat(mutefilter)
} else { } else {
wordmute = mutefilter; wordmute = mutefilter
} }
//Ticker //Ticker
var tickerck = localStorage.getItem("ticker_ok"); var tickerck = localStorage.getItem("ticker_ok")
if (tickerck) { if (tickerck) {
var ticker = true; var ticker = true
} else { } else {
var ticker = false; var ticker = false
} }
//Cards //Cards
var card = localStorage.getItem("card_" + tlid); var card = localStorage.getItem("card_" + tlid)
if (!sent) { if (!sent) {
var sent = 500; var sent = 500
} }
if (!ltr) { if (!ltr) {
var ltr = 500; var ltr = 500
} }
if (!nsfwtype || nsfwtype == "yes") { if (!nsfwtype || nsfwtype == "yes") {
var nsfw = "ok"; var nsfw = "ok"
} else { } else {
var nsfw; var nsfw
} }
var cwtype = localStorage.getItem("cw"); var cwtype = localStorage.getItem("cw")
if (!cwtype || cwtype == "yes") { if (!cwtype || cwtype == "yes") {
var cw = "ok"; var cw = "ok"
} else { } else {
var cw; var cw
} }
if (!datetype) { if (!datetype) {
datetype = "absolute"; datetype = "absolute"
} }
if (!gif) { if (!gif) {
var gif = "yes"; var gif = "yes"
} }
if (!imh) { if (!imh) {
var imh = "200"; var imh = "200"
} }
if (!emp) { if (!emp) {
var emp = []; var emp = []
} }
if (!mute) { if (!mute) {
var mute = []; var mute = []
} }
if (!useremp) { if (!useremp) {
var useremp = []; var useremp = []
} }
if (!wordemp) { if (!wordemp) {
var wordemp = []; var wordemp = []
} }
if (!wordmute) { if (!wordmute) {
var wordmute = []; var wordmute = []
} }
//via通知 //via通知
var viashow = localStorage.getItem("viashow"); var viashow = localStorage.getItem("viashow")
if (!viashow) { if (!viashow) {
viashow = "via-hide"; viashow = "via-hide"
} }
if (viashow == "hide") { if (viashow == "hide") {
viashow = "via-hide"; viashow = "via-hide"
} }
//認証なしTL //認証なしTL
if (mix == "noauth") { if (mix == "noauth") {
var noauth = "hide"; var noauth = "hide"
var antinoauth = ""; var antinoauth = ""
} else { } else {
var noauth = ""; var noauth = ""
var antinoauth = "hide"; var antinoauth = "hide"
} }
//マウスオーバーのみ //マウスオーバーのみ
var mouseover = localStorage.getItem("mouseover"); var mouseover = localStorage.getItem("mouseover")
if (!mouseover) { if (!mouseover) {
mouseover = ""; mouseover = ""
} else if (mouseover == "yes" || mouseover == "click") { } else if (mouseover == "yes" || mouseover == "click") {
mouseover = "hide"; mouseover = "hide"
} else if (mouseover == "no") { } else if (mouseover == "no") {
mouseover = ""; mouseover = ""
} }
var local = []; var local = []
var times = []; var times = []
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function(key) {
var conv_id = obj[key].id; var conv_id = obj[key].id
var toot = obj[key].last_status; var toot = obj[key].last_status
var dis_name = escapeHTML(toot.account.display_name); var dis_name = escapeHTML(toot.account.display_name)
if (toot.account.emojis) { if (toot.account.emojis) {
var actemojick = toot.account.emojis[0]; var actemojick = toot.account.emojis[0]
} else { } else {
var actemojick = false; var actemojick = false
} }
//絵文字があれば //絵文字があれば
if (actemojick) { if (actemojick) {
Object.keys(toot.account.emojis).forEach(function (key5) { Object.keys(toot.account.emojis).forEach(function(key5) {
var emoji = toot.account.emojis[key5]; var emoji = toot.account.emojis[key5]
var shortcode = emoji.shortcode; var shortcode = emoji.shortcode
var emoji_url = '<img src="' + emoji.url + var emoji_url = '<img src="' + emoji.url + '" class="emoji-img" data-emoji="' + shortcode + '" alt=" :' + shortcode + ': ">'
'" class="emoji-img" data-emoji="' + shortcode + '" alt=" :' + shortcode + ': ">'; var regExp = new RegExp(":" + shortcode + ":", "g")
var regExp = new RegExp(":" + shortcode + ":", "g"); dis_name = dis_name.replace(regExp, emoji_url)
dis_name = dis_name.replace(regExp, emoji_url); })
});
} }
var noticeavatar = ""; var noticeavatar = ""
var if_notf = ""; var if_notf = ""
var uniqueid = toot.id; var uniqueid = toot.id
var notice = ""; var notice = ""
var boostback = ""; var boostback = ""
//ユーザー強調 //ユーザー強調
if (toot.account.username != toot.account.acct) { if (toot.account.username != toot.account.acct) {
var fullname = toot.account.acct; var fullname = toot.account.acct
} else { } else {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem("domain_" + acct_id)
var fullname = toot.account.acct + "@" + domain; var fullname = toot.account.acct + "@" + domain
} }
if (useremp) { if (useremp) {
Object.keys(useremp).forEach(function (key10) { Object.keys(useremp).forEach(function(key10) {
var user = useremp[key10]; var user = useremp[key10]
if (user == fullname) { if (user == fullname) {
boostback = "emphasized"; boostback = "emphasized"
} }
}); })
} }
var id = toot.id; var id = toot.id
var home = ""; var home = ""
if (toot.account.locked) { if (toot.account.locked) {
var locked = ' <i class="fas fa-lock red-text"></i>'; var locked = ' <i class="fas fa-lock red-text"></i>'
} else { } else {
var locked = ""; var locked = ""
} }
if (!toot.application) { if (!toot.application) {
var via = ''; var via = ""
viashow = "hide"; viashow = "hide"
} else { } else {
var via = escapeHTML(toot.application.name); var via = escapeHTML(toot.application.name)
//強調チェック //強調チェック
Object.keys(emp).forEach(function (key6) { Object.keys(emp).forEach(function(key6) {
var cli = emp[key6]; var cli = emp[key6]
if (cli == via) { if (cli == via) {
boostback = "emphasized"; boostback = "emphasized"
} }
}); })
//ミュートチェック //ミュートチェック
Object.keys(mute).forEach(function (key7) { Object.keys(mute).forEach(function(key7) {
var cli = mute[key7]; var cli = mute[key7]
if (cli == via) { if (cli == via) {
boostback = "hide"; boostback = "hide"
} }
}); })
} }
if (mix == "pinned") { if (mix == "pinned") {
boostback = "emphasized"; boostback = "emphasized"
} }
if (toot.spoiler_text && cw) { if (toot.spoiler_text && cw) {
var content = toot.content; var content = toot.content
var spoil = escapeHTML(toot.spoiler_text); var spoil = escapeHTML(toot.spoiler_text)
var spoiler = "cw cw_hide_" + toot.id; var spoiler = "cw cw_hide_" + toot.id
var api_spoil = "gray"; var api_spoil = "gray"
var spoiler_show = '<a href="#" onclick="cw_show(\'' + toot.id + var spoiler_show = '<a href="#" onclick="cw_show(\'' + toot.id + '\')" class="nex parsed">' + lang.lang_parse_cwshow + "</a><br>"
'\')" class="nex parsed">' + lang.lang_parse_cwshow + '</a><br>';
} else { } else {
var ct1 = toot.content.split('</p>').length + toot.content.split('<br />').length - 2; var ct1 = toot.content.split("</p>").length + toot.content.split("<br />").length - 2
var ct2 = toot.content.split('</p>').length + toot.content.split('<br>').length - 2; var ct2 = toot.content.split("</p>").length + toot.content.split("<br>").length - 2
if (ct1 > ct2) { var ct = ct1; } else { var ct = ct2; } if (ct1 > ct2) {
if ((sent < ct && $.mb_strlen($.strip_tags(toot.content)) > 5) || ($.strip_tags(toot.content).length > ltr && $.mb_strlen($.strip_tags(toot.content)) > 5)) { var ct = ct1
var content = '<span class="gray">' + lang.lang_parse_fulltext + '</span><br>' + toot.content
var spoil = '<span class="cw-long-' + toot.id + '">' + $.mb_substr($.strip_tags(
toot.content), 0, 100) +
'</span><span class="gray">' + lang.lang_parse_autofold + '</span>';
var spoiler = "cw cw_hide_" + toot.id;
var spoiler_show = '<a href="#" onclick="cw_show(\'' + toot.id +
'\')" class="nex parsed">' + lang.lang_parse_more + '</a><br>';
} else { } else {
var content = toot.content; var ct = ct2
var spoil = escapeHTML(toot.spoiler_text); }
var spoiler = ""; if ((sent < ct && $.mb_strlen($.strip_tags(toot.content)) > 5) || ($.strip_tags(toot.content).length > ltr && $.mb_strlen($.strip_tags(toot.content)) > 5)) {
var spoiler_show = ""; var content = '<span class="gray">' + lang.lang_parse_fulltext + "</span><br>" + toot.content
var spoil = '<span class="cw-long-' + toot.id + '">' + $.mb_substr($.strip_tags(toot.content), 0, 100) + '</span><span class="gray">' + lang.lang_parse_autofold + "</span>"
var spoiler = "cw cw_hide_" + toot.id
var spoiler_show = '<a href="#" onclick="cw_show(\'' + toot.id + '\')" class="nex parsed">' + lang.lang_parse_more + "</a><br>"
} else {
var content = toot.content
var spoil = escapeHTML(toot.spoiler_text)
var spoiler = ""
var spoiler_show = ""
} }
} }
var urls = $.strip_tags(content).replace(/\n/g, " ").match( var urls = $.strip_tags(content)
/https?:\/\/([-a-zA-Z0-9@.]+)\/?(?!.*((media|tags)|mentions)).*([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)?/ .replace(/\n/g, " ")
); .match(/https?:\/\/([-a-zA-Z0-9@.]+)\/?(?!.*((media|tags)|mentions)).*([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)?/)
if (urls) { if (urls) {
var analyze = '<a onclick="additionalIndv(\'' + tlid + '\',' + acct_id + var analyze = "<a onclick=\"additionalIndv('" + tlid + "'," + acct_id + ",'" + id + '\')" class="add-show pointer">' + lang.lang_parse_url + "</a><br>"
',\'' + id + '\')" class="add-show pointer">' + lang.lang_parse_url + '</a><br>';
} else { } else {
var analyze = ''; var analyze = ""
} }
var viewer = ""; var viewer = ""
var hasmedia = ""; var hasmedia = ""
var youtube = ""; var youtube = ""
if (toot.emojis) { if (toot.emojis) {
var emojick = toot.emojis[0]; var emojick = toot.emojis[0]
} else { } else {
var emojick = false; var emojick = false
} }
//絵文字があれば //絵文字があれば
if (emojick) { if (emojick) {
Object.keys(toot.emojis).forEach(function (key5) { Object.keys(toot.emojis).forEach(function(key5) {
var emoji = toot.emojis[key5]; var emoji = toot.emojis[key5]
var shortcode = emoji.shortcode; var shortcode = emoji.shortcode
var emoji_url = '<img src="' + emoji.url + var emoji_url = '<img src="' + emoji.url + '" class="emoji-img" data-emoji="' + shortcode + '" alt=" :' + shortcode + ': ">'
'" class="emoji-img" data-emoji="' + shortcode + '" alt=" :' + shortcode + ': ">'; var regExp = new RegExp(":" + shortcode + ":", "g")
var regExp = new RegExp(":" + shortcode + ":", "g"); content = content.replace(regExp, emoji_url)
content = content.replace(regExp, emoji_url); spoil = spoil.replace(regExp, emoji_url)
spoil = spoil.replace(regExp, emoji_url); })
});
} }
//ニコフレ絵文字 //ニコフレ絵文字
if (toot.profile_emojis) { if (toot.profile_emojis) {
var nicoemojick = toot.profile_emojis[0]; var nicoemojick = toot.profile_emojis[0]
} else { } else {
var nicoemojick = false; var nicoemojick = false
} }
//絵文字があれば //絵文字があれば
if (nicoemojick) { if (nicoemojick) {
Object.keys(toot.profile_emojis).forEach(function (keynico) { Object.keys(toot.profile_emojis).forEach(function(keynico) {
var emoji = toot.profile_emojis[keynico]; var emoji = toot.profile_emojis[keynico]
var shortcode = emoji.shortcode; var shortcode = emoji.shortcode
var emoji_url = '<img src="' + emoji.url + var emoji_url = '<img src="' + emoji.url + '" class="emoji-img" data-emoji="' + shortcode + '" alt=" :' + shortcode + ': ">'
'" class="emoji-img" data-emoji="' + shortcode + '" alt=" :' + shortcode + ': ">'; var regExp = new RegExp(":" + shortcode + ":", "g")
var regExp = new RegExp(":" + shortcode + ":", "g"); content = content.replace(regExp, emoji_url)
content = content.replace(regExp, emoji_url); spoil = spoil.replace(regExp, emoji_url)
spoil = spoil.replace(regExp, emoji_url); })
});
} }
//デフォ絵文字 //デフォ絵文字
content = twemoji.parse(content); content = twemoji.parse(content)
if (dis_name) { if (dis_name) {
dis_name = twemoji.parse(dis_name); dis_name = twemoji.parse(dis_name)
} }
if (spoil) { if (spoil) {
spoil = twemoji.parse(spoil); spoil = twemoji.parse(spoil)
} }
var mediack = toot.media_attachments[0]; var mediack = toot.media_attachments[0]
//メディアがあれば //メディアがあれば
var media_ids = ""; var media_ids = ""
if (mediack) { if (mediack) {
hasmedia = "hasmedia"; hasmedia = "hasmedia"
var cwdt = 100 / toot.media_attachments.length; var cwdt = 100 / toot.media_attachments.length
Object.keys(toot.media_attachments).forEach(function (key2) { Object.keys(toot.media_attachments).forEach(function(key2) {
var media = toot.media_attachments[key2]; var media = toot.media_attachments[key2]
var purl = media.preview_url; var purl = media.preview_url
media_ids = media_ids + media.id + ","; media_ids = media_ids + media.id + ","
var url = media.url; var url = media.url
if (toot.sensitive && nsfw) { if (toot.sensitive && nsfw) {
var sense = "sensitive" var sense = "sensitive"
} else { } else {
var sense = "" var sense = ""
} }
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',\'' + viewer = viewer + "<a onclick=\"imgv('" + id + "','" + key2 + "','" + acct_id + '\')" id="' + id + "-image-" + key2 + '" data-url="' + url + '" data-type="' + media.type + '" class="img-parsed"><img src="' + purl + '" class="' + sense + ' toot-img pointer" style="width:' + cwdt + "%; height:" + imh + 'px;"></a></span>'
acct_id + '\')" id="' + id + '-image-' + key2 + '" data-url="' + url + })
'" data-type="' + media.type + '" class="img-parsed"><img src="' + media_ids = media_ids.slice(0, -1)
purl + '" class="' + sense +
' toot-img pointer" style="width:' + cwdt + '%; height:' + imh + 'px;"></a></span>';
});
media_ids = media_ids.slice(0, -1);
} else { } else {
viewer = ""; viewer = ""
hasmedia = "nomedia"; hasmedia = "nomedia"
} }
var menck = toot.mentions[0]; var menck = toot.mentions[0]
var mentions = ""; var mentions = ""
//メンションであれば //メンションであれば
if (menck) { if (menck) {
mentions = ""; mentions = ""
Object.keys(toot.mentions).forEach(function (key3) { Object.keys(toot.mentions).forEach(function(key3) {
var mention = toot.mentions[key3]; var mention = toot.mentions[key3]
mentions = mentions + '<a onclick="udg(\'' + mention.id + '\',' + mentions = mentions + "<a onclick=\"udg('" + mention.id + "'," + acct_id + ')" class="pointer">@' + mention.acct + "</a> "
acct_id + ')" class="pointer">@' + mention.acct + '</a> '; })
}); mentions = '<div style="float:right">' + mentions + "</div>"
mentions = '<div style="float:right">' + mentions + '</div>';
} }
var tagck = toot.tags[0]; var tagck = toot.tags[0]
var tags = ""; var tags = ""
//タグであれば //タグであれば
if (tagck) { if (tagck) {
Object.keys(toot.tags).forEach(function (key4) { Object.keys(toot.tags).forEach(function(key4) {
var tag = toot.tags[key4]; var tag = toot.tags[key4]
tags = tags + '<span class="hide" data-tag="' + tag.name + '">#' + tag.name + ':<a onclick="tl(\'tag\',\'' + tag.name + '\',' + acct_id + tags = tags + '<span class="hide" data-tag="' + tag.name + '">#' + tag.name + ":<a onclick=\"tl('tag','" + tag.name + "'," + acct_id + ',\'add\')" class="pointer" title="' + lang.lang_parse_tagTL.replace("{{tag}}", "#" + tag.name) + '">TL</a> <a onclick="brInsert(\'#' + tag.name + '\')" class="pointer" title="' + lang.lang_parse_tagtoot.replace("{{tag}}", "#" + tag.name) + '">Toot</a> ' + "<a onclick=\"tagPin('" + tag.name + '\')" class="pointer" title="' + lang.lang_parse_tagpin.replace("{{tag}}", "#" + tag.name) + '">Pin</a></span> '
',\'add\')" class="pointer" title="' + lang.lang_parse_tagTL.replace("{{tag}}", '#' + tag.name) + '">TL</a> <a onclick="brInsert(\'#' + tag.name + '\')" class="pointer" title="' + lang.lang_parse_tagtoot.replace("{{tag}}", '#' + tag.name) + '">Toot</a> ' + })
'<a onclick="tagPin(\'' + tag.name + '\')" class="pointer" title="' + lang.lang_parse_tagpin.replace("{{tag}}", '#' + tag.name) + '">Pin</a></span> '; tags = '<div style="float:right">' + tags + "</div>"
});
tags = '<div style="float:right">' + tags + '</div>';
} }
//アニメ再生 //アニメ再生
if (gif == "yes") { if (gif == "yes") {
var avatar = toot.account.avatar; var avatar = toot.account.avatar
} else { } else {
var avatar = toot.account.avatar_static; var avatar = toot.account.avatar_static
} }
//ワードミュート //ワードミュート
if (wordmute) { if (wordmute) {
Object.keys(wordmute).forEach(function (key8) { Object.keys(wordmute).forEach(function(key8) {
var worde = wordmute[key8]; var worde = wordmute[key8]
if (worde) { if (worde) {
if (worde.tag) { if (worde.tag) {
var word = worde.tag; var word = worde.tag
} else { } else {
var word = worde var word = worde
} }
var regExp = new RegExp(word, "g"); var regExp = new RegExp(word, "g")
if ($.strip_tags(content).match(regExp)) { if ($.strip_tags(content).match(regExp)) {
boostback = "hide by_filter"; boostback = "hide by_filter"
} }
} }
}); })
} }
//ワード強調 //ワード強調
if (wordemp) { if (wordemp) {
Object.keys(wordemp).forEach(function (key9) { Object.keys(wordemp).forEach(function(key9) {
var word = wordemp[key9]; var word = wordemp[key9]
if (word) { if (word) {
var word = word.tag; var word = word.tag
var regExp = new RegExp(word, "g"); var regExp = new RegExp(word, "g")
content = content.replace(regExp, '<span class="emp">' + escapeHTML(word) + "</span>"); content = content.replace(regExp, '<span class="emp">' + escapeHTML(word) + "</span>")
} }
}); })
} }
//日本語じゃない //日本語じゃない
if (toot.language != "ja") { if (toot.language != "ja") {
var trans = '<div class="action pin"><a onclick="trans(\'' + toot.language + '\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_parse_trans + '"><i class="material-icons">g_translate</i></a></div>'; var trans = '<div class="action pin"><a onclick="trans(\'' + toot.language + '\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="' + lang.lang_parse_trans + '"><i class="material-icons">g_translate</i></a></div>'
} else { } else {
var trans = ""; var trans = ""
} }
if (toot.favourited) { if (toot.favourited) {
var if_fav = " yellow-text"; var if_fav = " yellow-text"
var fav_app = "faved"; var fav_app = "faved"
} else { } else {
var if_fav = ""; var if_fav = ""
var fav_app = ""; var fav_app = ""
} }
//Cards //Cards
if (!card && toot.card) { if (!card && toot.card) {
var cards = toot.card; var cards = toot.card
if (cards.provider_name == "Twitter") { if (cards.provider_name == "Twitter") {
if (cards.image) { if (cards.image) {
var twiImg = '<br><img src="' + cards.image + '">'; var twiImg = '<br><img src="' + cards.image + '">'
} else { } else {
var twiImg = ''; var twiImg = ""
} }
analyze = '<blockquote class="twitter-tweet"><b>' + escapeHTML(cards.author_name) + '</b><br>' + escapeHTML(cards.description) + twiImg + '</blockquote>'; analyze = '<blockquote class="twitter-tweet"><b>' + escapeHTML(cards.author_name) + "</b><br>" + escapeHTML(cards.description) + twiImg + "</blockquote>"
} }
if (cards.title) { if (cards.title) {
analyze = "<span class=\"gray\">URL" + lang.lang_cards_check + ":<br>Title:" + escapeHTML(cards.title) + "<br>" + analyze = '<span class="gray">URL' + lang.lang_cards_check + ":<br>Title:" + escapeHTML(cards.title) + "<br>" + escapeHTML(cards.description) + "</span>"
escapeHTML(cards.description) + "</span>";
} }
if (cards.html) { if (cards.html) {
analyze = cards.html + '<i class="material-icons" onclick="pip(' + id + ')" title="' + lang.lang_cards_pip + '">picture_in_picture_alt</i>'; analyze = cards.html + '<i class="material-icons" onclick="pip(' + id + ')" title="' + lang.lang_cards_pip + '">picture_in_picture_alt</i>'
} }
} }
//Ticker //Ticker
var tickerdom = ""; var tickerdom = ""
if (ticker) { if (ticker) {
var tickerdata = localStorage.getItem("ticker") var tickerdata = localStorage.getItem("ticker")
if (tickerdata) { if (tickerdata) {
var tickerdata = JSON.parse(tickerdata); var tickerdata = JSON.parse(tickerdata)
var thisdomain = toot.account.acct.split("@"); var thisdomain = toot.account.acct.split("@")
if (thisdomain.length > 1) { if (thisdomain.length > 1) {
thisdomain = thisdomain[1]; thisdomain = thisdomain[1]
} }
for (var i = 0; i < tickerdata.length; i++) { for (var i = 0; i < tickerdata.length; i++) {
var value = tickerdata[i]; var value = tickerdata[i]
if (value.domain == thisdomain) { if (value.domain == thisdomain) {
var 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>'; 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; break
} }
} }
} }
} }
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' + templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' + boostback + " " + fav_app + " " + hasmedia + '" toot-id="' + id + '" unique-id="' + uniqueid + '" data-medias="' + media_ids + ' " unixtime="' + date(obj[key].created_at, "unix") + '" ' + if_notf + ' onclick="dmStatus()">' + '<div class="area-notice"><span class="gray sharesta">' + notice + home + "</span></div>" + '<div class="area-icon"><a onclick="udg(\'' + toot.account.id + "'," + acct_id + ');" user="' + toot.account.acct + '" class="udg">' + '<img src="' + avatar + '" width="40" class="prof-img" user="' + toot.account.acct + '"></a>' + noticeavatar + "</div>" + '<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; cursor:text;"> @' + 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="far fa-clock-o"></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>" + "" + viewer + "" + "<br><a onclick=\"details('" + toot.id + "'," + acct_id + ",'" + tlid + "','dm')\" class=\"pointer waves-effect\">" + lang.lang_parse_thread + "</a></div>" + '<div class="area-vis"></div>' + "</div></div>"
boostback + ' ' + fav_app + })
' ' + hasmedia + '" toot-id="' + id + '" unique-id="' + uniqueid + '" data-medias="' + media_ids + ' " unixtime="' + date(obj[ return templete
key].created_at, 'unix') + '" ' + if_notf + ' onclick="dmStatus()">' +
'<div class="area-notice"><span class="gray sharesta">' + notice + home +
'</span></div>' +
'<div class="area-icon"><a onclick="udg(\'' + toot.account.id +
'\',' + acct_id + ');" user="' + toot.account.acct + '" class="udg">' +
'<img src="' + avatar +
'" width="40" class="prof-img" user="' + toot.account.acct +
'"></a>' + noticeavatar + '</div>' +
'<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; cursor:text;"> @' +
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="far fa-clock-o"></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>' +
'' + viewer + '' +
'<br><a onclick="details(\'' + toot.id + '\',' + acct_id +
',\'' + tlid + '\',\'dm\')" class="pointer waves-effect">' + lang.lang_parse_thread + '</a></div>' +
'<div class="area-vis"></div>' +
'</div></div>';
});
return templete;
} }

View File

@@ -1,381 +1,486 @@
/*メディアフィルター機能*/ /*メディアフィルター機能*/
//各TL上方のMedia[On/Off] //各TL上方のMedia[On/Off]
function mediaToggle(tlid) { function mediaToggle(tlid) {
var media = localStorage.getItem("media_" + tlid); var media = localStorage.getItem('media_' + tlid)
if (media) { if (media) {
localStorage.removeItem("media_" + tlid); localStorage.removeItem('media_' + tlid)
$("#sta-media-" + tlid).text("Off"); $('#sta-media-' + tlid).text('Off')
$("#sta-media-" + tlid).css("color", 'red'); $('#sta-media-' + tlid).css('color', 'red')
$("#timeline_" + tlid).removeClass("media-filter") $('#timeline_' + tlid).removeClass('media-filter')
} else { } else {
localStorage.setItem("media_" + tlid, "true"); localStorage.setItem('media_' + tlid, 'true')
$("#sta-media-" + tlid).text("On"); $('#sta-media-' + tlid).text('On')
$("#sta-media-" + tlid).css("color", '#009688'); $('#sta-media-' + tlid).css('color', '#009688')
$("#timeline_" + tlid).addClass("media-filter") $('#timeline_' + tlid).addClass('media-filter')
} }
} }
/* Remote only */
function remoteOnly(tlid, type) {
var multi = localStorage.getItem('column')
var obj = JSON.parse(multi)
if (obj[tlid].data) {
if (obj[tlid].data.remote) {
obj[tlid].data.remote = false
var json = JSON.stringify(obj)
localStorage.setItem('column', json)
$('#sta-remote-' + tlid).text('Off')
$('#sta-remote-' + tlid).css('color', '#009688')
} else {
obj[tlid].data.remote = true
var json = JSON.stringify(obj)
localStorage.setItem('column', json)
$('#sta-remote-' + tlid).text('On')
$('#sta-remote-' + tlid).css('color', 'red')
}
} else {
obj[tlid].data = {}
obj[tlid].data.remote = true
var json = JSON.stringify(obj)
localStorage.setItem('column', json)
$('#sta-remote-' + tlid).text('On')
$('#sta-remote-' + tlid).css('color', 'red')
}
columnReload(tlid, type)
}
function remoteOnlyCk(tlid) {
var multi = localStorage.getItem('column')
var obj = JSON.parse(multi)
if (obj[tlid].data) {
if (obj[tlid].data.remote) {
$('#sta-remote-' + tlid).text('On')
$('#sta-remote-' + tlid).css('color', 'red')
return true
}
}
return false
}
//各TL上方のBT[BTOnly/BTExc/Off] //各TL上方のBT[BTOnly/BTExc/Off]
function ebtToggle(tlid) { function ebtToggle(tlid) {
var ebt = localStorage.getItem("ebt_" + tlid); var ebt = localStorage.getItem('ebt_' + tlid)
if (ebt == "true") { if (ebt == 'true') {
localStorage.setItem("ebt_" + tlid, "but"); localStorage.setItem('ebt_' + tlid, 'but')
$("#sta-bt-" + tlid).text("BT Only"); $('#sta-bt-' + tlid).text('BT Only')
$("#sta-bt-" + tlid).css("color", '#ff9800'); $('#sta-bt-' + tlid).css('color', '#ff9800')
$("#timeline_" + tlid).addClass("except-bt-filter") $('#timeline_' + tlid).addClass('except-bt-filter')
$("#timeline_" + tlid).removeClass("bt-filter") $('#timeline_' + tlid).removeClass('bt-filter')
} else if (ebt == "but") { } else if (ebt == 'but') {
localStorage.removeItem("ebt_" + tlid); localStorage.removeItem('ebt_' + tlid)
$("#sta-bt-" + tlid).text("Off"); $('#sta-bt-' + tlid).text('Off')
$("#sta-bt-" + tlid).css("color", 'red'); $('#sta-bt-' + tlid).css('color', 'red')
$("#timeline_" + tlid).removeClass("bt-filter") $('#timeline_' + tlid).removeClass('bt-filter')
$("#timeline_" + tlid).removeClass("except-bt-filter") $('#timeline_' + tlid).removeClass('except-bt-filter')
} else { } else {
localStorage.setItem("ebt_" + tlid, "true"); localStorage.setItem('ebt_' + tlid, 'true')
$("#sta-bt-" + tlid).text("BT Ex"); $('#sta-bt-' + tlid).text('BT Ex')
$("#sta-bt-" + tlid).css("color", '#009688'); $('#sta-bt-' + tlid).css('color', '#009688')
$("#timeline_" + tlid).addClass("bt-filter") $('#timeline_' + tlid).addClass('bt-filter')
$("#timeline_" + tlid).removeClass("except-bt-filter") $('#timeline_' + tlid).removeClass('except-bt-filter')
} }
} }
//各TL上方のMedia[On/Off]をチェック //各TL上方のMedia[On/Off]をチェック
function mediaCheck(tlid) { function mediaCheck(tlid) {
var media = localStorage.getItem("media_" + tlid); var media = localStorage.getItem('media_' + tlid)
if (media) { if (media) {
$("#sta-media-" + tlid).text("On"); $('#sta-media-' + tlid).text('On')
$("#sta-media-" + tlid).css("color", '#009688'); $('#sta-media-' + tlid).css('color', '#009688')
$("#timeline_" + tlid).addClass("media-filter") $('#timeline_' + tlid).addClass('media-filter')
} else { } else {
$("#sta-media-" + tlid).text("Off"); $('#sta-media-' + tlid).text('Off')
$("#sta-media-" + tlid).css("color", 'red'); $('#sta-media-' + tlid).css('color', 'red')
$("#timeline_" + tlid).removeClass("media-filter") $('#timeline_' + tlid).removeClass('media-filter')
} }
} }
//各TL上方のBT[On/Off]をチェック //各TL上方のBT[On/Off]をチェック
function ebtCheck(tlid) { function ebtCheck(tlid) {
var ebt = localStorage.getItem("ebt_" + tlid); var ebt = localStorage.getItem('ebt_' + tlid)
if (ebt == "true") { if (ebt == 'true') {
$("#sta-bt-" + tlid).text("BT Ex"); $('#sta-bt-' + tlid).text('BT Ex')
$("#sta-bt-" + tlid).css("color", '#009688'); $('#sta-bt-' + tlid).css('color', '#009688')
$("#timeline_" + tlid).addClass("bt-filter") $('#timeline_' + tlid).addClass('bt-filter')
$("#timeline_" + tlid).removeClass("except-bt-filter") $('#timeline_' + tlid).removeClass('except-bt-filter')
} else if (ebt == "but") { } else if (ebt == 'but') {
$("#sta-bt-" + tlid).text("BT Only"); $('#sta-bt-' + tlid).text('BT Only')
$("#sta-bt-" + tlid).css("color", '#ff9800'); $('#sta-bt-' + tlid).css('color', '#ff9800')
$("#timeline_" + tlid).addClass("except-bt-filter") $('#timeline_' + tlid).addClass('except-bt-filter')
$("#timeline_" + tlid).removeClass("bt-filter") $('#timeline_' + tlid).removeClass('bt-filter')
} else { } else {
$("#sta-bt-" + tlid).text("Off"); $('#sta-bt-' + tlid).text('Off')
$("#sta-bt-" + tlid).css("color", 'red'); $('#sta-bt-' + tlid).css('color', 'red')
$("#timeline_" + tlid).removeClass("bt-filter") $('#timeline_' + tlid).removeClass('bt-filter')
$("#timeline_" + tlid).removeClass("except-bt-filter") $('#timeline_' + tlid).removeClass('except-bt-filter')
} }
} }
/* 削除追跡*/ /* 削除追跡*/
function catchToggle(tlid) { function catchToggle(tlid) {
var catchck = localStorage.getItem("catch_" + tlid); var catchck = localStorage.getItem('catch_' + tlid)
if (catchck) { if (catchck) {
localStorage.removeItem("catch_" + tlid); localStorage.removeItem('catch_' + tlid)
$("#sta-del-" + tlid).text("Off"); $('#sta-del-' + tlid).text('Off')
$("#sta-del-" + tlid).css("color", 'red'); $('#sta-del-' + tlid).css('color', 'red')
parseColumn(tlid); parseColumn(tlid)
} else { } else {
localStorage.setItem("catch_" + tlid, "true"); localStorage.setItem('catch_' + tlid, 'true')
$("#sta-del-" + tlid).text("On"); $('#sta-del-' + tlid).text('On')
$("#sta-del-" + tlid).css("color", '#009688'); $('#sta-del-' + tlid).css('color', '#009688')
parseColumn(tlid); parseColumn(tlid)
} }
} }
function catchCheck(tlid) { function catchCheck(tlid) {
var catchck = localStorage.getItem("catch_" + tlid); var catchck = localStorage.getItem('catch_' + tlid)
if (catchck) { if (catchck) {
$("#sta-del-" + tlid).text("On"); $('#sta-del-' + tlid).text('On')
$("#sta-del-" + tlid).css("color", '#009688'); $('#sta-del-' + tlid).css('color', '#009688')
} else { } else {
$("#sta-del-" + tlid).text("Off"); $('#sta-del-' + tlid).text('Off')
$("#sta-del-" + tlid).css("color", 'red'); $('#sta-del-' + tlid).css('color', 'red')
} }
} }
function delreset(tlid) { function delreset(tlid) {
$("[tlid=" + tlid + "] .by_delcatch").hide(); $('[tlid=' + tlid + '] .by_delcatch').hide()
$("[tlid=" + tlid + "] .by_delcatch").remove(); $('[tlid=' + tlid + '] .by_delcatch').remove()
} }
/*ワードフィルター機能*/ /*ワードフィルター機能*/
function filterMenu() { function filterMenu() {
$("#left-menu div").removeClass("active"); $('#left-menu a').removeClass('active')
$("#filterMenu").addClass("active"); $('#filterMenu').addClass('active')
$(".menu-content").addClass("hide"); $('.menu-content').addClass('hide')
$("#filter-box").removeClass("hide"); $('#filter-box').removeClass('hide')
} }
function filter() { function filter() {
$("#filtered-words").html(""); $('#filtered-words').html('')
$("#filter-edit-id").val("") $('#filter-edit-id').val('')
var acct_id = $("#filter-acct-sel").val(); var acct_id = $('#filter-acct-sel').val()
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/filters" var start = 'https://' + domain + '/api/v1/filters'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at,
}, },
}).then(function (response) { })
return response.json(); .then(function (response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function (text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
if (json) {
var filters = "";
Object.keys(json).forEach(function (key) {
var filterword = json[key];
var context = filterword.context.join(',');
filters = filters + escapeHTML(filterword.phrase) + '<span class="sml">(for ' + context + ')</span>:<a onclick="filterEdit(\'' + filterword.id + '\',\'' + acct_id +
'\')" class="pointer">' + lang.lang_edit + '</a>/<a onclick="filterDel(' + filterword.id + ',' + acct_id +
')" class="pointer">' + lang.lang_del + '</a><br> ';
});
if (filters == "") {
filters = lang.lang_filter_nodata + "<br>";
} }
$("#filtered-words").html(filters); return response.json()
} else { })
$("#filtered-words").html(lang_filter_nodata); .catch(function (error) {
} todo(error)
}); setLog(start, 'JSON', error)
console.error(error)
})
.then(function (json) {
if (json) {
var filters = ''
Object.keys(json).forEach(function (key) {
var filterword = json[key]
var context = filterword.context.join(',')
filters =
filters +
escapeHTML(filterword.phrase) +
`<span class="sml">(for ${context})</span>:
<a onclick="filterEdit('${filterword.id}','${acct_id}')" class="pointer">
${lang.lang_edit}
</a>/
<a onclick="filterDel('${filterword.id}','${acct_id}')" class="pointer">
${lang.lang_del}
</a><br> `
})
if (filters == '') {
filters = lang.lang_filter_nodata + '<br>'
}
$('#filtered-words').html(filters)
} else {
$('#filtered-words').html(lang_filter_nodata)
}
})
} }
function filterTime(day, hour, min) { function filterTime(day, hour, min) {
$("#days_filter").val(day) $('#days_filter').val(day)
$("#hours_filter").val(hour) $('#hours_filter').val(hour)
$("#mins_filter").val(min) $('#mins_filter').val(min)
} }
function makeNewFilter() { function makeNewFilter() {
var acct_id = $("#filter-acct-sel").val(); var acct_id = $('#filter-acct-sel').val()
var phr = $("#filter-add-word").val(); var phr = $('#filter-add-word').val()
var cont = []; var cont = []
if ($("#home_filter:checked").val()) { if ($('#home_filter:checked').val()) {
cont.push("home"); cont.push('home')
} }
if ($("#local_filter:checked").val()) { if ($('#local_filter:checked').val()) {
cont.push("public"); cont.push('public')
} }
if ($("#notf_filter:checked").val()) { if ($('#notf_filter:checked').val()) {
cont.push("notifications"); cont.push('notifications')
} }
if ($("#conv_filter:checked").val()) { if ($('#conv_filter:checked').val()) {
cont.push("thread"); cont.push('thread')
}
if ($('#prof_filter:checked').val()) {
cont.push('profiles')
} }
if (!cont.length) { if (!cont.length) {
$("#filtered-words").html('Error:' + lang.lang_filter_errordegree); $('#filtered-words').html('Error:' + lang.lang_filter_errordegree)
} }
var exc = $("#except_filter:checked").val(); var exc = $('#except_filter:checked').val()
var who = $("#wholeword_filter:checked").val(); var who = $('#wholeword_filter:checked').val()
if (!who) { if (!who) {
who = false; who = false
} }
var time = $("#days_filter").val() * 24 * 60 * 60 + $("#hours_filter").val() * 60 * 60 + $("#mins_filter").val() * 60; var time = $('#days_filter').val() * 24 * 60 * 60 + $('#hours_filter').val() * 60 * 60 + $('#mins_filter').val() * 60
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if ($("#filter-edit-id").val()) { if ($('#filter-edit-id').val()) {
var start = "https://" + domain + "/api/v1/filters/" + $("#filter-edit-id").val(); var start = 'https://' + domain + '/api/v1/filters/' + $('#filter-edit-id').val()
var method = "PUT" var method = 'PUT'
} else { } else {
var start = "https://" + domain + "/api/v1/filters" var start = 'https://' + domain + '/api/v1/filters'
var method = "POST" var method = 'POST'
} }
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open(method, start, true); httpreq.open(method, start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify({ httpreq.send(
phrase: phr, JSON.stringify({
context: cont, phrase: phr,
irreversible: exc, context: cont,
whole_word: who, irreversible: exc,
expires_in: time whole_word: who,
})); expires_in: time,
})
)
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
filter(); if (this.status !== 200) {
setLog(start, this.status, this.response)
}
filter()
filterUpdate(acct_id) filterUpdate(acct_id)
$("#filter-add-word").val(""); $('#filter-add-word').val('')
$("#home_filter").prop("checked", false); $('#home_filter').prop('checked', false)
$("#local_filter").prop("checked", false); $('#local_filter').prop('checked', false)
$("#notf_filter").prop("checked", false); $('#notf_filter').prop('checked', false)
$("#conv_filter").prop("checked", false); $('#conv_filter').prop('checked', false)
$("#except_filter").prop("checked", false); $('#prof_filter').prop('checked', false)
$("#wholeword_filter").prop("checked", false); $('#except_filter').prop('checked', false)
$("#days_filter").val("0"); $('#wholeword_filter').prop('checked', false)
$("#hours_filter").val("0"); $('#days_filter').val('0')
$("#mins_filter").val("0"); $('#hours_filter').val('0')
$("#add-filter-btn").text(lang.lang_add); $('#mins_filter').val('0')
$("#filter-edit-id").val("") $('#add-filter-btn').text(lang.lang_add)
$('#filter-edit-id').val('')
} }
} }
} }
function filterEdit(id, acct_id) { function filterEdit(id, acct_id) {
$("#filter-add-word").val(""); $('#filter-add-word').val('')
$("#home_filter").prop("checked", false); $('#home_filter').prop('checked', false)
$("#local_filter").prop("checked", false); $('#local_filter').prop('checked', false)
$("#notf_filter").prop("checked", false); $('#notf_filter').prop('checked', false)
$("#conv_filter").prop("checked", false); $('#conv_filter').prop('checked', false)
$("#except_filter").prop("checked", false); $('#except_filter').prop('checked', false)
$("#wholeword_filter").prop("checked", false); $('#wholeword_filter').prop('checked', false)
$("#days_filter").val("0"); $('#days_filter').val('0')
$("#hours_filter").val("0"); $('#hours_filter').val('0')
$("#mins_filter").val("0"); $('#mins_filter').val('0')
$("#add-filter-btn").text(lang.lang_edit); $('#add-filter-btn').text(lang.lang_edit)
$("#filter-edit-id").val(id); $('#filter-edit-id').val(id)
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/filters/" + id var start = 'https://' + domain + '/api/v1/filters/' + id
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at,
}, },
}).then(function (response) { })
return response.json(); .then(function (response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function (text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
if (json) {
var now = new Date();
now = now.getTime();
var now = Math.floor(now / 1000);
$("#filter-add-word").val(json.phrase);
Object.keys(json.context).forEach(function (key) {
var context = json.context[key];
$("[value=" + context + "]").prop("checked", true);
});
if (json.irreversible) {
$("#except_filter").prop("checked", true);
} }
if (json.whole_word) { return response.json()
$("#wholeword_filter").prop("checked", true); })
.catch(function (error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function (json) {
if (json) {
var now = new Date()
now = now.getTime()
var now = Math.floor(now / 1000)
$('#filter-add-word').val(json.phrase)
Object.keys(json.context).forEach(function (key) {
var context = json.context[key]
$('[value=' + context + ']').prop('checked', true)
})
if (json.irreversible) {
$('#except_filter').prop('checked', true)
}
if (json.whole_word) {
$('#wholeword_filter').prop('checked', true)
}
var expires = date(json.expires_at, 'unix') - now
var mins = Math.floor(expires / 60) % 60
var hours = Math.floor(expires / 3600) % 24
var days = Math.floor(expires / 3600 / 24)
$('#days_filter').val(days)
$('#hours_filter').val(hours)
$('#mins_filter').val(mins)
} }
var expires = date(json.expires_at, 'unix') - now; })
var mins = Math.floor(expires / 60) % 60;
var hours = Math.floor(expires / 3600) % 24;
var days = Math.floor(expires / 3600 / 24);
$("#days_filter").val(days);
$("#hours_filter").val(hours);
$("#mins_filter").val(mins);
}
});
} }
function filterDel(id, acct_id) { function filterDel(id, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/filters/" + id; var start = 'https://' + domain + '/api/v1/filters/' + id
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open("DELETE", start, true); httpreq.open('DELETE', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(); httpreq.send()
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
filter(); if (this.status !== 200) {
setLog(start, this.status, this.response)
}
filter()
filterUpdate(acct_id) filterUpdate(acct_id)
} }
} }
} }
function getFilter(acct_id) { function getFilter(acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if (localStorage.getItem("mode_" + domain) != "misskey") { if (localStorage.getItem('mode_' + domain) != 'misskey') {
var start = "https://" + domain + "/api/v1/filters" var start = 'https://' + domain + '/api/v1/filters'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at,
}, },
}).then(function (response) { })
return response.json(); .then(function (response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function (text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
localStorage.setItem("filter_" + acct_id, JSON.stringify(json)); }
}); return response.json()
})
.catch(function (error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function (json) {
localStorage.setItem('filter_' + acct_id, JSON.stringify(json))
})
} else { } else {
localStorage.setItem("filter_" + acct_id, JSON.stringify({})); localStorage.setItem('filter_' + acct_id, JSON.stringify({}))
} }
} }
function getFilterType(json, type) { function getFilterType(json, type) {
if (!json) { if (!json) {
return []; return []
} }
if (type == "local") { if (type == 'local') {
type = "public"; type = 'public'
} else if (type == "list") { } else if (type == 'list') {
type = "home"; type = 'home'
} else if (type == "notf") { } else if (type == 'notf') {
type = "notifi"; type = 'notifi'
} }
var mutedfilters = []; var mutedfilters = []
Object.keys(json).forEach(function (key) { Object.keys(json).forEach(function (key) {
var filterword = json[key]; var filterword = json[key]
var phrases = filterword.phrase; var phrases = filterword.phrase
if (filterword.context.join(",").indexOf(type) !== -1) { var arr = filterword.context
mutedfilters.push(phrases); if (arr.join(',').indexOf(type) !== -1) {
mutedfilters.push(phrases)
} else if (type == 'mix') {
if (arr.indexOf('home') !== -1 || arr.indexOf('public') !== -1) {
mutedfilters.push(phrases)
}
} }
}); })
return mutedfilters; return mutedfilters
}
function getFilterTypeByAcct(acct_id, type) {
if (localStorage.getItem('filter_' + acct_id) != 'undefined') {
var mute = getFilterType(JSON.parse(localStorage.getItem('filter_' + acct_id)), type)
} else {
var mute = []
}
return mute
} }
function filterUpdate(acct_id) { function filterUpdate(acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/filters" var start = 'https://' + domain + '/api/v1/filters'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at,
}, },
}).then(function (response) { })
return response.json(); .then(function (response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function (text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
localStorage.setItem("filter_" + acct_id, JSON.stringify(json)); }
filterUpdateInternal(json, "home"); return response.json()
filterUpdateInternal(json, "local"); })
filterUpdateInternal(json, "notf"); .catch(function (error) {
filterUpdateInternal(json, "pub"); todo(error)
}); setLog(start, 'JSON', error)
console.error(error)
})
.then(function (json) {
localStorage.setItem('filter_' + acct_id, JSON.stringify(json))
filterUpdateInternal(json, 'home')
filterUpdateInternal(json, 'local')
filterUpdateInternal(json, 'notf')
filterUpdateInternal(json, 'pub')
})
} }
function filterUpdateInternal(json, type) { function filterUpdateInternal(json, type) {
var home = getFilterType(json, type); var home = getFilterType(json, type)
var wordmute = localStorage.getItem("word_mute"); var wordmute = localStorage.getItem('word_mute')
if (wordmute) { if (wordmute) {
var wordmute = JSON.parse(wordmute); var wordmute = JSON.parse(wordmute)
home = home.concat(wordmute); home = home.concat(wordmute)
} }
if (home) { if (home) {
$("[data-acct=" + acct_id + "] [data-type=" + type + "] .cvo").each(function (i, elem) { $('[data-acct=' + acct_id + '] [data-type=' + type + '] .cvo').each(function (i, elem) {
var id = $(elem).attr("toot-id"); var id = $(elem).attr('toot-id')
$("[toot-id=" + id + "]").removeClass("hide"); $('[toot-id=' + id + ']').removeClass('hide')
var text = $(elem).find('.toot').html(); var text = $(elem).find('.toot').html()
Object.keys(home).forEach(function (key8) { Object.keys(home).forEach(function (key8) {
var word = home[key8]; var word = home[key8]
var regExp = new RegExp(word.replace(/[.*+?^=!:${}()|[\]\/\\]/g, "\\$&"), "g"); var regExp = new RegExp(word.replace(/[.*+?^=!:${}()|[\]\/\\]/g, '\\$&'), 'g')
if ($.strip_tags(text).match(regExp)) { if ($.strip_tags(text).match(regExp)) {
$("[toot-id=" + id + "]").addClass("hide"); $('[toot-id=' + id + ']').addClass('hide')
} }
}); })
}); })
} }
} }
/* /*
@@ -386,73 +491,73 @@ function filterUpdateInternal(json, type) {
*/ */
//通知フィルター //通知フィルター
function exclude(key) { function exclude(key) {
localStorage.setItem("exclude-" + key, "") localStorage.setItem('exclude-' + key, '')
var excludetxt = localStorage.getItem("exclude-" + key); var excludetxt = localStorage.getItem('exclude-' + key)
if ($('#exc-reply-' + key + ':checked').val()) { if ($('#exc-reply-' + key + ':checked').val()) {
excludetxt = "?exclude_types[]=mention" excludetxt = '?exclude_types[]=mention'
} }
if ($('#exc-fav-' + key + ':checked').val()) { if ($('#exc-fav-' + key + ':checked').val()) {
if (excludetxt || excludetxt !="") { if (excludetxt || excludetxt != '') {
excludetxt = excludetxt + "&exclude_types[]=favourite" excludetxt = excludetxt + '&exclude_types[]=favourite'
} else { } else {
excludetxt = "?exclude_types[]=favourite" excludetxt = '?exclude_types[]=favourite'
} }
} }
if ($('#exc-bt-' + key + ':checked').val()) { if ($('#exc-bt-' + key + ':checked').val()) {
if (excludetxt || excludetxt !="") { if (excludetxt || excludetxt != '') {
excludetxt = excludetxt + "&exclude_types[]=reblog" excludetxt = excludetxt + '&exclude_types[]=reblog'
} else { } else {
excludetxt = "?exclude_types[]=reblog" excludetxt = '?exclude_types[]=reblog'
} }
} }
if ($('#exc-follow-' + key + ':checked').val()) { if ($('#exc-follow-' + key + ':checked').val()) {
if (excludetxt || excludetxt !="") { if (excludetxt || excludetxt != '') {
excludetxt = excludetxt + "&exclude_types[]=follow" excludetxt = excludetxt + '&exclude_types[]=follow'
} else { } else {
excludetxt = "?exclude_types[]=follow" excludetxt = '?exclude_types[]=follow'
} }
} }
if ($('#exc-poll-' + key + ':checked').val()) { if ($('#exc-poll-' + key + ':checked').val()) {
if (excludetxt || excludetxt !="") { if (excludetxt || excludetxt != '') {
excludetxt = excludetxt + "&exclude_types[]=poll" excludetxt = excludetxt + '&exclude_types[]=poll'
} else { } else {
excludetxt = "?exclude_types[]=poll" excludetxt = '?exclude_types[]=poll'
} }
} else { } else {
} }
localStorage.setItem("exclude-" + key, excludetxt) localStorage.setItem('exclude-' + key, excludetxt)
parseColumn(key); parseColumn(key)
} }
function excludeCk(key, target) { function excludeCk(key, target) {
var exc = localStorage.getItem("exclude-" + key); var exc = localStorage.getItem('exclude-' + key)
if (!exc) { if (!exc) {
return ""; return ''
} }
if (~exc.indexOf(target)) { if (~exc.indexOf(target)) {
return "checked" return 'checked'
} else { } else {
return ""; return ''
} }
} }
function checkNotfFilter(tlid){ function checkNotfFilter(tlid) {
var excludetxt = localStorage.getItem("exclude-" + tlid); var excludetxt = localStorage.getItem('exclude-' + tlid)
if(!excludetxt || excludetxt != ""){ if (!excludetxt || excludetxt != '') {
return true; return true
}else{
return false;
}
}
function resetNotfFilter(tlid){
localStorage.setItem("exclude-" + tlid, "")
parseColumn(tlid);
}
function notfFilter(id,tlid,acct_id){
var excludetxt = localStorage.getItem("exclude-" + tlid);
if (excludetxt || excludetxt !="") {
excludetxt = excludetxt + "&account_id="+id
} else { } else {
excludetxt = "?account_id="+id return false
} }
localStorage.setItem("exclude-" + tlid, excludetxt) }
parseColumn(tlid); function resetNotfFilter(tlid) {
} localStorage.setItem('exclude-' + tlid, '')
parseColumn(tlid)
}
function notfFilter(id, tlid, acct_id) {
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(tlid)
}

View File

@@ -1,263 +1,358 @@
function listMenu() { function listMenu() {
$("#left-menu div").removeClass("active"); $('#left-menu a').removeClass('active')
$("#listMenu").addClass("active"); $('#listMenu').addClass('active')
$(".menu-content").addClass("hide"); $('.menu-content').addClass('hide')
$("#list-box").removeClass("hide"); $('#list-box').removeClass('hide')
$('ul.tabs').tabs('select_tab', 'src-sta'); $('ul.tabs').tabs('select_tab', 'src-sta')
$("#src-contents").html(""); $('#src-contents').html('')
} }
function list() { function list() {
$("#lists-user").html(""); $('#lists-user').html('')
var acct_id = $("#list-acct-sel").val(); var acct_id = $('#list-acct-sel').val()
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem('mode_' + domain) == 'misskey') {
var start = "https://" + domain + "/api/users/lists/list" var start = 'https://' + domain + '/api/users/lists/list'
fetch(start, { fetch(start, {
method: 'POST', method: 'POST',
body: JSON.stringify({ body: JSON.stringify({
i: at i: at
}), })
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
if (json) { }
var lists = ""; return response.json()
Object.keys(json).forEach(function (key) { })
var list = json[key]; .catch(function(error) {
lists = lists + escapeHTML(list.title) + ':<a onclick="listShow(\'' + list.id + '\',\'' + escapeHTML(list.title) + '\',\'' + acct_id + todo(error)
'\')" class="pointer">' + lang.lang_list_show + '</a><br>'; setLog(start, 'JSON', error)
}); console.error(error)
$("#lists").html(lists); })
} else { .then(function(json) {
$("#lists").html(lang.lang_list_nodata); 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 { } else {
var start = "https://" + domain + "/api/v1/lists" var start = 'https://' + domain + '/api/v1/lists'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + 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>/<a onclick="listUser(\'' + list.id + '\',' + acct_id +
')" class="pointer">' + lang.lang_list_users + '</a><br>';
});
$("#lists").html(lists);
} else {
$("#lists").html(lang.lang_list_nodata);
} }
}); })
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
if (json) {
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>/
<a onclick="listUser('${list.id}','${acct_id}')" class="pointer">
${lang.lang_list_users}
'</a><br>`
})
$('#lists').html(lists)
} else {
$('#lists').html(lang.lang_list_nodata)
}
})
} }
} }
function makeNewList() { function makeNewList() {
var acct_id = $("#list-acct-sel").val(); var acct_id = $('#list-acct-sel').val()
var text = $("#list-add").val(); var text = $('#list-add').val()
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if (localStorage.getItem("mode_" + domain) != "misskey") { if (localStorage.getItem('mode_' + domain) != 'misskey') {
var start = "https://" + domain + "/api/v1/lists" var start = 'https://' + domain + '/api/v1/lists'
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify({ httpreq.send(
title: text JSON.stringify({
})); title: text
httpreq.onreadystatechange = function () { })
)
httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
list(); if (this.status !== 200) {
$("#list-add").val("") setLog(start, this.status, this.response)
}
list()
$('#list-add').val('')
} }
} }
} else { } else {
var start = "https://" + domain + "/api/users/lists/create" var start = 'https://' + domain + '/api/users/lists/create'
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify({ httpreq.send(
i: at, JSON.stringify({
title: text i: at,
})); title: text
httpreq.onreadystatechange = function () { })
)
httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
list(); if (this.status !== 200) {
$("#list-add").val("") setLog(start, this.status, this.response)
}
list()
$('#list-add').val('')
} }
} }
} }
} }
function listShow(id, title, acct_id) { function listShow(id, title, acct_id) {
localStorage.setItem("list_" + id + "_" + acct_id, title); localStorage.setItem('list_' + id + '_' + acct_id, title)
tl('list', id, acct_id, 'add'); tl('list', id, acct_id, 'add')
} }
function listUser(id, acct_id) { function listUser(id, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/lists/" + id + "/accounts" var start = 'https://' + domain + '/api/v1/lists/' + id + '/accounts'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json) {
var lists = "";
var templete = userparse(json, '', acct_id);
if (!json[0]) {
templete = lang.lang_list_nouser;
}
$("#lists-user").html(templete);
jQuery("time.timeago").timeago();
} else {
$("#lists-user").html(lang.lang_list_nouser);
} }
}); })
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
if (json) {
var lists = ''
var templete = userparse(json, '', acct_id)
if (!json[0]) {
templete = lang.lang_list_nouser
}
$('#lists-user').html(templete)
jQuery('time.timeago').timeago()
} else {
$('#lists-user').html(lang.lang_list_nouser)
}
})
} }
function hisList(user, acct_id) { function hisList(user, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if (localStorage.getItem("mode_" + domain) != "misskey") { if (localStorage.getItem('mode_' + domain) != 'misskey') {
var start = "https://" + domain + "/api/v1/lists" var start = 'https://' + domain + '/api/v1/lists'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json) {
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 +
'\')" class="pointer">' + escapeHTML(list.title) + '</a><br> ';
});
$("#his-lists-a").html(lists);
} else {
$("#his-lists-a").html(lang.lang_list_nodata);
} }
}); })
var start = "https://" + domain + "/api/v1/accounts/" + user + "/lists" .then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
if (json) {
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}')" class="pointer">
${escapeHTML(list.title)}
</a><br> `
})
$('#his-lists-a').html(lists)
} else {
$('#his-lists-a').html(lang.lang_list_nodata)
}
})
var start = 'https://' + domain + '/api/v1/accounts/' + user + '/lists'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json) {
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">' + escapeHTML(list.title) + '</a><br> ';
});
$("#his-lists-b").html(lists);
} else {
$("#his-lists-b").html(lang.lang_list_nodata);
} }
}); })
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
if (json) {
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">
${escapeHTML(list.title)}
</a><br> `
})
$('#his-lists-b').html(lists)
} else {
$('#his-lists-b').html(lang.lang_list_nodata)
}
})
} else { } else {
var start = "https://" + domain + "/api/users/lists/list" var start = 'https://' + domain + '/api/users/lists/list'
fetch(start, { fetch(start, {
method: 'POST', method: 'POST',
body: JSON.stringify({ body: JSON.stringify({
i: at i: at
}), })
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
if (json) { }
var lists = ""; return response.json()
Object.keys(json).forEach(function (key) { })
var list = json[key]; .catch(function(error) {
lists = lists + list.title + ':<a onclick="listShow(\'' + list.id + '\',\'' + escapeHTML(list.title) + '\',\'' + acct_id + todo(error)
'\')" class="pointer">' + lang.lang_list_show + '</a>/<a onclick="listAdd(\'' + list.id + '\',\'' + user + '\',\'' + acct_id + setLog(start, 'JSON', error)
'\')" class="pointer">' + lang.lang_list_add + lang.lang_list_add_misskey + '</a><br>'; console.error(error)
}); })
$("#his-lists-a").html(lists); .then(function(json) {
} else { if (json) {
$("#his-lists-a").html(lang.lang_list_nodata); var lists = ''
} Object.keys(json).forEach(function(key) {
}); var list = json[key]
$("#his-lists-b").html(""); 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) { function listAdd(id, user, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem('mode_' + domain) == 'misskey') {
var start = "https://" + domain + "/api/users/lists/push" var start = 'https://' + domain + '/api/users/lists/push'
var i = { var i = {
i: at, i: at,
listId: id, listId: id,
userId: user userId: user
} }
} else { } else {
var start = "https://" + domain + "/api/v1/lists/" + id + "/accounts" var start = 'https://' + domain + '/api/v1/lists/' + id + '/accounts'
var i = { var i = {
account_ids: [user] account_ids: [user]
} }
} }
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify(i)); httpreq.send(JSON.stringify(i))
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
if (this.status !== 200) {
setLog(start, this.status, this.response)
}
hisList(user, acct_id) hisList(user, acct_id)
} }
} }
} }
function listRemove(id, user, acct_id) { function listRemove(id, user, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem('mode_' + domain) == 'misskey') {
var start = "https://" + domain + "/api/users/lists/push" var start = 'https://' + domain + '/api/users/lists/push'
var method = 'POST' var method = 'POST'
var i = { var i = {
i: at, i: at,
@@ -265,22 +360,25 @@ function listRemove(id, user, acct_id) {
userId: user userId: user
} }
} else { } else {
var start = "https://" + domain + "/api/v1/lists/" + id + "/accounts" var start = 'https://' + domain + '/api/v1/lists/' + id + '/accounts'
var method = 'DELETE' var method = 'DELETE'
var i = { var i = {
account_ids: [user] account_ids: [user]
} }
} }
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open(method, start, true); httpreq.open(method, start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify(i)); httpreq.send(JSON.stringify(i))
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
if (this.status !== 200) {
setLog(start, this.status, this.response)
}
hisList(user, acct_id) hisList(user, acct_id)
} }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,327 +1,216 @@
//Integrated TL //Integrated TL
function mixtl(acct_id, tlid, type, delc, voice) { async function mixtl(acct_id, tlid, type, delc, voice) {
localStorage.removeItem("morelock") localStorage.setItem('now', type)
localStorage.setItem("now", type); todo('Integrated TL Loading...(Local)')
todo("Integrated TL Loading...(Local)"); const domain = localStorage.getItem('domain_' + acct_id)
//まずLocal let startLocal = 'https://' + domain + '/api/v1/timelines/public?local=true'
var domain = localStorage.getItem("domain_" + acct_id); let local = await getTL(startLocal, acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); let startHome = 'https://' + domain + '/api/v1/timelines/home'
var start = "https://" + domain + "/api/v1/timelines/public?local=true"; let home = await getTL(startHome, acct_id)
fetch(start, { let concated = _.concat(local, home)
let uniqued = _.uniqBy(concated, 'id')
let sorted = _.orderBy(uniqued, ['id'], ['desc'])
let integrated = _.slice(sorted, 0, 19)
$('#landing_' + tlid).hide()
let mute = getFilterTypeByAcct(acct_id, 'mix')
let templete = parse(integrated, type, acct_id, tlid, '', mute, type)
localStorage.setItem('lastobj_' + tlid, integrated[0].id)
$('#timeline_' + tlid).html(templete)
additional(acct_id, tlid)
jQuery('time.timeago').timeago()
todc()
if(mastodonBaseWsStatus[domain] == 'cannotuse') {
mixre(acct_id, tlid, 'mix', mute, voice, '')
} else if (mastodonBaseWsStatus[domain] == 'undetected' || mastodonBaseWsStatus[domain] == 'connecting') {
const mbws = setInterval(function () {
if(mastodonBaseWsStatus[domain] == 'cannotuse') {
mixre(acct_id, tlid, 'mix', mute, voice, '')
clearInterval(mbws)
} else if(mastodonBaseWsStatus[domain] == 'available') {
mastodonBaseWs[domain].send(`{"type":"subscribe","stream":"public:local"}`)
clearInterval(mbws)
}
}, 1000)
} else if(mastodonBaseWsStatus[domain] == 'available') {
mastodonBaseWs[domain].send(`{"type":"subscribe","stream":"public:local"}`)
}
$(window).scrollTop(0)
lastId = integrated[0].id
beforeLastId = integrated[1].id
}
async function getTL(start, acct_id) {
const at = localStorage.getItem('acct_' + acct_id + '_at')
let promise = await fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
}, }
}).then(function (response) { })
return response.json(); if (!promise.ok) {
}).catch(function (error) { promise.text().then(function(text) {
todo(error); setLog(promise.url, promise.status, text)
console.error(error); })
}).then(function (jsonL) { }
var start = "https://" + domain + "/api/v1/timelines/home"; return await promise.json()
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 (jsonH) {
var homearr = [];
var timeline = jsonL.concat(jsonH);
timeline.sort(function (a, b) {
if (date(a.created_at, "unix") >= date(b.created_at, "unix")) return -1;
if (date(a.created_at, "unix") < date(b.created_at, "unix")) return 1;
return 0;
});
if (type == "integrated") {
timeline.splice(20);
}
var templete = "";
if (localStorage.getItem("filter_" + acct_id) != "undefined") {
var mute = getFilterType(JSON.parse(localStorage.getItem("filter_" + acct_id)), "mix");
} else {
var mute = [];
}
Object.keys(timeline).forEach(function (key) {
var pkey = key * 1 + 1;
if (pkey < timeline.length) {
if (date(timeline[key].created_at, "unix") != date(timeline[pkey].created_at, "unix")) {
if (type == "integrated") {
templete = templete + parse([timeline[key]], '', acct_id, tlid, "", mute, "mix");
} else if (type == "plus") {
if (timeline[key].account.acct == timeline[key].account.username) {
templete = templete + parse([timeline[key]], '', acct_id, tlid, "", mute, "plus");
}
}
}
}
});
$("#landing_" + tlid).hide();
$("#timeline_" + tlid).html(templete);
mixre(acct_id, tlid, type, mute, delc, voice);
additional(acct_id, tlid);
jQuery("time.timeago").timeago();
todc();
});
});
} }
//Streamingに接続 //Streamingに接続
function mixre(acct_id, tlid, TLtype, mute, delc, voice, mode) { function mixre(acct_id, tlid, TLtype, mute, voice, mode) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if (localStorage.getItem("streaming_" + acct_id)) { if (localStorage.getItem('streaming_' + acct_id)) {
var wss = localStorage.getItem("streaming_" + acct_id) var wss = localStorage.getItem('streaming_' + acct_id)
} else { } else {
var wss = "wss://" + domain var wss = 'wss://' + domain
} }
var startHome = wss + var startHome = wss + '/api/v1/streaming/?stream=user&access_token=' + at
"/api/v1/streaming/?stream=user&access_token=" + at; var startLocal = wss + '/api/v1/streaming/?stream=public:local&access_token=' + at
var startLocal = wss + var wshid = wsHome.length
"/api/v1/streaming/?stream=public:local&access_token=" + at; var wslid = wsLocal.length
var wshid = websocketHome.length; wsHome[wshid] = new WebSocket(startHome)
var wslid = websocketLocal.length; wsLocal[wslid] = new WebSocket(startLocal)
websocketHome[wshid] = new WebSocket(startHome); wsHome[wshid].onopen = function(mess) {
websocketLocal[wslid] = new WebSocket(startLocal); localStorage.setItem('wssH_' + tlid, wshid)
websocketHome[wshid].onopen = function (mess) { console.table({
localStorage.setItem("wssH_" + tlid, wshid); tlid: tlid,
console.table({ "tlid": tlid, "type": "Connect Streaming API(Integrated:Home)", "domain": domain, "message": mess }) type: 'Connect Streaming API(Integrated:Home)',
$("#notice_icon_" + tlid).removeClass("red-text"); domain: domain,
message: mess
})
$('#notice_icon_' + tlid).removeClass('red-text')
} }
websocketLocal[wslid].onopen = function (mess) { wsLocal[wslid].onopen = function(mess) {
localStorage.setItem("wssL_" + tlid, wslid); localStorage.setItem('wssL_' + tlid, wslid)
console.table({ "tlid": tlid, "type": "Connect Streaming API(Integrated:Local)", "domain": domain, "message": mess }) console.table({
$("#notice_icon_" + tlid).removeClass("red-text"); tlid: tlid,
type: 'Connect Streaming API(Integrated:Local)',
domain: domain,
message: mess
})
$('#notice_icon_' + tlid).removeClass('red-text')
} }
websocketLocal[wslid].onmessage = function (mess) { wsLocal[wslid].onmessage = function(mess) {
console.log(["Receive Streaming API:(Integrated:Local)", obj]); console.log('Receive Streaming API:(Integrated:Local)', mess)
integratedMessage(mess, acct_id, tlid, mute, voice)
var obj = JSON.parse(JSON.parse(mess.data).payload);
var type = JSON.parse(mess.data).event;
if (type == "delete") {
if (delc == "true") {
$("#timeline_" + tlid + " [toot-id=" + JSON.parse(mess.data).payload + "]").addClass("emphasized");
$("#timeline_" + tlid + " [toot-id=" + JSON.parse(mess.data).payload + "]").addClass("by_delcatch");
} else {
$("[toot-id=" + JSON.parse(mess.data).payload + "]").hide();
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove();
}
} else if (type == "update") {
var templete = parse([obj], '', acct_id, tlid, "", mute);
if ($("#timeline_" + tlid + " [toot-id=" + obj.id + "]").length < 1) {
if (voice) {
say(obj.content)
}
var templete = parse([obj], type, acct_id, tlid, "", mute, "mix");
var pool = localStorage.getItem("pool_" + tlid);
if (pool) {
pool = templete + pool;
} else {
pool = templete
}
localStorage.setItem("pool_" + tlid, pool);
scrollck();
additional(acct_id, tlid);
jQuery("time.timeago").timeago();
} else {
todo("二重取得発生中");
}
}
} }
websocketHome[wshid].onmessage = function (mess) { wsHome[wshid].onmessage = function(mess) {
console.log(["Receive Streaming API:(Integrated:Home)", obj]); console.log(['Receive Streaming API:(Integrated:Home)', mess])
var obj = JSON.parse(JSON.parse(mess.data).payload); integratedMessage(mess, acct_id, tlid, mute, voice)
var type = JSON.parse(mess.data).event;
if (type == "delete") {
if (del > 10) {
reconnector(tlid, type, acct_id, data)
} else {
localStorage.setItem("delete", del * 1 + 1)
}
if (delc == "true") {
$("[toot-id=" + JSON.parse(mess.data).payload + "]").addClass("emphasized");
$("[toot-id=" + JSON.parse(mess.data).payload + "]").addClass("by_delcatch");
} else {
$("[toot-id=" + JSON.parse(mess.data).payload + "]").hide();
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove();
}
} else if (type == "update") {
localStorage.removeItem("delete");
if (TLtype == "integrated") {
var templete = parse([obj], '', acct_id, tlid);
} else if (TLtype == "plus") {
if (obj.account.acct == obj.account.username) {
var templete = parse([obj], '', acct_id, tlid, "", mute, "mix");
} else {
var templete = "";
}
}
if ($("#timeline_" + tlid + " [toot-id=" + obj.id + "]").length < 1) {
if (voice) {
say(obj.content)
}
var templete = parse([obj], type, acct_id, tlid, "", mute, "mix");
var pool = localStorage.getItem("pool_" + tlid);
if (pool) {
pool = templete + pool;
} else {
pool = templete
}
localStorage.setItem("pool_" + tlid, pool);
scrollck();
additional(acct_id, tlid);
jQuery("time.timeago").timeago();
} else {
todo("二重取得発生中");
}
}
} }
websocketLocal[wslid].onerror = function (error) { wsLocal[wslid].onerror = function(error) {
console.error('WebSocketLocal Error') console.error('WebSocketLocal Error')
console.error(error); console.error(error)
if (mode == "error") { $('#notice_icon_' + tlid).addClass('red-text')
$("#notice_icon_" + tlid).addClass("red-text"); if (mode == 'error') {
todo('WebSocket Error ' + error); todo('WebSocket Error ' + error)
} else { } else {
var errorct = localStorage.getItem("wserror_" + tlid) * 1 + 1; var errorct = localStorage.getItem('wserror_' + tlid) * 1 + 1
localStorage.setItem("wserror_" + tlid, errorct); localStorage.setItem('wserror_' + tlid, errorct)
if (errorct < 3) { if (errorct < 3) {
reconnector(tlid, TLtype, acct_id, "", "error"); reconnector(tlid, TLtype, acct_id, '', 'error')
} }
} }
}; }
websocketLocal[wslid].onclose = function () { wsLocal[wslid].onclose = function() {
console.warn('WebSocketLocal Closing:' + tlid); console.warn('WebSocketLocal Closing:' + tlid)
if (mode == "error") { $('#notice_icon_' + tlid).addClass('red-text')
$("#notice_icon_" + tlid).addClass("red-text"); if (mode == 'error') {
todo('WebSocket Closed'); todo('WebSocket Closed')
} else { } else {
var errorct = localStorage.getItem("wserror_" + tlid) * 1 + 1; var errorct = localStorage.getItem('wserror_' + tlid) * 1 + 1
localStorage.setItem("wserror_" + tlid, errorct); localStorage.setItem('wserror_' + tlid, errorct)
if (errorct < 3) { if (errorct < 3) {
reconnector(tlid, TLtype, acct_id, "", "error"); reconnector(tlid, TLtype, acct_id, '', 'error')
} }
} }
}; }
websocketHome[wshid].onerror = function (error) { wsHome[wshid].onerror = function(error) {
console.error(['WebSocketHome Error', error]) console.error(['WebSocketHome Error', error])
if (mode == "error") { $('#notice_icon_' + tlid).addClass('red-text')
$("#notice_icon_" + tlid).addClass("red-text"); if (mode == 'error') {
todo('WebSocket Error ' + error); todo('WebSocket Error ' + error)
} else { } else {
var errorct = localStorage.getItem("wserror_" + tlid) * 1 + 1; var errorct = localStorage.getItem('wserror_' + tlid) * 1 + 1
localStorage.setItem("wserror_" + tlid, errorct); localStorage.setItem('wserror_' + tlid, errorct)
if (errorct < 3) { if (errorct < 3) {
reconnector(tlid, TLtype, acct_id, "", "error"); reconnector(tlid, TLtype, acct_id, '', 'error')
} }
} }
}; }
websocketHome[wshid].onclose = function () { wsHome[wshid].onclose = function() {
console.warn('WebSocketHome Closing:' + tlid); console.warn('WebSocketHome Closing:' + tlid)
if (mode == "error") { $('#notice_icon_' + tlid).addClass('red-text')
$("#notice_icon_" + tlid).addClass("red-text"); if (mode == 'error') {
todo('WebSocket Closed'); todo('WebSocket Closed')
} else { } else {
var errorct = localStorage.getItem("wserror_" + tlid) * 1 + 1; var errorct = localStorage.getItem('wserror_' + tlid) * 1 + 1
localStorage.setItem("wserror_" + tlid, errorct); localStorage.setItem('wserror_' + tlid, errorct)
if (errorct < 3) { if (errorct < 3) {
reconnector(tlid, TLtype, acct_id, "", "error"); reconnector(tlid, TLtype, acct_id, '', 'error')
} }
} }
}
};
} }
function integratedMessage(mess, acct_id, tlid, mute, voice) {
//ある程度のスクロールで発火 let data = JSON.parse(mess.data)
function mixmore(tlid, type) { let type = data.event
var multi = localStorage.getItem("column"); let payload = data.payload
var obj = JSON.parse(multi); if (type == 'delete') {
var acct_id = obj[tlid].domain; $('[unique-id=' + payload + ']').hide()
moreloading = true; $('[unique-id=' + payload + ']').remove()
todo("Integrated TL MoreLoading...(Local)"); } else if (type == 'update') {
var domain = localStorage.getItem("domain_" + acct_id); let obj = JSON.parse(payload)
var at = localStorage.getItem("acct_" + acct_id + "_at");
var sid = $("#timeline_" + tlid + " .cvo").last().attr("unique-id"); if (obj.id != lastId && obj.id != beforeLastId) {
lastId = obj.id
beforeLastId = obj.id
var start = "https://" + domain + "/api/v1/timelines/public?local=true&max_id=" + sid; let dom = parse([obj], '', acct_id, tlid, '', mute)
fetch(start, { if (voice) say(obj.content)
method: 'GET', if ($('timeline_box_' + tlid + '_box .tl-box').scrollTop() === 0) {
headers: { $('#timeline_' + tlid).prepend(dom)
'content-type': 'application/json', } else {
'Authorization': 'Bearer ' + at let pool = localStorage.getItem('pool_' + tlid)
}, if (pool) {
}).then(function (response) { pool = dom + pool
return response.json(); } else {
}).catch(function (error) { pool = dom
todo(error);
console.error(error);
}).then(function (jsonL) {
var start = "https://" + domain + "/api/v1/timelines/home?max_id=" + sid;
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 (jsonH) {
var homearr = [];
var timeline = jsonL.concat(jsonH);
timeline.sort(function (a, b) {
if (date(a.created_at, "unix") > date(b.created_at, "unix")) return -1;
if (date(a.created_at, "unix") < date(b.created_at, "unix")) return 1;
return 0;
});
timeline.splice(20);
var templete = "";
Object.keys(timeline).forEach(function (key) {
var pkey = key * 1 + 1;
if (pkey < 20) {
if (date(timeline[key].created_at, "unix") != date(timeline[pkey].created_at, "unix")) {
if (localStorage.getItem("filter_" + acct_id) != "undefined") {
var mute = getFilterType(JSON.parse(localStorage.getItem("filter_" + acct_id)), "mix");
} else {
var mute = [];
}
if (type == "integrated") {
templete = templete + parse([timeline[key]], '', acct_id, tlid, "", mute, "mix");
} else if (type == "plus") {
if (timeline[key].account.acct == timeline[key].account.username) {
templete = templete + parse([timeline[key]], '', acct_id, tlid, "", mute, "mix");
}
}
}
} }
localStorage.setItem('pool_' + tlid, pool)
}); }
scrollck()
$("#timeline_" + tlid).append(templete); additional(acct_id, tlid)
additional(acct_id, tlid); jQuery('time.timeago').timeago()
jQuery("time.timeago").timeago(); }
moreloading = false; }
todc(); }
}); //ある程度のスクロールで発火
}); async function mixmore(tlid, type) {
var multi = localStorage.getItem('column')
var obj = JSON.parse(multi)
var acct_id = obj[tlid].domain
moreloading = true
todo('Integrated TL MoreLoading...(Local)')
const domain = localStorage.getItem('domain_' + acct_id)
const sid = $('#timeline_' + tlid + ' .cvo')
.last()
.attr('unique-id')
let startLocal = 'https://' + domain + '/api/v1/timelines/public?local=true&max_id=' + sid
let local = await getTL(startLocal, acct_id)
let startHome = 'https://' + domain + '/api/v1/timelines/home?max_id=' + sid
let home = await getTL(startHome, acct_id)
let concated = _.concat(local, home)
let uniqued = _.uniqBy(concated, 'id')
let sorted = _.orderBy(uniqued, ['id'], ['desc'])
let integrated = _.slice(sorted, 0, 19)
$('#landing_' + tlid).hide()
let mute = getFilterTypeByAcct(acct_id, 'mix')
let templete = parse(integrated, type, acct_id, tlid, '', mute, type)
localStorage.setItem('lastobj_' + tlid, integrated[0].id)
$('#timeline_' + tlid).append(templete)
additional(acct_id, tlid)
jQuery('time.timeago').timeago()
moreloading = false
todc()
} }

View File

@@ -1,354 +1,365 @@
//通知 //通知
//取得+Streaming接続 //取得+Streaming接続
function notf(acct_id, tlid, sys) { function notf(acct_id, tlid, sys) {
if (sys == "direct") { if (sys == 'direct') {
notfColumn(acct_id, tlid, sys) notfColumn(acct_id, tlid, sys)
} else { } else {
notfCommon(acct_id, tlid, sys) notfCommon(acct_id, tlid, sys)
} }
} }
function notfColumn(acct_id, tlid, sys) { function notfColumn(acct_id, tlid, sys) {
todo("Notifications Loading..."); todo('Notifications Loading...')
var native = localStorage.getItem("nativenotf"); var native = localStorage.getItem('nativenotf')
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if (!native) { if (!native) {
native = "yes"; native = 'yes'
} }
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem('mode_' + domain) == 'misskey') {
var misskey = true; var misskey = true
var start = "https://" + domain + "/api/i/notifications"; var start = 'https://' + domain + '/api/i/notifications'
httpreq.open("POST", start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
var body = JSON.stringify({ var body = JSON.stringify({
i: at i: at
}); })
} else { } else {
var misskey = false; var misskey = false
if (localStorage.getItem("exclude-" + tlid)) { if (localStorage.getItem('exclude-' + tlid)) {
var exc = localStorage.getItem("exclude-" + tlid); var exc = localStorage.getItem('exclude-' + tlid)
} else { } else {
var exc = ""; var exc = ''
} }
var start = "https://" + domain + "/api/v1/notifications" + exc; var start = 'https://' + domain + '/api/v1/notifications' + exc
httpreq.open("GET", start, true); httpreq.open('GET', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
var body = ""; var body = ''
} }
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(body); httpreq.send(body)
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
var max_id = httpreq.getResponseHeader("link"); if (this.status !== 200) {
setLog(start, this.status, this.response)
}
var max_id = httpreq.getResponseHeader('link')
if (max_id) { if (max_id) {
max_id = max_id.match(/[?&]{1}max_id=([0-9]+)/)[1] max_id = max_id.match(/[?&]{1}max_id=([0-9]+)/)[1]
} }
if (json[0]) { if (json[0]) {
var templete = ""; var templete = ''
var lastnotf = localStorage.getItem("lastnotf_" + acct_id); var lastnotf = localStorage.getItem('lastnotf_' + acct_id)
localStorage.setItem("lastnotf_" + acct_id, json[0].id); localStorage.setItem('lastnotf_' + acct_id, json[0].id)
Object.keys(json).forEach(function (key) { Object.keys(json).forEach(function(key) {
var obj = json[key]; var obj = json[key]
if (lastnotf == obj.id && key > 0 && native == "yes") { if (lastnotf == obj.id && key > 0 && native == 'yes') {
var ct = key; var ct = key
if (key > 14) { if (key > 14) {
ct = "15+"; ct = '15+'
} }
var os = localStorage.getItem("platform"); var os = localStorage.getItem('platform')
var options = { var options = {
body: ct + lang.lang_notf_new, body: ct + lang.lang_notf_new,
icon: localStorage.getItem("prof_" + acct_id) icon: localStorage.getItem('prof_' + acct_id)
};
if (os == "darwin") {
var n = new Notification('TheDesk:' + domain, options);
} else {
var nativeNotfOpt = ['TheDesk:' + domain, ct + lang.lang_notf_new, localStorage.getItem("prof_" + acct_id)]
postMessage(["nativeNotf", nativeNotfOpt], "*")
} }
var n = new Notification('TheDesk:' + domain, options)
} }
if (localStorage.getItem("filter_" + acct_id) != "undefined") { var mute = getFilterTypeByAcct(acct_id, 'notif')
var mute = getFilterType(JSON.parse(localStorage.getItem("filter_" + acct_id)), "notif"); //Pleromaにはmoveというtypeがあるらしい。何が互換APIじゃ
} else { if (obj.type != 'follow' && obj.type != 'move' && obj.type != 'follow_request') {
var mute = [];
}
if (obj.type != "follow") {
if (misskey) { if (misskey) {
templete = templete + misskeyParse([obj], 'notf', acct_id, tlid, -1, mute); templete = templete + misskeyParse([obj], 'notf', acct_id, tlid, -1, mute)
} else { } else {
templete = templete + parse([obj], 'notf', acct_id, tlid, -1, mute); templete = templete + parse([obj], 'notf', acct_id, tlid, -1, mute)
} }
} else if (obj.type == 'follow_request') {
templete = templete + userparse([obj.account], 'request', acct_id, tlid, -1)
} else { } else {
if (misskey) { if (misskey) {
templete = templete + misskeyUserparse([obj], 'notf', acct_id, tlid, -1, mute); templete = templete + misskeyUserparse([obj], 'notf', acct_id, tlid, -1, mute)
} else { } else {
templete = templete + userparse([obj.account], 'notf', acct_id, tlid, -1); templete = templete + userparse([obj.account], obj.type, acct_id, tlid, -1)
} }
} }
}); })
templete = templete + '<div class="hide notif-marker" data-maxid="' + max_id + '"></div>'; templete = templete + '<div class="hide notif-marker" data-maxid="' + max_id + '"></div>'
$("#timeline_" + tlid).html(templete); $('#timeline_' + tlid).html(templete)
$("#landing_" + tlid).hide(); $('#landing_' + tlid).hide()
jQuery("time.timeago").timeago(); jQuery('time.timeago').timeago()
} }
$("#notf-box").addClass("fetched"); $('#notf-box').addClass('fetched')
todc(); todc()
//Markers //Markers
var markers = localStorage.getItem("markers"); var markers = localStorage.getItem('markers')
if (markers == "no") { if (markers == 'yes') {
markers = false;
} else {
markers = true markers = true
} else {
markers = false
} }
if (markers) { if (markers) {
getMarker(tlid, "notf", acct_id) getMarker(tlid, 'notf', acct_id)
} }
} }
} }
if (!misskey) { if (!misskey) {
if (localStorage.getItem("streaming_" + acct_id)) { if (localStorage.getItem('streaming_' + acct_id)) {
var wss = localStorage.getItem("streaming_" + acct_id) var wss = localStorage.getItem('streaming_' + acct_id)
} else { } else {
var wss = "wss://" + domain var wss = 'wss://' + domain
} }
var start = wss + "/api/v1/streaming/?stream=user&access_token=" + var start = wss + '/api/v1/streaming/?stream=user&access_token=' + at
at;
} else { } else {
var start = "wss://" + domain + "/?i=" + var start = 'wss://' + domain + '/?i=' + at
at;
} }
} }
function notfCommon(acct_id, tlid, sys) { function notfCommon(acct_id, tlid, sys, stream) {
todo("Notifications Loading..."); todo('Notifications Loading...')
var native = localStorage.getItem("nativenotf"); var native = localStorage.getItem('nativenotf')
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
if (!native) { if (!native) {
native = "yes"; native = 'yes'
} }
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem('mode_' + domain) == 'misskey') {
var misskey = true; var misskey = true
var start = "https://" + domain + "/api/i/notifications"; var start = 'https://' + domain + '/api/i/notifications'
var i = { var i = {
method: 'POST', method: 'POST',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json'
}, },
body: JSON.stringify({ body: JSON.stringify({
i: at i: at
}) })
} }
} else { } else {
var misskey = false; var misskey = false
var start = "https://" + domain + "/api/v1/notifications"; var start = 'https://' + domain + '/api/v1/notifications'
var i = { var i = {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
}, }
} }
} }
fetch(start, i).then(function (response) { if(stream == 'only') {
console.log("header to get param:" + response.headers.get('link'));
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json[0]) {
var templete = "";
var lastnotf = localStorage.getItem("lastnotf_" + acct_id);
localStorage.setItem("lastnotf_" + acct_id, json[0].id);
Object.keys(json).forEach(function (key) {
var obj = json[key];
if (lastnotf == obj.id && key > 0 && native == "yes") {
var ct = key;
if (key > 14) {
ct = "15+";
}
var os = localStorage.getItem("platform");
var options = {
body: ct + lang.lang_notf_new,
icon: localStorage.getItem("prof_" + acct_id)
};
if (os == "darwin") {
var n = new Notification('TheDesk:' + domain, options);
} else {
var nativeNotfOpt = ['TheDesk:' + domain, ct + lang.lang_notf_new, localStorage.getItem("prof_" + acct_id)]
postMessage(["nativeNotf", nativeNotfOpt], "*")
}
}
if (localStorage.getItem("filter_" + acct_id) != "undefined") {
var mute = getFilterType(JSON.parse(localStorage.getItem("filter_" + acct_id)), "notif");
} else {
var mute = [];
}
if (obj.type != "follow") {
if (misskey) {
templete = templete + misskeyParse([obj], 'notf', acct_id, 'notf', -1, mute);
} else {
templete = templete + parse([obj], 'notf', acct_id, 'notf', -1, mute);
}
} else {
if (misskey) {
templete = templete + misskeyUserparse([obj], 'notf', acct_id, 'notf', -1, mute);
} else {
templete = templete + userparse([obj.account], 'notf', acct_id, 'notf', -1);
}
}
});
$("div[data-notf=" + acct_id + "]").html(templete);
$("#landing_" + tlid).hide();
jQuery("time.timeago").timeago();
}
$("#notf-box").addClass("fetched");
todc();
notfWS(misskey, acct_id, tlid, domain, at) notfWS(misskey, acct_id, tlid, domain, at)
}); return false
}
fetch(start, i)
.then(function(response) {
console.log('header to get param:' + response.headers.get('link'))
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
if (json[0]) {
var templete = ''
var lastnotf = localStorage.getItem('lastnotf_' + acct_id)
localStorage.setItem('lastnotf_' + acct_id, json[0].id)
Object.keys(json).forEach(function(key) {
var obj = json[key]
if (lastnotf == obj.id && key > 0 && native == 'yes') {
var ct = key
if (key > 14) {
ct = '15+'
}
var os = localStorage.getItem('platform')
var options = {
body: ct + lang.lang_notf_new,
icon: localStorage.getItem('prof_' + acct_id)
}
var n = new Notification('TheDesk:' + domain, options)
}
var mute = getFilterTypeByAcct(acct_id, 'notif')
//Pleromaにはmoveというtypeがあるらしい。何が互換APIじゃ
if (obj.type != 'follow' && obj.type != 'move') {
if (misskey) {
templete = templete + misskeyParse([obj], 'notf', acct_id, 'notf', -1, mute)
} else {
templete = templete + parse([obj], 'notf', acct_id, 'notf', -1, mute)
}
} else {
if (misskey) {
templete = templete + misskeyUserparse([obj], 'notf', acct_id, 'notf', -1, mute)
} else {
templete = templete + userparse([obj.account], obj.type, acct_id, 'notf', -1)
}
}
})
$('div[data-notf=' + acct_id + ']').html(templete)
$('#landing_' + tlid).hide()
jQuery('time.timeago').timeago()
}
$('#notf-box').addClass('fetched')
todc()
if(stream != 'no') notfWS(misskey, acct_id, tlid, domain, at)
})
} }
function notfWS(misskey, acct_id, tlid, domain, at) { function notfWS(misskey, acct_id, tlid, domain, at) {
if (!misskey) { if (!misskey) {
if (localStorage.getItem("streaming_" + acct_id)) { if (localStorage.getItem('streaming_' + acct_id)) {
var wss = localStorage.getItem("streaming_" + acct_id) var wss = localStorage.getItem('streaming_' + acct_id)
} else { } else {
var wss = "wss://" + domain var wss = 'wss://' + domain
} }
var start = wss + "/api/v1/streaming/?stream=user&access_token=" + var start = wss + '/api/v1/streaming/?stream=user&access_token=' + at
at;
var wsid = websocketNotf.length;
websocketNotf[acct_id] = new WebSocket(start);
websocketNotf[acct_id].onopen = function (mess) {
console.table({ "acct_id": acct_id, "type": "Connect Streaming API(Notf)", "domain": domain, "message": [mess] })
$("i[data-notf=" + acct_id + "]").removeClass("red-text");
var wsid = websocketNotf.length
websocketNotf[acct_id] = new WebSocket(start)
websocketNotf[acct_id].onopen = function(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) { websocketNotf[acct_id].onmessage = function(mess) {
//console.log(["Receive Streaming API(Notf):" + acct_id + "(" + domain + ")", JSON.parse(JSON.parse(mess.data).payload)]); //console.log(["Receive Streaming API(Notf):" + acct_id + "(" + domain + ")", JSON.parse(JSON.parse(mess.data).payload)]);
var popup = localStorage.getItem("popup"); var popup = localStorage.getItem('popup')
if (!popup) { if (!popup) {
popup = 0; popup = 0
} }
var obj = JSON.parse(JSON.parse(mess.data).payload); var obj = JSON.parse(JSON.parse(mess.data).payload)
var type = JSON.parse(mess.data).event; var type = JSON.parse(mess.data).event
if (type == "notification") { if (type == 'notification') {
var templete = ""; var templete = ''
localStorage.setItem("lastnotf_" + acct_id, obj.id); localStorage.setItem('lastnotf_' + acct_id, obj.id)
if (!$("#unread_" + tlid + " .material-icons").hasClass("teal-text")) { if (!$('#unread_' + tlid + ' .material-icons').hasClass('teal-text')) {
//markers show中はダメ //markers show中はダメ
if (obj.type != "follow") { if (obj.type != 'follow' && obj.type != 'follow_request') {
templete = parse([obj], 'notf', acct_id, 'notf', popup); templete = parse([obj], 'notf', acct_id, 'notf', popup)
} else if (obj.type == 'follow_request') {
templete = userparse([obj.account], 'request', acct_id, 'notf', -1)
} else { } else {
templete = userparse([obj], 'notf', acct_id, 'notf', popup); templete = userparse([obj], obj.type, acct_id, 'notf', popup)
} }
if (!$("div[data-notfIndv=" + acct_id + "_" + obj.id + "]").length) { if (!$('div[data-notfIndv=' + acct_id + '_' + obj.id + ']').length) {
$("div[data-notf=" + acct_id + "]").prepend(templete); $('div[data-notf=' + acct_id + ']').prepend(templete)
$("div[data-const=notf_" + acct_id + "]").prepend(templete); $('div[data-const=notf_' + acct_id + ']').prepend(templete)
} }
jQuery("time.timeago").timeago(); jQuery('time.timeago').timeago()
} }
} else if (type == "delete") { } else if (type == 'delete') {
$("[toot-id=" + obj + "]").hide(); $('[toot-id=' + obj + ']').hide()
$("[toot-id=" + obj + "]").remove(); $('[toot-id=' + obj + ']').remove()
}
}
websocketNotf[acct_id].onerror = function(error) {
console.error('WebSocket Error ' + error)
errorct++
console.log(errorct)
if (errorct < 3) {
notfWS(misskey, acct_id, tlid, domain, at)
}
}
websocketNotf[acct_id].onclose = function(error) {
console.error('WebSocket Close ' + error)
errorct++
console.log(errorct)
if (errorct < 3) {
notfWS(misskey, acct_id, tlid, domain, at)
} }
} }
websocketNotf[acct_id].onerror = function (error) {
console.error('WebSocket Error ' + error);
notfWS(misskey, acct_id, tlid, domain, at)
};
} }
} }
//一定のスクロールで発火 //一定のスクロールで発火
function notfmore(tlid) { function notfmore(tlid) {
console.log({ "status": "kicked", "status": moreloading }); console.log({ status: 'kicked', status: moreloading })
var multi = localStorage.getItem("column"); var multi = localStorage.getItem('column')
var obj = JSON.parse(multi); var obj = JSON.parse(multi)
var acct_id = obj[tlid].domain; var acct_id = obj[tlid].domain
if (!type) { if (!type) {
var type = obj[tlid].type; var type = obj[tlid].type
} else { } else {
var data; var data
} }
var sid = $("#timeline_" + tlid + " .notif-marker").last().attr("data-maxid"); var sid = $('#timeline_' + tlid + ' .notif-marker')
var at = localStorage.getItem("acct_" + acct_id + "_at"); .last()
var domain = localStorage.getItem("domain_" + acct_id); .attr('data-maxid')
var at = localStorage.getItem('acct_' + acct_id + '_at')
var domain = localStorage.getItem('domain_' + acct_id)
if (sid && !moreloading) { if (sid && !moreloading) {
moreloading = true; moreloading = true
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem('mode_' + domain) == 'misskey') {
var misskey = true; var misskey = true
var start = "https://" + domain + "/api/i/notifications"; var start = 'https://' + domain + '/api/i/notifications'
httpreq.open(POST, start, true); httpreq.open(POST, start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
var body = JSON.stringify({ var body = JSON.stringify({
i: at, i: at,
untilID: sid untilID: sid
}); })
} else { } else {
var misskey = false; var misskey = false
if (localStorage.getItem("exclude-" + tlid)) { if (localStorage.getItem('exclude-' + tlid)) {
var exc = localStorage.getItem("exclude-" + tlid) + "&max_id=" + sid; var exc = localStorage.getItem('exclude-' + tlid) + '&max_id=' + sid
} else { } else {
var exc = "?max_id=" + sid; var exc = '?max_id=' + sid
} }
var start = "https://" + domain + "/api/v1/notifications" + exc; var start = 'https://' + domain + '/api/v1/notifications' + exc
httpreq.open("GET", start, true); httpreq.open('GET', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
var body = ""; var body = ''
} }
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(body); httpreq.send(body)
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
console.log(["More notifications on " + tlid, json]); if (this.status !== 200) {
var max_id = httpreq.getResponseHeader("link").match(/[?&]{1}max_id=([0-9]+)/)[1]; setLog(start, this.status, this.response)
if (json[0]) {
var templete = "";
var lastnotf = localStorage.getItem("lastnotf_" + acct_id);
localStorage.setItem("lastnotf_" + acct_id, json[0].id);
Object.keys(json).forEach(function (key) {
var obj = json[key];
if (localStorage.getItem("filter_" + acct_id) != "undefined") {
var mute = getFilterType(JSON.parse(localStorage.getItem("filter_" + acct_id)), "notif");
} else {
var mute = [];
}
if (obj.type != "follow") {
if (misskey) {
templete = templete + misskeyParse([obj], 'notf', acct_id, 'notf', -1, mute);
} else {
templete = templete + parse([obj], 'notf', acct_id, 'notf', -1, mute);
}
} else {
if (misskey) {
templete = templete + misskeyUserparse([obj], 'notf', acct_id, 'notf', -1, mute);
} else {
templete = templete + userparse([obj.account], 'notf', acct_id, 'notf', -1);
}
}
});
moreloading = false;
templete = templete + '<div class="hide notif-marker" data-maxid="' + max_id + '"></div>';
$("#timeline_" + tlid).append(templete);
$("#landing_" + tlid).hide();
jQuery("time.timeago").timeago();
} }
$("#notf-box").addClass("fetched"); console.log(['More notifications on ' + tlid, json])
todc(); var max_id = httpreq.getResponseHeader('link').match(/[?&]{1}max_id=([0-9]+)/)[1]
if (json[0]) {
var templete = ''
var lastnotf = localStorage.getItem('lastnotf_' + acct_id)
localStorage.setItem('lastnotf_' + acct_id, json[0].id)
Object.keys(json).forEach(function(key) {
var obj = json[key]
var mute = getFilterTypeByAcct(acct_id, 'notif')
if (obj.type != 'follow') {
if (misskey) {
templete = templete + misskeyParse([obj], 'notf', acct_id, 'notf', -1, mute)
} else {
templete = templete + parse([obj], 'notf', acct_id, 'notf', -1, mute)
}
} else {
if (misskey) {
templete = templete + misskeyUserparse([obj], 'notf', acct_id, 'notf', -1, mute)
} else {
templete = templete + userparse([obj.account], obj.type, acct_id, 'notf', -1)
}
}
})
moreloading = false
templete = templete + '<div class="hide notif-marker" data-maxid="' + max_id + '"></div>'
$('#timeline_' + tlid).append(templete)
$('#landing_' + tlid).hide()
jQuery('time.timeago').timeago()
}
$('#notf-box').addClass('fetched')
todc()
} }
} }
} }
@@ -356,53 +367,64 @@ function notfmore(tlid) {
//通知トグルボタン //通知トグルボタン
function notfToggle(acct, tlid) { function notfToggle(acct, tlid) {
if ($("#notf-box_" + tlid).hasClass("column-hide")) { if ($('#notf-box_' + tlid).hasClass('column-hide')) {
$("#notf-box_" + tlid).css("display", "block") $('#notf-box_' + tlid).css('display', 'block')
$("#notf-box_" + tlid).animate({ $('#notf-box_' + tlid).animate(
'height': '400px' {
}, { height: '400px'
'duration': 300, },
'complete': function () { {
$("#notf-box_" + tlid).css("overflow-y", "scroll") duration: 300,
$("#notf-box_" + tlid).removeClass("column-hide") complete: function() {
$('#notf-box_' + tlid).css('overflow-y', 'scroll')
$('#notf-box_' + tlid).removeClass('column-hide')
} }
}); }
)
} else { } else {
$("#notf-box_" + tlid).css("overflow-y", "hidden") $('#notf-box_' + tlid).css('overflow-y', 'hidden')
$("#notf-box_" + tlid).animate({ $('#notf-box_' + tlid).animate(
'height': '0' {
}, { height: '0'
'duration': 300, },
'complete': function () { {
$("#notf-box_" + tlid).addClass("column-hide") duration: 300,
$("#notf-box_" + tlid).css("display", "none") complete: function() {
$('#notf-box_' + tlid).addClass('column-hide')
$('#notf-box_' + tlid).css('display', 'none')
} }
}); }
)
} }
notfCanceler(acct) notfCanceler(acct)
} }
function notfCanceler(acct) { function notfCanceler(acct) {
$(".notf-reply_" + acct).text(0); $('.notf-reply_' + acct).text(0)
localStorage.removeItem("notf-reply_" + acct) localStorage.removeItem('notf-reply_' + acct)
$(".notf-reply_" + acct).addClass("hide"); $('.notf-reply_' + acct).addClass('hide')
$(".notf-fav_" + acct).text(0); $('.notf-fav_' + acct).text(0)
localStorage.removeItem("notf-fav_" + acct) localStorage.removeItem('notf-fav_' + acct)
$(".notf-fav_" + acct).addClass("hide"); $('.notf-fav_' + acct).addClass('hide')
$(".notf-bt_" + acct).text(0); $('.notf-bt_' + acct).text(0)
localStorage.removeItem("notf-bt_" + acct) localStorage.removeItem('notf-bt_' + acct)
$(".notf-bt_" + acct).addClass("hide"); $('.notf-bt_' + acct).addClass('hide')
$(".notf-follow_" + acct).text(0); $('.notf-follow_' + acct).text(0)
localStorage.removeItem("notf-follow_" + acct) localStorage.removeItem('notf-follow_' + acct)
$(".notf-follow_" + acct).addClass("hide"); $('.notf-follow_' + acct).addClass('hide')
$(".notf-icon_" + acct).removeClass("red-text"); $('.notf-icon_' + acct).removeClass('red-text')
} var id = $('#announce_' + acct + ' .announcement').first().attr('data-id')
function allNotfRead() { $('.notf-announ_' + acct + '_ct').text("")
var multi = localStorage.getItem("multi"); if(id) {
if (multi) { localStorage.setItem('announ_' + acct, id)
var obj = JSON.parse(multi);
Object.keys(obj).forEach(function (key) {
notfCanceler(key)
});
} }
} }
allNotfRead() function allNotfRead() {
var multi = localStorage.getItem('multi')
if (multi) {
var obj = JSON.parse(multi)
Object.keys(obj).forEach(function(key) {
notfCanceler(key)
})
}
}
allNotfRead()

View File

@@ -1,249 +1,375 @@
//Integrated TL //Integrated TL
function mixtl(acct_id, tlid) { function mixtl(acct_id, tlid, type, delc, voice) {
var type = "mix"; localStorage.removeItem('morelock')
localStorage.removeItem("morelock") localStorage.setItem('now', type)
localStorage.setItem("now", type); todo('Integrated TL Loading...(Local)')
todo("Integrated TL Loading...(Local)");
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_"+ acct_id + "_at");
//まずLocal //まずLocal
var start = "https://" + domain + "/api/v1/timelines/public?local=true"; 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'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
},
}).then(function(response) {
return response.json();
}).catch(function(error) {
todo(error);
console.error(error);
}).then(function(json) {
//パースして描画
var templete = parse(json, 'mix', acct_id, tlid);
$("#timeline_" + tlid).html(templete[0]);
jQuery("time.timeago").timeago();
$(window).scrollTop(0);
var locals = templete[1];
var times = templete[2];
todo("Integrated TL Loading...(Home)");
//Home
var start = "https://" + domain + "/api/v1/timelines/home";
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(obj) {
//ホームのオブジェクトをUnix時間で走査
if (!$("[toot-id=" + obj[0].id + "]").length) {
$("#timeline_" + tlid + " .cvo").first().before(parse([obj[0]], 'home',
acct_id));
//delete obj[0];
}
//Localが遅すぎてHomeの全てより過去の場合
var unixL=date(json[0].created_at,"unix");
var unixH=date(obj[obj.length-1].created_at,"unix");
//console.log(unixH+"vs"+unixL)
if(unixH < unixL){
Object.keys(obj).forEach(function(key) {
var skey = obj.length - key - 1;
var toot = obj[key];
console.log(toot);
var id = toot.id;
if ($("#timeline_" + tlid + " [toot-id=" + toot.id + "]").length < 1) {
//console.log(toot.id);
var tarunix = date(toot.created_at, 'unix');
var beforekey2;
var key2;
//console.log(locals)
//ホームのオブジェクトに対してLocalのオブジェクトを時間走査
Object.keys(times).forEach(function(key2) {
if (times[key2] < tarunix) {
var local = json[key2].id;
//console.log($.strip_tags(toot.content));
html = parse(
[toot], 'home', acct_id, tlid);
$("#timeline_" + tlid + " [toot-id=" + local + "]").before(html);
//console.log("#timeline_" + tlid + " [toot-id=" + local + "]");
tarunix = 0;
}
});
}
});
}else{
html = parse(
obj, 'home', acct_id, tlid);
$("#timeline_" + tlid).html(html);
} }
todc(); })
mixre(acct_id, tlid); .then(function(response) {
additional(acct_id, tlid); if (!response.ok) {
jQuery("time.timeago").timeago(); response.text().then(function(text) {
}); setLog(response.url, response.status, text)
}); })
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(jsonL) {
var start = 'https://' + domain + '/api/v1/timelines/home'
fetch(start, {
method: 'GET',
headers: {
'content-type': 'application/json',
Authorization: 'Bearer ' + at
}
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(jsonH) {
var homearr = []
var timeline = jsonL.concat(jsonH)
timeline.sort(function(a, b) {
if (date(a.created_at, 'unix') >= date(b.created_at, 'unix')) return -1
if (date(a.created_at, 'unix') < date(b.created_at, 'unix')) return 1
return 0
})
if (type == 'integrated') {
timeline.splice(20)
}
var templete = ''
if (localStorage.getItem('filter_' + acct_id) != 'undefined') {
var mute = getFilterType(JSON.parse(localStorage.getItem('filter_' + acct_id)), 'mix')
} else {
var mute = []
}
Object.keys(timeline).forEach(function(key) {
var pkey = key * 1 + 1
if (pkey < timeline.length) {
if (
date(timeline[key].created_at, 'unix') != date(timeline[pkey].created_at, 'unix')
) {
if (type == 'integrated') {
templete = templete + parse([timeline[key]], '', acct_id, tlid, '', mute, 'mix')
} else if (type == 'plus') {
if (timeline[key].account.acct == timeline[key].account.username) {
templete =
templete + parse([timeline[key]], '', acct_id, tlid, '', mute, 'plus')
}
}
}
}
})
$('#landing_' + tlid).hide()
$('#timeline_' + tlid).html(templete)
mixre(acct_id, tlid, type, mute, delc, voice)
additional(acct_id, tlid)
jQuery('time.timeago').timeago()
todc()
})
})
} }
//Streamingに接続 //Streamingに接続
function mixre(acct_id, tlid) { function mixre(acct_id, tlid, TLtype, mute, delc, voice, mode) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_"+ acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var type = "mix"; if (localStorage.getItem('streaming_' + acct_id)) {
localStorage.setItem("now", type); var wss = localStorage.getItem('streaming_' + acct_id)
var startHome = "wss://" + domain + } else {
"/api/v1/streaming/?stream=user&access_token=" + at; var wss = 'wss://' + domain
}
var startLocal = "wss://" + domain + var startHome = wss + '/api/v1/streaming/?stream=user&access_token=' + at
"/api/v1/streaming/?stream=public:local&access_token=" + at; var startLocal = wss + '/api/v1/streaming/?stream=public:local&access_token=' + at
var wshid = websocketHome.length; var wshid = websocketHome.length
var wslid = websocketLocal.length; var wslid = websocketLocal.length
websocketHome[wshid] = new WebSocket(startHome); websocketHome[wshid] = new WebSocket(startHome)
websocketLocal[wslid] = new WebSocket(startLocal); websocketLocal[wslid] = new WebSocket(startLocal)
websocketHome[wshid].onopen = function(mess) { websocketHome[wshid].onopen = function(mess) {
console.log("Connect Streaming API(Home)"); localStorage.setItem('wssH_' + tlid, wshid)
$("#notice_icon_" + tlid).removeClass("red-text"); 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) { websocketLocal[wslid].onopen = function(mess) {
console.log("Connect Streaming API(Local)"); localStorage.setItem('wssL_' + tlid, wslid)
$("#notice_icon_" + tlid).removeClass("red-text"); 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) { websocketLocal[wslid].onmessage = function(mess) {
console.log("Receive Streaming API:"); console.log(['Receive Streaming API:(Integrated:Local)', obj])
var obj = JSON.parse(JSON.parse(mess.data).payload); var obj = JSON.parse(JSON.parse(mess.data).payload)
console.log(obj); var type = JSON.parse(mess.data).event
var type = JSON.parse(mess.data).event; if (type == 'delete') {
if (type == "delete") { if (delc == 'true') {
$("[toot-id=" + JSON.parse(mess.data).payload + "]").hide(); $('#timeline_' + tlid + ' [toot-id=' + JSON.parse(mess.data).payload + ']').addClass(
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove(); 'emphasized'
} else if (type == "update") { )
var templete = parse([obj], '', acct_id, tlid); $('#timeline_' + tlid + ' [toot-id=' + JSON.parse(mess.data).payload + ']').addClass(
var pool = localStorage.getItem("pool_" + tlid); 'by_delcatch'
)
} else {
$('[toot-id=' + JSON.parse(mess.data).payload + ']').hide()
$('[toot-id=' + JSON.parse(mess.data).payload + ']').remove()
}
} else if (type == 'update') {
var templete = parse([obj], '', acct_id, tlid, '', mute)
if ($('#timeline_' + tlid + ' [toot-id=' + obj.id + ']').length < 1) {
if (voice) {
say(obj.content)
}
var templete = parse([obj], type, acct_id, tlid, '', mute, 'mix')
var pool = localStorage.getItem('pool_' + tlid)
if (pool) { if (pool) {
pool = templete + pool; pool = templete + pool
} else { } else {
pool = templete pool = templete
} }
localStorage.setItem("pool_" + tlid, pool); localStorage.setItem('pool_' + tlid, pool)
scrollck();
additional(acct_id, tlid); scrollck()
jQuery("time.timeago").timeago();
todc(); additional(acct_id, tlid)
jQuery('time.timeago').timeago()
} else {
todo('二重取得発生中')
}
} }
} }
websocketHome[wshid].onmessage = function(mess) { websocketHome[wshid].onmessage = function(mess) {
console.log("Receive Streaming API:(Home)"); console.log(['Receive Streaming API:(Integrated:Home)', obj])
var obj = JSON.parse(JSON.parse(mess.data).payload)
var obj = JSON.parse(JSON.parse(mess.data).payload); var type = JSON.parse(mess.data).event
console.log(obj); if (type == 'delete') {
var type = JSON.parse(mess.data).event; if (del > 10) {
if (type == "delete") { reconnector(tlid, type, acct_id, data)
$("[toot-id=" + JSON.parse(mess.data).payload + "]").hide(); } else {
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove(); localStorage.setItem('delete', del * 1 + 1)
} else if (type == "update") { }
var templete = parse([obj], '', acct_id, tlid); if (delc == 'true') {
if (obj.visibility != "public" || obj.account.acct != obj.account.username) { $('[toot-id=' + JSON.parse(mess.data).payload + ']').addClass('emphasized')
var pool = localStorage.getItem("pool_" + tlid); $('[toot-id=' + JSON.parse(mess.data).payload + ']').addClass('by_delcatch')
} else {
$('[toot-id=' + JSON.parse(mess.data).payload + ']').hide()
$('[toot-id=' + JSON.parse(mess.data).payload + ']').remove()
}
} else if (type == 'update') {
localStorage.removeItem('delete')
if (TLtype == 'integrated') {
var templete = parse([obj], '', acct_id, tlid)
} else if (TLtype == 'plus') {
if (obj.account.acct == obj.account.username) {
var templete = parse([obj], '', acct_id, tlid, '', mute, 'mix')
} else {
var templete = ''
}
}
if ($('#timeline_' + tlid + ' [toot-id=' + obj.id + ']').length < 1) {
if (voice) {
say(obj.content)
}
var templete = parse([obj], type, acct_id, tlid, '', mute, 'mix')
var pool = localStorage.getItem('pool_' + tlid)
if (pool) { if (pool) {
pool = templete + pool; pool = templete + pool
} else { } else {
pool = templete pool = templete
} }
localStorage.setItem("pool_" + tlid, pool); localStorage.setItem('pool_' + tlid, pool)
scrollck();
additional(acct_id, tlid); scrollck()
jQuery("time.timeago").timeago();
additional(acct_id, tlid)
jQuery('time.timeago').timeago()
} else {
todo('二重取得発生中')
} }
} }
} }
websocketLocal[wslid].onerror = function(error) { 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.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) { 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.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')
}
}
}
} }
//ある程度のスクロールで発火 //ある程度のスクロールで発火
function mixmore(tlid) { function mixmore(tlid, type) {
var multi = localStorage.getItem("column"); var multi = localStorage.getItem('column')
var obj = JSON.parse(multi); var obj = JSON.parse(multi)
var acct_id = obj[tlid].domain; var acct_id = obj[tlid].domain
todo("Integrated TL MoreLoading...(Local)"); moreloading = true
var domain = localStorage.getItem("domain_" + acct_id); todo('Integrated TL MoreLoading...(Local)')
var at = localStorage.getItem("acct_"+ acct_id + "_at"); var domain = localStorage.getItem('domain_' + acct_id)
var sid = $("#timeline_" + tlid + " .cvo").last().attr("toot-id"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var len = $("#timeline_" + tlid + " .cvo").length var sid = $('#timeline_' + tlid + ' .cvo')
var start = "https://" + domain + .last()
"/api/v1/timelines/public?local=true&max_id=" + sid; .attr('unique-id')
console.log(start);
var start = 'https://' + domain + '/api/v1/timelines/public?local=true&max_id=' + sid
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
}, }
}).then(function(response) { })
return response.json(); .then(function(response) {
}).catch(function(error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function(json) { })
var templete = parse(json, 'mix', acct_id, tlid);
$("#timeline_" + tlid).append(templete[0]);
var locals = templete[1];
todo("Integrated TL MoreLoading...(Home)");
console.log(sid);
var start = "https://" + domain + "/api/v1/timelines/home?max_id=" + sid;
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(obj) {
if ($("[toot-id=" + obj[0].id + "]").length < 1) {
$("#timeline_" + tlid + " .cvo").eq(len).before(parse([obj[0]], 'home',
acct_id)+'<div class="divider"></div>');
//delete obj[0];
} }
Object.keys(obj).forEach(function(key) { return response.json()
var skey = obj.length - key - 1; })
var toot = obj[skey]; .catch(function(error) {
var id = toot.id; todo(error)
var tarunix = date(toot.created_at, 'unix'); setLog(start, 'JSON', error)
var beforekey2; console.error(error)
var key2; })
Object.keys(locals).forEach(function(key2) { .then(function(jsonL) {
if ($("[toot-id=" + toot.id + "]").length <1) { var start = 'https://' + domain + '/api/v1/timelines/home?max_id=' + sid
if (key2 > tarunix) { fetch(start, {
var local = locals[key2]; method: 'GET',
$("#timeline_" + tlid + " [toot-id=" + local + "]").after(parse([toot], 'home', headers: {
acct_id, tlid)); 'content-type': 'application/json',
tarunix = 2147483647; Authorization: 'Bearer ' + at
} }
})
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
} }
}); return response.json()
}); })
additional(acct_id, tlid); .catch(function(error) {
jQuery("time.timeago").timeago(); todo(error)
todc(); setLog(start, 'JSON', error)
}); console.error(error)
}); })
.then(function(jsonH) {
var homearr = []
var timeline = jsonL.concat(jsonH)
timeline.sort(function(a, b) {
if (date(a.created_at, 'unix') > date(b.created_at, 'unix')) return -1
if (date(a.created_at, 'unix') < date(b.created_at, 'unix')) return 1
return 0
})
timeline.splice(20)
var templete = ''
Object.keys(timeline).forEach(function(key) {
var pkey = key * 1 + 1
if (pkey < 20) {
if (
date(timeline[key].created_at, 'unix') != date(timeline[pkey].created_at, 'unix')
) {
if (localStorage.getItem('filter_' + acct_id) != 'undefined') {
var mute = getFilterType(
JSON.parse(localStorage.getItem('filter_' + acct_id)),
'mix'
)
} else {
var mute = []
}
if (type == 'integrated') {
templete = templete + parse([timeline[key]], '', acct_id, tlid, '', mute, 'mix')
} else if (type == 'plus') {
if (timeline[key].account.acct == timeline[key].account.username) {
templete = templete + parse([timeline[key]], '', acct_id, tlid, '', mute, 'mix')
}
}
}
}
})
} $('#timeline_' + tlid).append(templete)
additional(acct_id, tlid)
jQuery('time.timeago').timeago()
moreloading = false
todc()
})
})
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,37 +1,37 @@
//アンケートのトグル //アンケートのトグル
function pollToggle() { function pollToggle() {
if ($("#poll").hasClass("hide")) { if ($('#poll').hasClass('hide')) {
$("#right-side").show() $('#right-side').show()
$("#right-side").css("width", "300px") $('#right-side').css('width', '300px')
$("#left-side").css("width", "calc(100% - 300px)") $('#left-side').css('width', 'calc(100% - 300px)')
var width = localStorage.getItem("postbox-width"); var width = localStorage.getItem('postbox-width')
if (width) { if (width) {
width = width.replace("px", "") * 1 + 300 width = width.replace('px', '') * 1 + 300
} else { } else {
width = 600 width = 600
} }
$("#post-box").css("width", width + "px") $('#post-box').css('width', width + 'px')
$("#poll").removeClass("hide") $('#poll').removeClass('hide')
$("#pollsta").text(lang.lang_yesno) $('#pollsta').text(lang.lang_yesno)
} else { } else {
$("#right-side").hide() $('#right-side').hide()
$("#left-side").css("width", "100%") $('#left-side').css('width', '100%')
$("#right-side").css("width", "300px") $('#right-side').css('width', '300px')
var width = localStorage.getItem("postbox-width"); var width = localStorage.getItem('postbox-width')
if (width) { if (width) {
width = width.replace("px", "") * 1 width = width.replace('px', '') * 1
} else { } else {
width = 300 width = 300
} }
$("#post-box").css("width", width + "px") $('#post-box').css('width', width + 'px')
$("#emoji").addClass("hide") $('#emoji').addClass('hide')
$("#poll").addClass("hide") $('#poll').addClass('hide')
$("#pollsta").text(lang.lang_no) $('#pollsta').text(lang.lang_no)
} }
} }
function pollProviderCk() { function pollProviderCk() {
$(".poll-provider").addClass("hide"); $('.poll-provider').addClass('hide')
$("#" + $("#poll-sel").val()).removeClass("hide"); $('#' + $('#poll-sel').val()).removeClass('hide')
} }
/* /*
function pollAddtime(num){ function pollAddtime(num){
@@ -42,98 +42,81 @@ function pollAddtime(num){
} }
*/ */
function pollCalc() { function pollCalc() {
var days = $("#days_poll").val(); var days = $('#days_poll').val()
var hrs = $("#hours_poll").val(); var hrs = $('#hours_poll').val()
var mins = $("#mins_poll").val(); var mins = $('#mins_poll').val()
console.log("Poll calc:" + days * 86400 + hrs * 3600 + mins * 60) console.log('Poll calc:' + days * 86400 + hrs * 3600 + mins * 60)
return days * 86400 + hrs * 3600 + mins * 60; return days * 86400 + hrs * 3600 + mins * 60
} }
//Vote //Vote
function voteSelMastodon(acct_id, id, to, mul) { function voteSelMastodon(acct_id, id, to, mul, elem) {
if ($('.vote_' + acct_id + '_' + id + '_' + to).hasClass("sel")) { if ($(elem).hasClass('sel')) {
$('.vote_' + acct_id + '_' + id + '_' + to).css("background-color", "transparent") $(elem).css('background-color', 'transparent')
$('.vote_' + acct_id + '_' + id + '_' + to).removeClass("sel"); $(elem).removeClass('sel')
} else { } else {
if (!mul) { if (!mul) {
$('.vote_' + acct_id + '_' + id + ' div').each(function (i, elem) { $('.vote_' + acct_id + '_' + id + ' div').css('background-color', 'transparent')
if (i == to) { $('.vote_' + acct_id + '_' + id + ' div').removeClass('sel')
$(this).css("background-color", "var(--emphasized)"); $(elem).css('background-color', 'var(--emphasized)')
$(this).addClass("sel"); $(elem).addClass('sel')
} else { } else {
$(this).css("background-color", "transparent") $(elem).css('background-color', 'var(--emphasized)')
$(this).removeClass("sel"); $(elem).addClass('sel')
} }
}); }
} else {
$('.vote_' + acct_id + '_' + id + '_' + to).css("background-color", "var(--emphasized)")
$('.vote_' + acct_id + '_' + id + '_' + to).addClass("sel");
}
}
} }
function voteMastodon(acct_id, id) { function voteMastodon(acct_id, id, target) {
var choice = []; var choice = []
$('.vote_' + acct_id + '_' + id + ' div').each(function (i, elem) { $(`#vote${target} div`).each(function(i, elem) {
if ($(this).hasClass("sel")) { if ($(this).hasClass('sel')) {
choice.push(i + ""); choice.push(i + '')
} }
}); })
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/polls/" + id + "/votes"; var start = 'https://' + domain + '/api/v1/polls/' + id + '/votes'
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem('mode_' + domain) == 'misskey') {
return false; return false
} }
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('POST', start, true); httpreq.open('POST', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = "json"; httpreq.responseType = 'json'
httpreq.send(JSON.stringify({ choices: choice })); httpreq.send(JSON.stringify({ choices: choice }))
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function() {
voteMastodonrefresh(acct_id, id) voteMastodonrefresh(acct_id, id, target)
} }
} }
function showResult(acct_id, id) { function showResult(acct_id, id) {
$('.vote_' + acct_id + '_' + id + '_result').toggleClass("hide") $('.vote_' + acct_id + '_' + id + '_result').toggleClass('hide')
}
function voteMastodonrefresh(acct_id, id, target) {
var datetype = localStorage.getItem('datetype')
if (!datetype) {
datetype = 'absolute'
}
var httpreqd = new XMLHttpRequest()
var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = 'https://' + domain + '/api/v1/polls/' + id
httpreqd.open('GET', start, true)
httpreqd.setRequestHeader('Content-Type', 'application/json')
httpreqd.setRequestHeader('Authorization', 'Bearer ' + at)
httpreqd.responseType = 'json'
httpreqd.send()
httpreqd.onreadystatechange = function() {
if (httpreqd.readyState == 4) {
if (this.status !== 200) {
setLog(start, this.status, this.response)
}
var json = httpreqd.response
console.log(['Refresh vote', json])
if (!json) {
return false
}
var poll = pollParse(json, acct_id, json.emojis)
$(`#vote${target}`).html(poll)
}
}
} }
function voteMastodonrefresh(acct_id, id) {
var datetype = localStorage.getItem("datetype");
if (!datetype) {
datetype = "absolute";
}
var httpreqd = new XMLHttpRequest();
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_" + acct_id + "_at");
var start = "https://" + domain + "/api/v1/polls/" + id;
httpreqd.open('GET', start, true);
httpreqd.setRequestHeader('Content-Type', 'application/json');
httpreqd.setRequestHeader('Authorization', 'Bearer ' + at);
httpreqd.responseType = 'json';
httpreqd.send();
httpreqd.onreadystatechange = function () {
if (httpreqd.readyState == 4) {
var json = httpreqd.response;
console.log(["Refresh vote", json]);
if (!json) {
return false;
}
var poll = "";
var choices = json.options;
var myvote = lang.lang_parse_voted;
var result_hide = "";
Object.keys(choices).forEach(function (keyc) {
var choice = choices[keyc];
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 + '">' + escapeHTML(choice.title) + '<span class="vote_' + acct_id + '_' + json.id + '_result ' + result_hide + '">(' + choice.votes_count + ')</span></div>';
});
poll = poll + myvote + '<a onclick="voteMastodonrefresh(\'' + acct_id + '\',\'' + json.id + '\')" class="pointer">' + lang.lang_manager_refresh + '</a><span class="cbadge cbadge-hover" title="' + date(json.expires_at, 'absolute') +
'"><i class="far fa-calendar-times"></i>' +
date(json.expires_at, datetype) + '</span>';
$('.vote_' + acct_id + '_' + json.id).html(poll)
}
}
}

View File

@@ -1,108 +1,183 @@
$voise = null; $voise = null
$voiseName = lang.lang_speech; isBouyomi = localStorage.getItem('voice_bouyomi')
$voices = speechSynthesis.getVoices(); $voiseName = lang.lang_speech
$synthes = new SpeechSynthesisUtterance(); $voices = speechSynthesis.getVoices()
$voise = $.grep($voices, function (n, i) { return n.name == $voiseName })[0]; $synthes = new SpeechSynthesisUtterance()
$synthes.voice = $voise; // 音声の設定 $voise = $.grep($voices, function(n, i) {
localStorage.removeItem("voicebank"); return n.name == $voiseName
})[0]
$synthes.voice = $voise // 音声の設定
localStorage.removeItem('voicebank')
speechSynthesis.cancel() speechSynthesis.cancel()
if (!localStorage.getItem("voice_vol")) { if (!localStorage.getItem('voice_vol')) {
localStorage.setItem("voice_vol", 1) localStorage.setItem('voice_vol', 1)
} }
$synthes.rate = localStorage.getItem("voice_speed"); voiceRate = localStorage.getItem('voice_speed')
$synthes.pitch = localStorage.getItem("voice_pitch"); $synthes.rate = voiceRate
$synthes.volume = localStorage.getItem("voice_vol"); voicePitch = localStorage.getItem('voice_pitch')
$synthes.pitch = voicePitch
voiceVol = localStorage.getItem('voice_vol')
$synthes.volume = voiceVol
function say(msgr) { function say(msgr) {
msg = voiceParse(msgr); msg = voiceParse(msgr)
var voice = localStorage.getItem("voicebank"); var voice = localStorage.getItem('voicebank')
var obj = JSON.parse(voice); var obj = JSON.parse(voice)
if (!obj) { if (!obj) {
var json = JSON.stringify([msg]); var json = JSON.stringify([msg])
localStorage.setItem("voicebank", json); localStorage.setItem('voicebank', json)
} else { } else {
obj.push([msg]); obj.push([msg])
var json = JSON.stringify(obj); var json = JSON.stringify(obj)
localStorage.setItem("voicebank", json); localStorage.setItem('voicebank', json)
} }
} }
$repeat = setInterval(function () { $repeat = setInterval(function() {
if (!speechSynthesis.speaking) { if (!speechSynthesis.speaking) {
var voice = localStorage.getItem("voicebank"); var voice = localStorage.getItem('voicebank')
if (voice) { if (voice) {
var obj = JSON.parse(voice); var obj = JSON.parse(voice)
if (obj[0]) { if (obj[0]) {
$synthes.text = obj[0]; if (localStorage.getItem('voice_bouyomi')) {
speechSynthesis.speak($synthes); var delim = '<bouyomi>'
obj.splice(0, 1); var thisVoiceRate = voiceRate * 10 + 70
var json = JSON.stringify(obj); var thisVoicePitch = voicePitch * 50 + 70
localStorage.setItem("voicebank", json); var thisVoiceVol = voiceVol * 100
} console.log(thisVoiceRate, thisVoicePitch, thisVoiceVol)
} var command = 0x0001
} var type = 0
}, 300); var sends =
'' +
command +
delim +
thisVoiceRate +
delim +
thisVoicePitch +
delim +
thisVoiceVol +
delim +
type +
delim +
obj[0]
bouyomiConnect(sends)
} else {
$synthes.text = obj[0]
speechSynthesis.speak($synthes)
}
obj.splice(0, 1)
var json = JSON.stringify(obj)
localStorage.setItem('voicebank', json)
}
}
}
}, 300)
function voiceParse(msg) { function voiceParse(msg) {
msg = $.strip_tags(msg); msg = $.strip_tags(msg)
msg = msg.replace(/#/g, ""); msg = msg.replace(/#/g, '')
msg = msg.replace(/'/g, ""); msg = msg.replace(/'/g, '')
msg = msg.replace(/"/g, ""); msg = msg.replace(/"/g, '')
msg = msg.replace(/https?:\/\/[a-zA-Z0-9./-@_=?%&-]+/g, ""); msg = msg.replace(/https?:\/\/[a-zA-Z0-9./-@_=?%&-]+/g, '')
return msg; return msg
} }
function voiceToggle(tlid) { function voiceToggle(tlid) {
var voiceck = localStorage.getItem("voice_" + tlid); var voiceck = localStorage.getItem('voice_' + tlid)
if (voiceck) { if (voiceck) {
localStorage.removeItem("voice_" + tlid); localStorage.removeItem('voice_' + tlid)
speechSynthesis.cancel() speechSynthesis.cancel()
$("#sta-voice-" + tlid).text("Off"); if (localStorage.getItem('voice_bouyomi')) {
$("#sta-voice-" + tlid).css("color", 'red'); var command = 0x0010
parseColumn(tlid); var sends = '' + command
} else { bouyomiConnect(sends)
localStorage.setItem("voice_" + tlid, "true"); }
$("#sta-voice-" + tlid).text("On"); $('#sta-voice-' + tlid).text('Off')
$("#sta-voice-" + tlid).css("color", '#009688'); $('#sta-voice-' + tlid).css('color', 'red')
parseColumn(tlid); parseColumn(tlid)
} } else {
localStorage.setItem('voice_' + tlid, 'true')
$('#sta-voice-' + tlid).text('On')
$('#sta-voice-' + tlid).css('color', '#009688')
parseColumn(tlid)
}
} }
function voiceCheck(tlid) { function voiceCheck(tlid) {
var voiceck = localStorage.getItem("voice_" + tlid); var voiceck = localStorage.getItem('voice_' + tlid)
if (voiceck) { if (voiceck) {
$("#sta-voice-" + tlid).text("On"); $('#sta-voice-' + tlid).text('On')
$("#sta-voice-" + tlid).css("color", '#009688'); $('#sta-voice-' + tlid).css('color', '#009688')
} else { } else {
$("#sta-voice-" + tlid).text("Off"); $('#sta-voice-' + tlid).text('Off')
$("#sta-voice-" + tlid).css("color", 'red'); $('#sta-voice-' + tlid).css('color', 'red')
} }
} }
function voicePlay() { function voicePlay() {
if (speechSynthesis.speaking) { if (speechSynthesis.speaking) {
speechSynthesis.cancel() speechSynthesis.cancel()
} else { } else {
$synthes.text = $("#voicetxt").val(); var text = $('#voicetxt').val()
$synthes.rate = $("#voicespeed").val() / 10; var rate = $('#voicespeed').val()
$synthes.pitch = $("#voicepitch").val() / 50; var pitch = $('#voicepitch').val()
$synthes.volume = $("#voicevol").val() / 100; var vol = $('#voicevol').val()
speechSynthesis.speak($synthes); if (localStorage.getItem('voice_bouyomi')) {
} var delim = '<bouyomi>'
rate = rate * 1 + 70
pitch = pitch * 1 + 70
var command = 0x0001 // コマンドです。0x0001.読み上げ/0x0010.ポーズ/0x0020.再開/0x0030.スキップ
/*var speed = 100; // 速度50-200。-1を指定すると本体設定
var pitch = 100; // ピッチ50-200。-1を指定すると本体設定
var volume = 100; // ボリューム0-100。-1を指定すると本体設定*/
var type = 0 // 声質(0.本体設定/1.女性1/2.女性2/3.男性1/4.男性2/5.中性/6.ロボット/7.機械1/8.機械2)
var sends =
'' + command + delim + rate + delim + pitch + delim + vol + delim + type + delim + text
bouyomiConnect(sends)
} else {
$synthes.text = text
$synthes.rate = rate / 10
$synthes.pitch = pitch / 50
$synthes.volume = vol / 100
speechSynthesis.speak($synthes)
}
}
} }
function voiceSettings() { function voiceSettings() {
localStorage.setItem("voice_speed", $("#voicespeed").val() / 10); var awk = $('[name=bym]:checked').val()
localStorage.setItem("voice_pitch", $("#voicepitch").val() / 50); if (awk == 'yes') {
localStorage.setItem("voice_vol", $("#voicevol").val() / 100); localStorage.setItem('voice_bouyomi', 'yes')
M.toast({ html: lang.lang_speech_refresh, displayLength: 3000 }) M.toast({ html: 'Bouyomi Chan connection requires WebSocket Plugin', displayLength: 3000 })
} else {
localStorage.removeItem('voice_bouyomi')
}
localStorage.setItem('voice_speed', $('#voicespeed').val() / 10)
localStorage.setItem('voice_pitch', $('#voicepitch').val() / 50)
localStorage.setItem('voice_vol', $('#voicevol').val() / 100)
M.toast({ html: lang.lang_speech_refresh, displayLength: 3000 })
} }
function voiceSettingLoad() { function voiceSettingLoad() {
var speed = localStorage.getItem("voice_speed"); var flag = localStorage.getItem('voice_bouyomi')
var pitch = localStorage.getItem("voice_pitch"); if (flag) {
var vol = localStorage.getItem("voice_vol"); $('#bym_yes').prop('checked', true)
if (speed) { } else {
$("#voicespeed").val(speed * 10); $('#bym_no').prop('checked', true)
} }
if (pitch) { var speed = localStorage.getItem('voice_speed')
$("#voicepitch").val(pitch * 50); var pitch = localStorage.getItem('voice_pitch')
} var vol = localStorage.getItem('voice_vol')
if (vol) { if (speed) {
$("#voicevol").val(vol * 100); $('#voicespeed').val(speed * 10)
} $('#voicespeedVal').text(speed * 10)
} }
if (pitch) {
$('#voicepitch').val(pitch * 50)
$('#voicepitchVal').text(pitch * 50)
}
if (vol) {
$('#voicevol').val(vol * 100)
$('#voicevolVal').text(vol * 100)
}
}
function bouyomiConnect(sends) {
var socket = new WebSocket('ws://localhost:50002/')
socket.onopen = function() {
socket.send(sends)
}
}

View File

@@ -1,252 +1,360 @@
//検索 //検索
//検索ボックストグル //検索ボックストグル
function searchMenu() { function searchMenu() {
$("#src-contents").html(""); $('#src-contents').html('')
trend(); trend()
$("#left-menu div").removeClass("active"); $('#left-menu a').removeClass('active')
$("#searchMenu").addClass("active"); $('#searchMenu').addClass('active')
$(".menu-content").addClass("hide"); $('.menu-content').addClass('hide')
$("#src-box").removeClass("hide"); $('#src-box').removeClass('hide')
//$('ul.tabs').tabs('select_tab', 'src-sta'); //$('ul.tabs').tabs('select_tab', 'src-sta');
} }
//検索取得 //検索取得
function src(mode, offset) { function src(mode, offset) {
if(!offset){ if (!offset) {
$("#src-contents").html(""); $('#src-contents').html('')
var add = "" var add = ''
}else{ } else {
var add = "&type=accounts&offset=" + $("#src-accts .cvo").length var add = '&type=accounts&offset=' + $('#src-accts .cvo').length
} }
var q = $("#src").val(); var q = $('#src').val()
var acct_id = $("#src-acct-sel").val(); var acct_id = $('#src-acct-sel').val()
if (acct_id == "tootsearch") { if (acct_id == 'tootsearch') {
tsAdd(q) tsAdd(q)
return false; return false
} }
localStorage.setItem("last-use", acct_id); localStorage.setItem('last-use', acct_id)
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var m = q.match(/^#(.+)$/); var m = q.match(/^#(.+)$/)
if (m) { q = m[1]; } if (m) {
if (user == "--now") { q = m[1]
var user = $('#his-data').attr("user-id"); }
if (user == '--now') {
var user = $('#his-data').attr('user-id')
} }
if (!mode) { if (!mode) {
var start = "https://" + domain + "/api/v2/search?q=" + q + add var start = 'https://' + domain + '/api/v2/search?resolve=true&q=' + encodeURIComponent(q) + add
} else { } else {
var start = "https://" + domain + "/api/v1/search?q=" + q var start = 'https://' + domain + '/api/v1/search?q=' + q
} }
console.log("Try to search at " + start) console.log('Try to search at ' + start)
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
src("v1")
return false;
}).then(function (json) {
console.log(["Search", json]);
//ハッシュタグ
if (json.hashtags[0]) {
var tags = "";
Object.keys(json.hashtags).forEach(function (key4) {
var tag = json.hashtags[key4];
if (mode) {
tags = tags + '<a onclick="tl(\'tag\',\'' + tag + '\',\'' + acct_id +
'\',\'add\')" class="pointer">#' + escapeHTML(tag) + '</a><br> ';
} else {
tags = tags + graphDraw(tag, acct_id);
}
});
$("#src-contents").append("Tags<br>" + tags);
} }
//トゥート })
if (json.statuses[0]) { .then(function(response) {
var templete = parse(json.statuses, '', acct_id); if (!response.ok) {
$("#src-contents").append("<br>Mentions<br>" + templete); response.text().then(function(text) {
} setLog(response.url, response.status, text)
//アカウント })
if (json.accounts[0]) {
var templete = userparse(json.accounts, '', acct_id);
if(!offset){
$("#src-contents").append("<br>Accounts<div id=\"src-accts\">" + templete + '</div><a onclick="src(false,\'more\')" class="pointer">more...</a>');
}else{
$("#src-accts").append(templete)
} }
return response.json()
} })
jQuery("time.timeago").timeago(); .catch(function(error) {
}); src('v1')
return false
})
.then(function(json) {
console.log(['Search', json])
//ハッシュタグ
if (json.hashtags[0]) {
var tags = ''
Object.keys(json.hashtags).forEach(function(key4) {
var tag = json.hashtags[key4]
if (mode) {
tags =
tags +
`<a onclick="tl('tag','${tag}','${acct_id}','add')" class="pointer">
#${escapeHTML(tag)}
</a>
<br> `
} else {
tags = tags + graphDraw(tag, acct_id)
}
})
$('#src-contents').append('Tags<br>' + tags)
}
//トゥート
if (json.statuses[0]) {
var templete = parse(json.statuses, '', acct_id)
$('#src-contents').append('<br>Mentions<br>' + templete)
}
//アカウント
if (json.accounts[0]) {
var templete = userparse(json.accounts, '', acct_id)
if (!offset) {
$('#src-contents').append(
`<br>Accounts<div id="src-accts">
${templete}
</div><a onclick="src(false,'more')" class="pointer">more...</a>`
)
} else {
$('#src-accts').append(templete)
}
}
jQuery('time.timeago').timeago()
})
} }
function tsAdd(q) { function tsAdd(q) {
var add = { var add = {
domain: acct_id, domain: acct_id,
type: "tootsearch", type: 'tootsearch',
data: q data: q
}; }
var multi = localStorage.getItem("column"); var multi = localStorage.getItem('column')
var obj = JSON.parse(multi); var obj = JSON.parse(multi)
localStorage.setItem("card_" + obj.length, "true"); localStorage.setItem('card_' + obj.length, 'true')
obj.push(add); obj.push(add)
var json = JSON.stringify(obj); var json = JSON.stringify(obj)
localStorage.setItem("column", json); localStorage.setItem('column', json)
parseColumn('add'); parseColumn('add')
} }
function tootsearch(tlid, q) { function tootsearch(tlid, q) {
var start = "https://tootsearch.chotto.moe/api/v1/search?from=0&sort=created_at%3Adesc&q=" + q if(!q || q=='undefined') {
console.log("Toot srrach at " + start) return false
$("#notice_" + tlid).text("tootsearch(" + q + ")"); }
$("#notice_icon_" + tlid).text("search"); var start = 'https://tootsearch.chotto.moe/api/v1/search?from=0&sort=created_at%3Adesc&q=' + q
console.log('Toot search at ' + start)
$('#notice_' + tlid).text('tootsearch(' + q + ')')
$('#notice_icon_' + tlid).text('search')
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
}, }
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).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; return response.json()
} })
if (!templete) { .catch(function(error) {
templete = lang.lang_details_nodata; todo(error)
} else { setLog(start, 'JSON', error)
templete = templete + '<div class="hide ts-marker" data-maxid="' + max_id + '"></div>'; console.error(error)
} })
$("#timeline_" + tlid).html(templete); .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).html(templete)
jQuery("time.timeago").timeago(); jQuery('time.timeago').timeago()
}); })
} }
function moreTs(tlid, q) { function moreTs(tlid, q) {
var sid = $("#timeline_" + tlid + " .ts-marker").last().attr("data-maxid"); var sid = $('#timeline_' + tlid + ' .ts-marker')
moreloading = true; .last()
var start = "https://tootsearch.chotto.moe/api/v1/search?from=" + sid + "&sort=created_at%3Adesc&q=" + q .attr('data-maxid')
$("#notice_" + tlid).text("tootsearch(" + q + ")"); moreloading = true
$("#notice_icon_" + tlid).text("search"); 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, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
}, }
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).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; return response.json()
} })
if (!templete) { .catch(function(error) {
templete = lang.lang_details_nodata; todo(error)
} else { setLog(start, 'JSON', error)
templete = templete + '<div class="hide ts-marker" data-maxid="' + max_id + '"></div>'; console.error(error)
} })
$("#timeline_" + tlid).append(templete); .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(); jQuery('time.timeago').timeago()
}); })
} }
function graphDraw(tag, acct_id) { function graphDraw(tag, acct_id) {
var tags = ""; var tags = ''
var his = tag.history; var his = tag.history
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]); return graphDrawCore(his, tag, acct_id)
var six = 50 - (his[6].uses / max * 50); }
var five = 50 - (his[5].uses / max * 50); function graphDrawCore(his, tag, acct_id) {
var four = 50 - (his[4].uses / max * 50); var max = Math.max.apply(null, [
var three = 50 - (his[3].uses / max * 50); his[0].uses,
var two = 50 - (his[2].uses / max * 50); his[1].uses,
var one = 50 - (his[1].uses / max * 50); his[2].uses,
var zero = 50 - (his[0].uses / max * 50); his[3].uses,
if (max === 0) { his[4].uses,
tags = '<br><br><svg version="1.1" viewbox="0 0 60 50" width="60" height="50">' + his[5].uses,
'</svg><span style="font-size:200%">' + his[0].uses + '</span>toot(s)&nbsp;<a onclick="tl(\'tag\',\'' + escapeHTML(tag.name) + '\',\'' + acct_id + his[6].uses
'\',\'add\')" class="pointer">#' + escapeHTML(tag.name) + '</a>&nbsp;' + his[0].accounts + lang.lang_src_people; ])
} else { var six = 50 - (his[6].uses / max) * 50
tags = '<br><br><svg version="1.1" viewbox="0 0 60 50" width="60" height="50">' + var five = 50 - (his[5].uses / max) * 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>' + var four = 50 - (his[4].uses / max) * 50
'</svg><span style="font-size:200%">' + his[0].uses + '</span>toot&nbsp;<a onclick="tl(\'tag\',\'' + escapeHTML(tag.name) + '\',\'' + acct_id + var three = 50 - (his[3].uses / max) * 50
'\',\'add\')" class="pointer">#' + escapeHTML(tag.name) + '</a>&nbsp;' + his[0].accounts + lang.lang_src_people; var two = 50 - (his[2].uses / max) * 50
} var one = 50 - (his[1].uses / max) * 50
var zero = 50 - (his[0].uses / max) * 50
return tags; return `<div class="tagComp">
<div class="tagCompSvg">
<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} 61,61 0,61"
style="stroke: #0f8c0c;fill: rgba(13,113,19,.25); stroke-width: 1;">
</path>
</g>
</svg>
</div>
<div class="tagCompToot">
<span style="font-size:200%">${his[0].uses}</span>
</div>
<div class="tagCompToots">
toot
</div>
<div class="tagCompTag">
<a onclick="tl('tag','${escapeHTML(
tag.name
)}','${acct_id}','add')" class="pointer" title="${escapeHTML(tag.name)}">
#${escapeHTML(tag.name)}
</a>
</div>
<div class="tagCompUser">
${his[0].accounts}
${lang.lang_src_people}
</div>
</div>`
} }
/* /*
<svg version="1.1" viewbox="0 0 50 300" width="100%" height="50"> <svg version="1.1" viewbox="0 0 50 300" width="100%" height="50">
<path d="M0,0 L10,0 20,10 20,50" fill="#3F51B5"></path> <path d="M0,0 L10,0 20,10 20,50" fill="#3F51B5"></path>
</svg> </svg>
*/ */
function trend(){ function trend() {
console.log("get trend") console.log('get trend')
$("#src-contents").html(""); $('#src-contents').html('')
var acct_id = $("#src-acct-sel").val(); var acct_id = $('#src-acct-sel').val()
if(acct_id=="tootsearch"){ if (acct_id == 'tootsearch') {
return false; return false
} }
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_"+ acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/trends" var start = 'https://' + domain + '/api/v1/trends'
console.log(start) console.log(start)
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
}, }
}).then(function(response) { })
return response.json(); .then(function(response) {
}).catch(function(error) { if (!response.ok) {
//todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function(json) { })
var tags = ""; }
return response.json()
})
.catch(function(error) {
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
var tags = ''
Object.keys(json).forEach(function(keye) { Object.keys(json).forEach(function(keye) {
var tag = json[keye]; var tag = json[keye]
var his=tag.history; var his = tag.history
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]); tags = graphDrawCore(his, tag, acct_id)
var six=50-(his[6].uses/max*50);
var five=50-(his[5].uses/max*50);
var four=50-(his[4].uses/max*50);
var three=50-(his[3].uses/max*50);
var two=50-(his[2].uses/max*50);
var one=50-(his[1].uses/max*50);
var zero=50-(his[0].uses/max*50);
tags = '<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+"<br><br>";
$("#src-contents").append(tags); $('#src-contents').append(tags)
}); })
})
}); }
function srcBox(mode) {
var selectedText = window.getSelection().toString()
if (mode == 'open') {
$('#pageSrc').removeClass('hide')
} else if (mode == 'close') {
if(!selectedText) {
$('#pageSrc').addClass('hide')
$('#pageSrc').removeClass('keep')
}
} else {
$('#pageSrc').toggleClass('hide')
}
if(!$('#pageSrc').hasClass('keep')) {
$('#pageSrcInput').val(selectedText)
}
}
$('#pageSrcInput').click(function() {
$('#pageSrc').addClass('keep')
})
$('#pageSrcInput').on('input', function(evt) {
if(!$('#pageSrcInput').val()) {
$('#pageSrc').removeClass('keep')
}
})
document.addEventListener('selectionchange', function() {
var selectedText = window.getSelection().toString()
if (selectedText && !$('input').is(':focus') && !$('textarea').is(':focus')) {
srcBox('open')
}
})
function doSrc(type) {
$('#pageSrc').addClass('hide')
$('#pageSrc').removeClass('keep')
var q = $('#pageSrcInput').val()
if(type == 'web') {
var start = localStorage.getItem('srcUrl')
if(!start) {
start = 'https://google.com/search?q={q}'
}
start = start.replace(/{q}/, q)
postMessage(["openUrl", start], "*")
} else if(type == 'ts') {
tsAdd(q)
}
} }

View File

@@ -1,153 +1,225 @@
//タグ表示 //タグ表示
if (location.search) { if (location.search) {
var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/); var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/)
var mode = m[1]; var mode = m[1]
var codex = m[2]; var codex = m[2]
if (mode == "tag") { if (mode == 'tag') {
var acct_id = localStorage.getItem("main"); var acct_id = localStorage.getItem('main')
tl('tag', decodeURI(codex), acct_id, 'add'); tl('tag', decodeURI(codex), acct_id, 'add')
} }
} }
//よく使うタグ //よく使うタグ
function tagShow(tag) { function tagShow(tag) {
$("[data-tag=" + decodeURI(tag).toLowerCase() + "]").toggleClass("hide"); console.log('[data-regTag=' + decodeURI(tag).toLowerCase() + ']')
$('[data-regTag=' + decodeURI(tag).toLowerCase() + ']').toggleClass('hide')
} }
//タグ追加 //タグ追加
function tagPin(tag) { function tagPin(tag) {
var tags = localStorage.getItem("tag"); var tags = localStorage.getItem('tag')
if (!tags) { if (!tags) {
var obj = []; var obj = []
} else { } else {
var obj = JSON.parse(tags); var obj = JSON.parse(tags)
} }
var can; var can
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function(key) {
var tagT = obj[key]; var tagT = obj[key]
if (tagT == tag) { if (tagT == tag) {
can = true; can = true
} else { } else {
can = false; can = false
} }
}); })
if (!can) { if (!can) {
obj.push(tag); obj.push(tag)
} }
var json = JSON.stringify(obj); var json = JSON.stringify(obj)
localStorage.setItem("tag", json); localStorage.setItem('tag', json)
favTag(); favTag()
} }
//タグ削除 //タグ削除
function tagRemove(key) { function tagRemove(key) {
var tags = localStorage.getItem("tag"); var tags = localStorage.getItem('tag')
var obj = JSON.parse(tags); var obj = JSON.parse(tags)
obj.splice(key, 1); obj.splice(key, 1)
var json = JSON.stringify(obj); var json = JSON.stringify(obj)
localStorage.setItem("tag", json); localStorage.setItem('tag', json)
favTag(); favTag()
} }
function favTag() { function favTag() {
$("#taglist").html(""); $('#taglist').html('')
var tagarr = localStorage.getItem("tag"); var tagarr = localStorage.getItem('tag')
if (!tagarr) { if (!tagarr) {
var obj = []; var obj = []
} else { } else {
var obj = JSON.parse(tagarr); var obj = JSON.parse(tagarr)
} }
var tags = ""; var tags = ''
var nowPT = localStorage.getItem("stable") var nowPT = localStorage.getItem('stable')
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function(key) {
var tag = obj[key]; var tag = obj[key]
if (nowPT != tag) { if (nowPT != tag) {
console.log("stable tags:" + nowPT + "/" + tag); console.log('stable tags:' + nowPT + '/' + tag)
var ptt = lang.lang_tags_realtime; var ptt = lang.lang_tags_realtime
var nowon = ""; var nowon = ''
} else { } else {
var ptt = lang.lang_tags_unrealtime; var ptt = lang.lang_tags_unrealtime
var nowon = "(" + lang.lang_tags_realtime + ")"; var nowon = '(' + lang.lang_tags_realtime + ')'
} }
tag = escapeHTML(tag); 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> ' + tags =
'<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> '; tags +
}); `<a onclick="tagShow('${tag}')" class="pointer">#${tag}</a>
if (obj.length > 0) { ${nowon}<span class="hide" data-tag="${tag}" data-regTag="${tag.toLowerCase()}"> 
$("#taglist").append("My Tags:" + tags); <a onclick=\"tagTL('tag','${tag}',false,'add')" class="pointer" title="${lang.lang_parse_tagTL.replace('{{tag}}', '#' + tag)}">
} else { TL
$("#taglist").append(""); </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> `
})
if (obj.length > 0) {
$('#taglist').append('My Tags:' + tags)
} else {
$('#taglist').append('')
}
} }
function trendTag() { function trendTag() {
$(".trendtag").remove(); $('.trendtag').remove()
var domain = "imastodon.net" var domain = 'imastodon.net'
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/trend_tags" var start = 'https://' + domain + '/api/v1/trend_tags'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
}, }
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
if (json) { }
var tags = ""; return response.json()
json = json.score; })
Object.keys(json).forEach(function (tag) { .catch(function(error) {
tag = escapeHTML(tag); todo(error)
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> '; setLog(start, 'JSON', error)
}); console.error(error)
$("#taglist").append('<div class="trendtag">アイマストドントレンドタグ<i class="material-icons pointer" onclick="trendTag()" style="font-size:12px">refresh</i>:' + tags + '</div>'); })
trendintervalset() .then(function(json) {
} else { if (json) {
$("#taglist").html(""); 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}" data-regTag="${tag.toLowerCase()}"> 
<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>'
)
trendintervalset()
} else {
$('#taglist').html('')
}
})
} }
function trendintervalset() { function trendintervalset() {
setTimeout(trendTag, 6000000); setTimeout(trendTag, 6000000)
} }
function tagTL(a, b, c, d) { function tagTL(a, b, c, d) {
var acct_id = $("#post-acct-sel").val(); var acct_id = $('#post-acct-sel').val()
tl(a, b, acct_id, d); tl(a, b, acct_id, d)
} }
function autoToot(tag) { function autoToot(tag) {
tag = escapeHTML(tag) tag = escapeHTML(tag)
var nowPT = localStorage.getItem("stable") var nowPT = localStorage.getItem('stable')
if (nowPT == tag) { if (nowPT == tag) {
localStorage.removeItem("stable"); localStorage.removeItem('stable')
M.toast({ html: lang.lang_tags_unrealtime, displayLength: 3000 }) M.toast({ html: lang.lang_tags_unrealtime, displayLength: 3000 })
} else { } else {
localStorage.setItem("stable", tag); localStorage.setItem('stable', tag)
M.toast({ html: lang.lang_tags_tagwarn.replace("{{tag}}", tag).replace("{{tag}}", tag), displayLength: 3000 }) M.toast({
brInsert('#' + tag + " ") html: lang.lang_tags_tagwarn.replace('{{tag}}', tag).replace('{{tag}}', tag),
} displayLength: 3000
favTag(); })
brInsert('#' + tag + ' ')
}
favTag()
} }
//タグをフィーチャー //タグをフィーチャー
function tagFeature(name, acct_id){ function tagFeature(name, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem('domain_' + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/featured_tags" var start = 'https://' + domain + '/api/v1/featured_tags'
fetch(start, { fetch(start, {
method: 'POST', method: 'POST',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
}, },
body: JSON.stringify({ body: JSON.stringify({
name: name name: name
}) })
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
return false; response.text().then(function(text) {
}).then(function (json) { setLog(response.url, response.status, text)
console.log(json) })
M.toast({ html: "Complete: " + escapeHTML(name), displayLength: 3000 }) }
}); return response.json()
} })
.catch(function(error) {
return false
})
.then(function(json) {
console.log(json)
M.toast({ html: 'Complete: ' + escapeHTML(name), displayLength: 3000 })
})
}
//タグのフィルタ
function addTag(id) {
var columns = JSON.parse(localStorage.getItem('column'))
var column = columns[id]
if(!column.data.name) {
var name = column.data
} else {
var name = column.data.name
}
var col = localStorage.getItem('column')
var o = JSON.parse(col)
var obj = o[id]
obj.data = {
'name': name,
'all': $(`#all_tm-${id}`).val(),
'any': $(`#any_tm-${id}`).val(),
'none': $(`#none_tm-${id}`).val(),
}
o[id] = obj
var json = JSON.stringify(o)
console.log(json)
localStorage.setItem('column',json)
columnReload(id, 'tag')
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,259 +1,259 @@
/*イメージビューワー*/ /*イメージビューワー*/
//postのimg.jsとは異なります。 //postのimg.jsとは異なります。
function imgv(id, key, acct_id) { function imgv(id, key, acct_id) {
$("#imgprog").text(0); $('#imgprog').text(0)
$('#imgmodal').hide(); $('#imgsec').text(0)
$('#imgmodal').attr('src', '../../img/loading.svg'); $('#imgmodal').hide()
var murl = $("#" + id + "-image-" + key).attr("data-url"); $('#imgmodal').attr('src', '../../img/loading.svg')
var type = $("#" + id + "-image-" + key).attr("data-type"); var murl = $('#' + id + '-image-' + key).attr('data-url')
$("#imagemodal").attr("data-id", id); var ourl = $('#' + id + '-image-' + key).attr('data-original')
$("#imagemodal").attr("data-acct", acct_id); if (!ourl || ourl == 'null') {
$(document).ready(function () { ourl = murl
if (type == "image") { }
$('#imagemodal').modal('open'); var type = $('#' + id + '-image-' + key).attr('data-type')
xhr = new XMLHttpRequest; $('#imagemodal').attr('data-id', id)
xhr.open('GET', murl, true); $('#imagemodal').attr('data-acct', acct_id)
xhr.addEventListener('progress', function (event) { $('#imagemodal').attr('data-original', ourl)
if (event.lengthComputable) { $('#imagemodal').attr('data-image', murl)
var total = event.total; //表示はリモートを使うか(どちらにしろコピーはオリジナル)
var now = event.loaded; var remote_img = localStorage.getItem('remote_img')
var per = now / total * 100; if (remote_img == 'yes') {
$("#imgprog").text(Math.floor(per)); murl = ourl
} }
}, false); $(document).ready(function() {
xhr.addEventListener('loadend', function (event) { if (type == 'image') {
var total = event.total; $('#imagemodal').modal('open')
var now = event.loaded; imageXhr(id, key, murl)
var per = now / total * 100; $('#imagewrap').dragScroll() // ドラッグスクロール設定
$("#imgprog").text(Math.floor(per)); $('#imgmodal').show()
}, false); $('#imagemodal').attr('data-key', key)
xhr.send(); $('#imagemodal').attr('data-id', id)
$('#imgmodal').attr('src', murl); } else if (type == 'video' || type == 'gifv') {
$('#imagewrap').dragScroll(); // ドラッグスクロール設定 $('#video').attr('src', murl)
$('#imgmodal').show(); $('#videomodal').modal('open')
$('#imagemodal').attr('data-key', key); $('#imgmodal').show()
$('#imagemodal').attr('data-id', id);
} else if (type == "video" || type == "gifv") {
$('#video').attr('src', murl);
$('#videomodal').modal('open');
$('#imgmodal').show();
} }
var element = new Image(); })
var width;
element.onload = function () {
var width = element.naturalWidth;
var height = element.naturalHeight;
var windowH = $(window).height();
var windowW = $(window).width();
$("#imagemodal").css("bottom", "0")
$("#imagemodal img").css("width", "auto")
if (height < windowH) {
$("#imagemodal").css("height", height + 60 + "px")
$("#imagemodal img").css("height", "100%")
if (width > windowW * 0.8) {
$("#imagemodal").css("width", "80vw")
$("#imagemodal img").css("width", "100%")
var heightS = windowW * 0.8 / width * height;
$("#imagemodal").css("height", heightS + 60 + "px")
} else {
$("#imagemodal").css("width", width + "px")
}
} else {
$("#imagemodal img").css("width", "auto")
var widthS = windowH / height * width;
if (widthS < windowW) {
$("#imagemodal").css("width", widthS + "px")
} else {
$("#imagemodal").css("width", "100vw")
}
$("#imagemodal").css("height", "100vh")
$("#imagemodal img").css("height", "calc(100vh - 60px)")
}
}
if ($("#" + id + "-image-" + (key * 1 + 1)).length == 0) {
$("#image-next").prop("disabled", true);
} else {
$("#image-next").prop("disabled", false);
}
if ($("#" + id + "-image-" + (key * 1 - 1)).length == 0) {
$("#image-prev").prop("disabled", true);
} else {
$("#image-prev").prop("disabled", false);
}
element.src = murl;
});
} }
//イメージビューワーの送り //イメージビューワーの送り
function imgCont(type) { function imgCont(type) {
$("#imgprog").text(0); var key = $('#imagemodal').attr('data-key')
var key = $('#imagemodal').attr('data-key'); var id = $('#imagemodal').attr('data-id')
var id = $('#imagemodal').attr('data-id'); if (type == 'next') {
if (type == "next") { key++
key++; } else if (type == 'prev') {
} else if (type == "prev") { key = key * 1 - 1
key = key * 1 - 1; }
var murl = $('#' + id + '-image-' + key).attr('data-url')
var ourl = $('#' + id + '-image-' + key).attr('data-original')
var type = $('#' + id + '-image-' + key).attr('data-type')
$('#imagemodal').attr('data-id', id)
$('#imagemodal').attr('data-acct', acct_id)
$('#imagemodal').attr('data-original', ourl)
$('#imagemodal').attr('data-image', murl)
//表示はリモートを使うか(どちらにしろコピーはオリジナル)
var remote_img = localStorage.getItem('remote_img')
if (remote_img == 'yes' && ourl != 'null') {
murl = ourl
} }
var murl = $("#" + id + "-image-" + key).attr("data-url");
if (murl) { if (murl) {
$('#imgmodal').attr('src', '../../img/loading.svg'); $('#imgprog').text(0)
var type = $("#" + id + "-image-" + key).attr("data-type"); $('#imgsec').text(0)
$(document).ready(function () { $('#imgmodal').attr('src', '../../img/loading.svg')
if (type == "image") { var type = $('#' + id + '-image-' + key).attr('data-type')
xhr = new XMLHttpRequest; $(document).ready(function() {
xhr.open('GET', murl, true); if (type == 'image') {
xhr.responseType = "arraybuffer"; imageXhr(id, key, murl)
xhr.addEventListener('progress', function (event) { $('#imagewrap').dragScroll() // ドラッグスクロール設定
if (event.lengthComputable) { $('#imagemodal').attr('data-key', key)
var total = event.total; $('#imagemodal').attr('data-id', id)
var now = event.loaded; } else if (type == 'video' || type == 'gifv') {
var per = now / total * 100; $('#video').attr('src', murl)
$("#imgprog").text(Math.floor(per)); $('#videomodal').modal('open')
}
}, false);
xhr.addEventListener('loadend', function (event) {
var total = event.total;
var now = event.loaded;
var per = now / total * 100;
$("#imgprog").text(Math.floor(per));
}, false);
xhr.send();
$('#imgmodal').attr('src', murl);
$('#imagewrap').dragScroll(); // ドラッグスクロール設定
$('#imagemodal').attr('data-key', key);
$('#imagemodal').attr('data-id', id);
} else if (type == "video" || type == "gifv") {
$('#video').attr('src', murl);
$('#videomodal').modal('open');
} }
var element = new Image(); })
var width;
element.onload = function () {
var width = element.naturalWidth;
var height = element.naturalHeight;
var windowH = $(window).height();
var windowW = $(window).width();
$("#imagemodal").css("bottom", "0")
$("#imagemodal img").css("width", "auto")
if (height < windowH) {
$("#imagemodal").css("height", height + 60 + "px")
$("#imagemodal img").css("height", "100%")
if (width > windowW * 0.8) {
$("#imagemodal").css("width", "80vw")
$("#imagemodal img").css("width", "100%")
var heightS = windowW * 0.8 / width * height;
$("#imagemodal").css("height", heightS + 60 + "px")
} else {
$("#imagemodal").css("width", width + "px")
}
} else {
$("#imagemodal img").css("width", "auto")
var widthS = windowH / height * width;
if (widthS < windowW) {
$("#imagemodal").css("width", widthS + "px")
} else {
$("#imagemodal").css("width", "100vw")
}
$("#imagemodal").css("height", "100vh")
$("#imagemodal img").css("height", "calc(100vh - 60px)")
}
}
if ($("#" + id + "-image-" + (key * 1 + 1)).length === 0) {
$("#image-next").prop("disabled", true);
} else {
$("#image-next").prop("disabled", false);
}
if ($("#" + id + "-image-" + (key * 1 - 1)).length === 0) {
$("#image-prev").prop("disabled", true);
} else {
$("#image-prev").prop("disabled", false);
}
element.src = murl;
});
} }
} }
function imageXhr(id, key, murl) {
var startTime = new Date()
xhr = new XMLHttpRequest()
xhr.open('GET', murl, true)
xhr.responseType = 'arraybuffer'
xhr.addEventListener(
'progress',
function(event) {
if (event.lengthComputable) {
var total = event.total
var now = event.loaded
var per = (now / total) * 100
$('#imgprog').text(Math.floor(per))
}
},
false
)
xhr.addEventListener(
'loadend',
function(event) {
var total = event.total
$('#imgbyte').text(Math.floor(total / 1024))
var now = event.loaded
var per = (now / total) * 100
$('#imgprog').text(Math.floor(per))
},
false
)
xhr.addEventListener(
'error',
function(event) {
$('#imgmodal').attr('src', murl)
},
false
)
xhr.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
r = new FileReader()
r.readAsDataURL(this.response)
r.onload = function() {
var b64 = r.result
var element = new Image()
var width
element.onload = function() {
var width = element.naturalWidth
if(width < 650) {
width = 650
}
var height = element.naturalHeight
var windowH = $(window).height()
var windowW = $(window).width()
$('#imagemodal').css('bottom', '0')
$('#imagemodal img').css('width', 'auto')
if (height < windowH) {
$('#imagemodal').css('height', height + 100 + 'px')
$('#imagemodal img').css('height', height + 'px')
if (width > windowW * 0.8) {
$('#imagemodal').css('width', '80vw')
$('#imagemodal img').css('width', 'auto')
var heightS = ((windowW * 0.8) / width) * height
$('#imagemodal').css('height', heightS + 100 + 'px')
} else {
$('#imagemodal').css('width', width + 'px')
}
} else {
$('#imagemodal img').css('width', 'auto')
var widthS = (windowH / height) * width
if (widthS < windowW) {
$('#imagemodal').css('width', widthS + 'px')
} else {
$('#imagemodal').css('width', '100vw')
}
$('#imagemodal').css('height', '100vh')
$('#imagemodal img').css('height', 'calc(100vh - 60px)')
}
}
if ($('#' + id + '-image-' + (key * 1 + 1)).length == 0) {
$('#image-next').prop('disabled', true)
} else {
$('#image-next').prop('disabled', false)
}
if ($('#' + id + '-image-' + (key * 1 - 1)).length == 0) {
$('#image-prev').prop('disabled', true)
} else {
$('#image-prev').prop('disabled', false)
}
element.src = b64
var endTime = new Date()
var proctime = endTime.getTime() - startTime.getTime()
$('#imgsec').text(proctime)
$('#imgmodal').attr('src', b64)
}
}
}
xhr.responseType = 'blob'
xhr.send()
}
//ズームボタン(z:倍率) //ズームボタン(z:倍率)
function zoom(z) { function zoom(z) {
var wdth = $('#imagewrap img').width(); var wdth = $('#imagewrap img').width()
var wdth = wdth * z; var wdth = wdth * z
$('#imagewrap img').css("width", wdth + "px"); $('#imagewrap img').css('width', wdth + 'px')
var hgt = $('#imagewrap img').height(); var hgt = $('#imagewrap img').height()
var hgt = hgt * z; var hgt = hgt * z
$('#imagewrap img').css("height", hgt + "px"); $('#imagewrap img').css('height', hgt + 'px')
} }
//スマホ対応ドラッグ移動システム //スマホ対応ドラッグ移動システム
(function () { (function() {
$.fn.dragScroll = function () { $.fn.dragScroll = function() {
var target = this; var target = this
$(this).mousedown(function (event) { $(this)
$(this) .mousedown(function(event) {
.data('down', true) $(this)
.data('x', event.clientX) .data('down', true)
.data('y', event.clientY) .data('x', event.clientX)
.data('scrollLeft', this.scrollLeft) .data('y', event.clientY)
.data('scrollTop', this.scrollTop); .data('scrollLeft', this.scrollLeft)
return false; .data('scrollTop', this.scrollTop)
}).css({ return false
'overflow': 'hidden', // スクロールバー非表示 })
'cursor': 'move' .css({
}); overflow: 'hidden', // スクロールバー非表示
cursor: 'move'
})
// ウィンドウから外れてもイベント実行 // ウィンドウから外れてもイベント実行
$(document).mousemove(function (event) { $(document)
if ($(target).data('down') == true) { .mousemove(function(event) {
// スクロール if ($(target).data('down') == true) {
target.scrollLeft($(target).data('scrollLeft') + $(target).data('x') - // スクロール
event.clientX); target.scrollLeft($(target).data('scrollLeft') + $(target).data('x') - event.clientX)
target.scrollTop($(target).data('scrollTop') + $(target).data('y') - target.scrollTop($(target).data('scrollTop') + $(target).data('y') - event.clientY)
event.clientY); return false // 文字列選択を抑止
return false; // 文字列選択を抑止 }
} })
}).mouseup(function (event) { .mouseup(function(event) {
$(target).data('down', false); $(target).data('down', false)
}); })
$(this).on('touchstart', function (event) { $(this)
$(this) .on('touchstart', function(event) {
.data('down', true) $(this)
.data('x', getX(event)) .data('down', true)
.data('y', getY(event)) .data('x', getX(event))
.data('scrollLeft', this.scrollLeft) .data('y', getY(event))
.data('scrollTop', this.scrollTop); .data('scrollLeft', this.scrollLeft)
return false; .data('scrollTop', this.scrollTop)
}).css({ return false
'overflow': 'hidden', // スクロールバー非表示 })
'cursor': 'move' .css({
}); //指が触れたか検知 overflow: 'hidden', // スクロールバー非表示
$(this).on('touchmove', function (event) { cursor: 'move'
}) //指が触れたか検知
$(this).on('touchmove', function(event) {
if ($(target).data('down') === true) { if ($(target).data('down') === true) {
// スクロール // スクロール
target.scrollLeft($(target).data('scrollLeft') + $(target).data('x') - target.scrollLeft($(target).data('scrollLeft') + $(target).data('x') - getX(event))
getX(event)); target.scrollTop($(target).data('scrollTop') + $(target).data('y') - getY(event))
target.scrollTop($(target).data('scrollTop') + $(target).data('y') - return false // 文字列選択を抑止
getY(event)); } else {
return false; // 文字列選択を抑止 }
} else { } }) //指が動いたか検知
}); //指が動いたか検知 $(this).on('touchend', function(event) {
$(this).on('touchend', function (event) { $(target).data('down', false)
$(target).data('down', false); })
});
return this; return this
} }
})(jQuery); })(jQuery)
function getX(event) { function getX(event) {
return event.originalEvent.touches[0].pageX; return event.originalEvent.touches[0].pageX
} }
function getY(event) { function getY(event) {
return event.originalEvent.touches[0].pageY; return event.originalEvent.touches[0].pageY
} }
//マウスホイールで拡大 //マウスホイールで拡大
var element = document.getElementById("imagemodal"); var element = document.getElementById('imagemodal')
element.onmousewheel = function (e) { element.onmousewheel = function(e) {
var delta = e.wheelDelta; var delta = e.wheelDelta
if (delta > 0) { if (delta > 0) {
zoom(1.1) zoom(1.1)
} else { } else {
@@ -263,22 +263,33 @@ element.onmousewheel = function (e) {
//当該トゥート //当該トゥート
function detFromImg() { function detFromImg() {
var id = $("#imagemodal").attr("data-id"); var id = $('#imagemodal').attr('data-id')
var acct_id = $("#imagemodal").attr("data-acct"); var acct_id = $('#imagemodal').attr('data-acct')
$('#imagemodal').modal('close'); $('#imagemodal').modal('close')
details(id, acct_id); details(id, acct_id)
} }
//画像保存 //画像保存
function dlImg() { function dlImg() {
var url = $("#imgmodal").attr("src"); var ourl = $('#imagemodal').attr('data-original')
if (localStorage.getItem("savefolder")) { var murl = $('#imagemodal').attr('data-image')
var save = localStorage.getItem("savefolder"); var remote_img = localStorage.getItem('remote_img')
} else { if (remote_img == 'yes') {
var save = ""; murl = ourl
} }
postMessage(["generalDL", [url, save, false]], "*") var save = localStorage.getItem('savefolder')
if (!save || save == 'null') {
var save = ''
}
postMessage(['generalDL', [murl, save, false]], '*')
} }
function openFinder(dir) { function openFinder(dir) {
postMessage(["openFinder", dir], "*") postMessage(['openFinder', dir], '*')
} }
function stopVideo() {
document.getElementById('video').pause()
}
function copyImgUrl() {
var murl = $('#imagemodal').attr('data-original')
execCopy(murl)
M.toast({ html: lang.lang_img_copyDone, displayLength: 1500 })
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +1,24 @@
function menu() { function menu() {
localStorage.setItem("menu-done", true); localStorage.setItem("menu-done", true)
$("#fukidashi").addClass("hide") $("#fukidashi").addClass("hide")
if (!$("#menu").hasClass("appear")) { if (!$("#menu").hasClass("appear")) {
$("#menu").addClass("appear") $("#menu").addClass("appear")
var left = localStorage.getItem("menu-left"); var left = localStorage.getItem("menu-left")
if (left > $('body').width() - $('#menu').width()) { if (left > $('body').width() - $('#menu').width()) {
left = $('body').width() - $('#menu').width(); left = $('body').width() - $('#menu').width()
} else if (left < 0) { } else if (left < 0) {
left = 0; left = 0
} }
var top = localStorage.getItem("menu-top"); var top = localStorage.getItem("menu-top")
if (top > $('body').height() - $('#menu').height()) { if (top > $('body').height() - $('#menu').height()) {
top = $('body').height() - $('#menu').height(); top = $('body').height() - $('#menu').height()
} else if (top < 0) { } else if (top < 0) {
top = 0; top = 0
} }
$('#menu').css("left", left + "px") $('#menu').css("left", left + "px")
$('#menu').css("top", top + "px") $('#menu').css("top", top + "px")
var height = localStorage.getItem("menu-height"); var height = localStorage.getItem("menu-height")
var width = localStorage.getItem("menu-width"); var width = localStorage.getItem("menu-width")
if(height){ if(height){
$('#menu').css("height", height + "px") $('#menu').css("height", height + "px")
}else{ }else{
@@ -27,12 +27,13 @@ function menu() {
if(width){ if(width){
$('#menu').css("width", width + "px") $('#menu').css("width", width + "px")
} }
$('#menu').fadeIn(); $('#menu').fadeIn()
$("#menu-bar").html("TheDesk " + localStorage.getItem("ver")); $("#menu-bar").html("TheDesk " + localStorage.getItem("ver"))
$(".menu-content").addClass("hide"); $(".menu-content").addClass("hide")
$("#add-box").removeClass("hide"); $("#add-box").removeClass("hide")
$("#left-menu div").removeClass("active"); $("#left-menu div").removeClass("active")
$("#addColumnMenu").addClass("active"); $("#addColumnMenu").addClass("active")
$("#addColumnMenu").click()
} else { } else {
$('#menu').fadeOut() $('#menu').fadeOut()
$("#menu").removeClass("appear") $("#menu").removeClass("appear")
@@ -43,31 +44,35 @@ $(function () {
$("#menu").draggable({ $("#menu").draggable({
handle: "#menu-bar", handle: "#menu-bar",
stop: function () { stop: function () {
var left = $('#menu').offset().left; var left = $('#menu').offset().left
if (left > $('body').width() - $('#menu').width()) { if (left > $('body').width() - $('#menu').width()) {
left = $('body').width() - $('#menu').width(); left = $('body').width() - $('#menu').width()
} else if (left < 0) { } else if (left < 0) {
left = 0; left = 0
} }
var top = $('#menu').offset().top; var top = $('#menu').offset().top
if (top > $('body').height() - $('#menu').height()) { if (top > $('body').height() - $('#menu').height()) {
top = $('body').height() - $('#menu').height(); top = $('body').height() - $('#menu').height()
} else if (top < 0) { } else if (top < 0) {
top = 0; top = 0
} }
localStorage.setItem("menu-left", left); localStorage.setItem("menu-left", left)
localStorage.setItem("menu-top", top); localStorage.setItem("menu-top", top)
} }
}); })
$("#menu").resizable({ $("#menu").resizable({
minHeight: 150, minHeight: 150,
minWidth: 200, minWidth: 200,
stop: function (event, ui) { stop: function (event, ui) {
localStorage.setItem("menu-height", ui.size.height); localStorage.setItem("menu-height", ui.size.height)
localStorage.setItem("menu-width", ui.size.width); localStorage.setItem("menu-width", ui.size.width)
} }
}); })
}); })
function help() { function help() {
postMessage(["openUrl", "https://docs.thedesk.top"], "*") $("#left-menu a").removeClass("active")
$("#helpMenu").addClass("active")
$(".menu-content").addClass("hide")
$("#help-box").removeClass("hide")
postMessage(["sendSinmpleIpc", "getLogs"], "*")
} }

View File

@@ -1,32 +1,32 @@
function pip(id) { function pip(id) {
$("#pip-content").html($("[toot-id=" + id + "] .additional").html()); $("#pip-content").html($("[toot-id=" + id + "] .additional").html())
$("#pip").removeClass("hide"); $("#pip").removeClass("hide")
} }
function endPip() { function endPip() {
$("#pip-content").html(""); $("#pip-content").html("")
$("#pip").addClass("hide"); $("#pip").addClass("hide")
} }
function pipHoriz() { function pipHoriz() {
if ($("#pip").hasClass("pip-left")) { if ($("#pip").hasClass("pip-left")) {
$("#pip").removeClass("pip-left"); $("#pip").removeClass("pip-left")
$(".pip-horiz").text("chevron_left"); $(".pip-horiz").text("chevron_left")
$("#pip").addClass("pip-right"); $("#pip").addClass("pip-right")
} else { } else {
$("#pip").addClass("pip-left"); $("#pip").addClass("pip-left")
$("#pip").removeClass("pip-right"); $("#pip").removeClass("pip-right")
$(".pip-horiz").text("chevron_right"); $(".pip-horiz").text("chevron_right")
} }
} }
function pipVert() { function pipVert() {
if ($("#pip").hasClass("pip-top")) { if ($("#pip").hasClass("pip-top")) {
$("#pip").removeClass("pip-top"); $("#pip").removeClass("pip-top")
$("#pip").addClass("pip-bottom"); $("#pip").addClass("pip-bottom")
$(".pip-vert").text("expand_less"); $(".pip-vert").text("expand_less")
} else { } else {
$("#pip").addClass("pip-top"); $("#pip").addClass("pip-top")
$("#pip").removeClass("pip-bottom"); $("#pip").removeClass("pip-bottom")
$(".pip-vert").text("expand_more"); $(".pip-vert").text("expand_more")
} }
} }

View File

@@ -1,134 +1,139 @@
/*ささやきボックス(Cr民並感)*/ /*ささやきボックス(Cr民並感)*/
//✕隠す //✕隠す
function hide() { function hide() {
$("#right-side").hide() $('#right-side').hide()
$("#right-side").css("width", "300px") $('#right-side').css('width', '300px')
$("#left-side").css("width", "100%") $('#left-side').css('width', '100%')
var width = localStorage.getItem("postbox-width"); var width = localStorage.getItem('postbox-width')
if(width){ if (width) {
width = width.replace("px", "") * 1 width = width.replace('px', '') * 1
} else { } else {
width = 300 width = 300
} }
$("#post-box").css("width", width) $('#post-box').css('width', width)
$('#post-box').fadeOut() $('#post-box').fadeOut()
$("#post-box").removeClass("appear") $('#post-box').removeClass('appear')
$("#emoji").addClass("hide") $('#emoji').addClass('hide')
$("#left-side").show(); $('#left-side').show()
$("#default-emoji").show(); $('#default-emoji').show()
$("#unreact").show(); $('#unreact').show()
$("#addreact").addClass("hide"); $('#addreact').addClass('hide')
} }
//最小化 //最小化
function mini() { function mini() {
$("body").toggleClass("mini-post"); $('body').toggleClass('mini-post')
if ($("body").hasClass("mini-post")) { if ($('body').hasClass('mini-post')) {
$(".mini-btn").text("expand_less"); $('.mini-btn').text('expand_less')
} else { } else {
$(".mini-btn").text("expand_more"); $('.mini-btn').text('expand_more')
} }
} }
//最小化時に展開 //最小化時に展開
function show() { function show() {
$("#post-box").addClass("appear") $('#post-box').addClass('appear')
$("#textarea").focus(); $('#textarea').focus()
console.log("show" + localStorage.getItem("postbox-left")); console.log('show' + localStorage.getItem('postbox-left'))
var left = localStorage.getItem("postbox-left"); var left = localStorage.getItem('postbox-left')
if (left > $('body').width() - $('#post-box').width()) { if (left > $('body').width() - $('#post-box').width()) {
left = $('body').width() - $('#post-box').width(); left = $('body').width() - $('#post-box').width()
} else if (left < 0) { } else if (left < 0) {
left = 0; left = 0
} }
var top = localStorage.getItem("postbox-top"); var top = localStorage.getItem('postbox-top')
if (top > $('body').height() - $('#post-box').height()) { if (top > $('body').height() - $('#post-box').height()) {
top = $('body').height() - $('#post-box').height(); top = $('body').height() - $('#post-box').height()
} else if (top < 0) { } else if (top < 0) {
top = 0; top = 0
} }
$('#post-box').css("left", left + "px") $('#post-box').css('left', left + 'px')
$('#post-box').css("top", top + "px") $('#post-box').css('top', top + 'px')
var width = localStorage.getItem("postbox-width"); var width = localStorage.getItem('postbox-width')
if (width) { if (width) {
$('#post-box').css("width", width + "px") $('#post-box').css('width', width + 'px')
} else { } else {
$('#post-box').css("width", "300px") $('#post-box').css('width', '300px')
} }
$('#post-box').fadeIn(); $('#post-box').fadeIn()
$('#textarea').characterCounter(); $('#textarea').characterCounter()
mdCheck()
} }
$(function () { $(function () {
$("#post-box").draggable({ $('#post-box').draggable({
handle: "#post-bar", handle: '#post-bar',
stop: function () { stop: function () {
var left = $('#post-box').offset().left; var left = $('#post-box').offset().left
if (left > $('body').width() - $('#post-box').width()) { if (left > $('body').width() - $('#post-box').width()) {
left = $('body').width() - $('#post-box').width(); left = $('body').width() - $('#post-box').width()
} else if (left < 0) { } else if (left < 0) {
left = 0; left = 0
} }
var top = $('#post-box').offset().top; var top = $('#post-box').offset().top
if (top > $('body').height() - $('#post-box').height()) { if (top > $('body').height() - $('#post-box').height()) {
top = $('body').height() - $('#post-box').height(); top = $('body').height() - $('#post-box').height()
} else if (top < 0) { } else if (top < 0) {
top = 0; top = 0
} }
localStorage.setItem("postbox-left", left); localStorage.setItem('postbox-left', left)
localStorage.setItem("postbox-top", top); localStorage.setItem('postbox-top', top)
} },
}); })
$("#post-box").resizable({ $('#post-box').resizable({
minHeight: 150, minHeight: 150,
minWidth: 100, minWidth: 100,
stop: function (event, ui) { stop: function (event, ui) {
$("#textarea").blur() $('#textarea').blur()
localStorage.setItem("postbox-width", ui.size.width); localStorage.setItem('postbox-width', ui.size.width)
} },
}); })
}); })
//コード受信 //コード受信
if (location.search) { if (location.search) {
var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/); var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/)
var mode = m[1]; var mode = m[1]
var codex = m[2]; var codex = m[2]
if (mode == "share") { if (mode == 'share') {
$('textarea').focus(); $('textarea').focus()
$("#textarea").val(decodeURI(codex)); $('#textarea').val(decodeURI(codex))
show(); show()
$("body").removeClass("mini-post"); $('body').removeClass('mini-post')
$(".mini-btn").text("expand_less"); $('.mini-btn').text('expand_less')
} }
} }
$('#posttgl').click(function (e) { window.onload = initPostbox
if (!$('#post-box').hasClass("appear")) { function initPostbox() {
show(); $('#posttgl').click(function (e) {
} else { if (!$('#post-box').hasClass('appear')) {
hide(); show()
} } else {
$('.cvo').removeClass("selectedToot") hide()
selectedColumn = 0
selectedToot = 0
});
$("#timeline-container,#group").click(function (e) {
if (localStorage.getItem("box") != "absolute") {
if ($('#post-box').hasClass("appear") && !localStorage.getItem("nohide")) {
hide();
} }
} $('.cvo').removeClass('selectedToot')
$('.cvo').removeClass("selectedToot") selectedColumn = 0
selectedColumn = 0 selectedToot = 0
selectedToot = 0 })
localStorage.removeItem("nohide")
}); $('#timeline-container,#group').click(function (e) {
$('#textarea,#cw-text').focusout(function (e) { if (localStorage.getItem('box') != 'absolute') {
localStorage.setItem("nohide", true) if ($('#post-box').hasClass('appear') && !localStorage.getItem('nohide')) {
var countup = function () { hide()
localStorage.removeItem("nohide") }
} }
//setTimeout(remove, 100); $('.cvo').removeClass('selectedToot')
$('.cvo').removeClass("selectedToot") selectedColumn = 0
selectedColumn = 0 selectedToot = 0
selectedToot = 0 localStorage.removeItem('nohide')
}); srcBox('close')
})
$('#textarea,#cw-text').focusout(function (e) {
localStorage.setItem('nohide', true)
var countup = function () {
localStorage.removeItem('nohide')
}
//setTimeout(remove, 100);
$('.cvo').removeClass('selectedToot')
selectedColumn = 0
selectedToot = 0
})
}

View File

@@ -1,38 +1,38 @@
var r = document.getElementById("radio"); var r = document.getElementById("radio")
function Rtoggle() { function Rtoggle() {
if ($("#radio").hasClass("play")) { if ($("#radio").hasClass("play")) {
Rstop(); Rstop()
} else { } else {
$("#radio-view").toggleClass("hide"); $("#radio-view").toggleClass("hide")
$("#radio-view").toggleClass("show"); $("#radio-view").toggleClass("show")
$("#radio-input").addClass("hide"); $("#radio-input").addClass("hide")
} }
} }
function Rplay(url, name) { function Rplay(url, name) {
$("#radio").attr('src', url); $("#radio").attr('src', url)
r.load(); r.load()
r.play(); r.play()
$("#radio").addClass("play"); $("#radio").addClass("play")
$("#radio-btn").addClass("teal-text"); $("#radio-btn").addClass("teal-text")
$("#radio-sta").html("<br>Now Playing:" + name); $("#radio-sta").html("<br>Now Playing:" + name)
} }
function Rstop() { function Rstop() {
$("#radio").attr("src", ""); $("#radio").attr("src", "")
r.pause(); r.pause()
$("#radio").removeClass("play"); $("#radio").removeClass("play")
$("#radio-btn").removeClass("teal-text"); $("#radio-btn").removeClass("teal-text")
$("#radio-sta").html(""); $("#radio-sta").html("")
} }
function Ryourself() { function Ryourself() {
$("#radio-input").removeClass("hide"); $("#radio-input").removeClass("hide")
$("#radio-view").addClass("hide"); $("#radio-view").addClass("hide")
} }
function Rselect() { function Rselect() {
$("#radio-input").addClass("hide"); $("#radio-input").addClass("hide")
$("#radio-view").removeClass("hide"); $("#radio-view").removeClass("hide")
} }
function Rinput() { function Rinput() {
var url = $("#radio-url").val(); var url = $("#radio-url").val()
Rplay(url, url) Rplay(url, url)
} }
/* /*

View File

@@ -1,62 +1,70 @@
//スクロールで続きを読む //スクロールで続きを読む
function scrollevent() { function scrollevent() {
$(".tl-box").scroll(function () { $('.tl-box').scroll(function() {
scrollck(); scrollck()
}); })
} }
scrollevent(); scrollevent()
function scrollck() { function scrollck() {
$(".tl-box").each(function (i, elem) { $('.tl-box').each(function(i, elem) {
var tlid = $(this).attr('tlid'); var tlid = $(this).attr('tlid')
var len = $('#timeline_' + tlid + ' .cvo').length
//一番上ならためていた新しいトゥートを表示ないしtealなら未読管理モード //一番上ならためていた新しいトゥートを表示ないしtealなら未読管理モード
if ($(this).scrollTop() === 0) { if ($(this).scrollTop() === 0) {
if (!$("#unread_" + tlid + " .material-icons").hasClass("teal-text")) { if (!$('#unread_' + tlid + ' .material-icons').hasClass('teal-text')) {
var pool = localStorage.getItem("pool_" + tlid); var pool = localStorage.getItem('pool_' + tlid)
if (pool) { if (pool) {
$("#timeline_" + tlid).prepend(pool); $('#timeline_' + tlid).prepend(pool)
jQuery("time.timeago").timeago(); jQuery('time.timeago').timeago()
localStorage.removeItem("pool_" + tlid); localStorage.removeItem('pool_' + tlid)
} }
} else { } else {
ueload(tlid) ueload(tlid)
} }
//自動リフレッシュ //自動リフレッシュ
if ($("#timeline_" + tlid + " .cvo").length > 30) { if (len > 30) {
for (var i = 30; i < $("#timeline_" + tlid + " .cvo").length; i++) { for (var i = 30; i < $('#timeline_' + tlid + ' .cvo').length; i++) {
$("#timeline_" + tlid + " .cvo").eq(i).remove(); $('#timeline_' + tlid + ' .cvo')
.eq(i)
.remove()
} }
} }
} }
//続きを読むトリガー //続きを読むトリガー
var scrt = $(this).find(".tl").height() - $(window).height(); var scrt =
var scr = $(this).scrollTop(); $(this)
if (scr > scrt) { .find('.tl')
console.log("kicked more loading:" + tlid); .height() - $(window).height()
moreload('', tlid); var scr = $(this).scrollTop()
if (scr > scrt && scrt > 0) {
console.log('kicked more loading:' + tlid)
moreload('', tlid)
} }
}); })
} }
function goTop(id) { function goTop(id) {
if ($("#unread_" + id + " .material-icons").hasClass("teal-text")) { if ($('#unread_' + id + ' .material-icons').hasClass('teal-text')) {
$("#unread_" + id + " .material-icons").removeClass("teal-text") $('#unread_' + id + ' .material-icons').removeClass('teal-text')
var multi = localStorage.getItem("column") var multi = localStorage.getItem('column')
var obj = JSON.parse(multi) var obj = JSON.parse(multi)
var acct_id = obj[id * 1].domain var acct_id = obj[id * 1].domain
var type = obj[id * 1].type var type = obj[id * 1].type
console.log(id, type) console.log(id, type)
columnReload(id, type) columnReload(id, type)
} }
if ($("#timeline_box_" + id + "_box .tl-box").scrollTop() > 500) { if ($('#timeline_box_' + id + '_box .tl-box').scrollTop() > 500) {
$("#timeline_box_" + id + "_box .tl-box").scrollTop(500) $('#timeline_box_' + id + '_box .tl-box').scrollTop(500)
} }
$("#timeline_box_" + id + "_box .tl-box").animate({ scrollTop: 0 }); $('#timeline_box_' + id + '_box .tl-box').animate({ scrollTop: 0 })
} }
function goColumn(key) { function goColumn(key) {
$("#sort-box").addClass("hide"); $('#sort-box').addClass('hide')
$("#sort-box").removeClass("show"); $('#sort-box').removeClass('show')
if ($('[tlid=' + key + ']').length) { if ($('[tlid=' + key + ']').length) {
$("#timeline-container").animate({ scrollLeft: $("#timeline-container").scrollLeft() + $('[tlid=' + key + ']').offset().left }); $('#timeline-container').animate({
scrollLeft: $('#timeline-container').scrollLeft() + $('[tlid=' + key + ']').offset().left
})
} }
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,44 +1,44 @@
//ソートデータ読み込み //ソートデータ読み込み
function sortLoad () { function sortLoad () {
$("#sort").html(""); $("#sort").html("")
var col = localStorage.getItem("column"); var col = localStorage.getItem("column")
if (col) { if (col) {
var obj = JSON.parse(col); var obj = JSON.parse(col)
} }
Object.keys(obj).forEach(function (key) { Object.keys(obj).forEach(function (key) {
var acct = obj[key]; var acct = obj[key]
var flag = "false"; var flag = "false"
if (localStorage.getItem("card_" + key) == "true") { if (localStorage.getItem("card_" + key) == "true") {
flag = "true" flag = "true"
} }
var insert = ""; var insert = ""
if (acct.background) { if (acct.background) {
if (acct.text == "def") { if (acct.text == "def") {
} else { } else {
if (acct.text == "black") { if (acct.text == "black") {
var txhex = "000000"; var txhex = "000000"
} else if (acct.text == "white") { } else if (acct.text == "white") {
var txhex = "ffffff"; var txhex = "ffffff"
} }
insert = ' style="background-color:#' + acct.background + '; color: #' + txhex + '" '; insert = ' style="background-color:#' + acct.background + '; color: #' + txhex + '" '
} }
} }
var user = localStorage.getItem("user_" + acct.domain); var user = localStorage.getItem("user_" + acct.domain)
var domain = localStorage.getItem("domain_" + acct.domain); var domain = localStorage.getItem("domain_" + acct.domain)
if (!user || !domain) { if (!user || !domain) {
var acctdata = ""; var acctdata = ""
} else { } else {
var acctdata = user + "@" + domain; var acctdata = user + "@" + domain
} }
var html = '<li class="drag-content" data-id="' + key + '" data-flag="' + flag + '"' + insert + '><div class="sorticon"><i class="material-icons">' + icon(acct.type) + '</i></div><div class="sorttitle">' + cap(acct.type, escapeHTML(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, acct.data, acct.domain) + '</div><div class="sortaction"><a onclick="goColumn(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="' + lang.lang_sort_gothis + '">forward</i></a> <a onclick="removeColumn(' + key + ')" class="setting nex"><i class="material-icons waves-effect nex" title="' + lang.lang_sort_gothis + '">forward</i></a> <a onclick="removeColumn(' + key +
')" class="setting nex"><i class="material-icons waves-effect nex" title="このカラムを削除">cancel</i></a></div><div class="sortacct">' + acctdata + '</div></li>'; ')" class="setting nex"><i class="material-icons waves-effect nex" title="このカラムを削除">cancel</i></a></div><div class="sortacct">' + acctdata + '</div></li>'
$("#sort").append(html); $("#sort").append(html)
}); })
drag(); drag()
} }
//TLのタイトル //TLのタイトル
@@ -62,59 +62,59 @@ function Scap(type, data) {
} else if (type == "tootsearch") { } else if (type == "tootsearch") {
return "tootsearch(" + data + ")" return "tootsearch(" + data + ")"
} else { } else {
console.error("unknown timeline type: " + type); console.error("unknown timeline type: " + type)
} }
} }
//jquery-ui依存 //jquery-ui依存
function drag() { function drag() {
$('#sort').sortable(); $('#sort').sortable()
$('#sort').disableSelection(); $('#sort').disableSelection()
} }
//ソート指定 //ソート指定
function sort() { function sort() {
var arr = []; var arr = []
var flags = []; var flags = []
$(".drag-content").each(function (i, elem) { $(".drag-content").each(function (i, elem) {
var id = $(this).attr("data-id"); var id = $(this).attr("data-id")
var flag = $(this).attr("data-flag"); var flag = $(this).attr("data-flag")
arr.push(id) arr.push(id)
flags.push(flag); flags.push(flag)
}); })
var col = localStorage.getItem("column"); var col = localStorage.getItem("column")
var obj = JSON.parse(col); var obj = JSON.parse(col)
var newobj = []; var newobj = []
for (i = 0; i < arr.length; i++) { for (i = 0; i < arr.length; i++) {
var data = obj[arr[i]]; var data = obj[arr[i]]
var add = { var add = {
domain: data.domain, domain: data.domain,
type: data.type, type: data.type,
data: data.data, data: data.data,
background: data.background, background: data.background,
text: data.text text: data.text
}; }
newobj.push(add); newobj.push(add)
if (flags[i] == "true") { if (flags[i] == "true") {
localStorage.setItem("card_" + i, "true"); localStorage.setItem("card_" + i, "true")
} else { } else {
localStorage.removeItem("card_" + i); localStorage.removeItem("card_" + i)
} }
} }
var json = JSON.stringify(newobj); var json = JSON.stringify(newobj)
localStorage.setItem("column", json); localStorage.setItem("column", json)
$("#sort").html(""); $("#sort").html("")
M.toast({ html: "Sorted", displayLength: 3000 }) M.toast({ html: "Sorted", displayLength: 3000 })
sortLoad(); sortLoad()
parseColumn(); parseColumn()
sortMenu() sortMenu()
} }
//ソートボタントグル //ソートボタントグル
function sortMenu() { function sortMenu() {
$("#left-menu div").removeClass("active"); $("#left-menu a").removeClass("active")
$("#sortMenu").addClass("active"); $("#sortMenu").addClass("active")
$(".menu-content").addClass("hide"); $(".menu-content").addClass("hide")
$("#sort-box").removeClass("hide"); $("#sort-box").removeClass("hide")
$("#sort").html(""); $("#sort").html("")
sortLoad(); sortLoad()
} }

View File

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

View File

@@ -1,32 +1,20 @@
//テーマ適用 //テーマ適用
function themes(theme) { function themes(theme) {
if (!theme) { if (!theme) {
var theme = localStorage.getItem("theme"); var theme = localStorage.getItem('customtheme-id')
if (!theme) { if (!theme) {
var theme = "black"; localStorage.setItem('customtheme-id', 'black')
localStorage.setItem("theme", "black"); theme = 'black'
} }
} }
var el = document.getElementsByTagName("html")[0] postMessage(['themeCSSRequest', theme + '.thedesktheme'], '*')
var el = document.getElementsByTagName('html')[0]
el.classList.remove('indigotheme'); el.style.backgroundColor = 'var(--bg)'
el.classList.remove('greentheme'); var font = localStorage.getItem('font')
el.classList.remove('browntheme'); if(font) {
el.classList.remove('blacktheme'); el.style.fontFamily = font
el.classList.remove('bluetheme');
el.classList.remove('customtheme');
el.classList.add(theme + "theme");
var font = localStorage.getItem("font");
if (font) {
el.style.fontFamily = font;
} else { } else {
el.style.fontFamily = ""; el.style.fontFamily = ''
} }
if (theme == "custom") {
if (localStorage.getItem("customtheme-id")) {
postMessage(["themeCSSRequest", localStorage.getItem("customtheme-id")], "*")
}
}
el.style.backgroundColor = "var(--bg)";
} }
themes(); themes()

View File

@@ -1,196 +1,296 @@
//左下のメッセージ //左下のメッセージ
var todcTrigger = null; var todcTrigger = null
function todo(mes) { function todo(mes) {
clearInterval(todcTrigger); clearInterval(todcTrigger)
$('#message').text(mes); $('#message').text(mes)
$('#message').fadeIn(); $('#message').fadeIn()
todcTrigger = setTimeout(todc, 4000); todcTrigger = setTimeout(todc, 4000)
} }
function todc() { function todc() {
$('#message').fadeOut(); $('#message').fadeOut()
} }
//reverse //reverse
function bottomReverse() { function bottomReverse() {
$("#bottom").toggleClass("reverse"); $('#bottom').toggleClass('reverse')
$(".leftside").toggleClass("reverse"); $('.leftside').toggleClass('reverse')
if ($("#bottom").hasClass("reverse")) { if ($('#bottom').hasClass('reverse')) {
localStorage.removeItem("reverse") localStorage.removeItem('reverse')
} else { } else {
localStorage.setItem("reverse", "true") localStorage.setItem('reverse', 'true')
} }
} }
function tips(mode) { function tips(mode) {
postMessage(["sendSinmpleIpc", "endmem"], "*") postMessage(['sendSinmpleIpc', 'endmem'], '*')
clearInterval(clockint); clearInterval(clockint)
clearInterval(spotStart); clearInterval(spotStart)
if (mode == "ver") { if (mode == 'ver') {
tipsToggle() tipsToggle()
$("#tips-text").html('<img src="../../img/desk.png" width="20" onclick="todo(\'TheDesk is a nice client!: TheDesk ' + localStorage.getItem("ver") + ' git: '+ gitHash +'\')">TheDesk ' + localStorage.getItem("ver") + ' {'+ gitHash.slice(0, 7) +'} [<i class="material-icons" style="font-size:1.2rem;top: 3px;position: relative;">supervisor_account</i><span id="persons">1+</span>]') $('#tips-text').html(
localStorage.setItem("tips", "ver") '<img src="../../img/desk.png" width="20" onclick="todo(\'TheDesk is a nice client!: TheDesk ' +
} else if (mode == "clock") { localStorage.getItem('ver') +
' git: ' +
gitHash +
'\')"> ' +
localStorage.getItem('ver') +
' {' +
gitHash.slice(0, 7) +
'} [<i class="material-icons" style="font-size:1.2rem;top: 3px;position: relative;">supervisor_account</i><span id="persons">1+</span>]'
)
localStorage.setItem('tips', 'ver')
} else if (mode == 'clock') {
tipsToggle() tipsToggle()
localStorage.setItem("tips", "clock") localStorage.setItem('tips', 'clock')
clock() clock()
} else if (mode == "memory") { } else if (mode == 'memory') {
tipsToggle() tipsToggle()
localStorage.setItem("tips", "memory") localStorage.setItem('tips', 'memory')
startmem(); startmem()
} else if (mode == "trend") { } else if (mode == 'trend') {
tipsToggle() tipsToggle()
localStorage.setItem("tips", "trend") localStorage.setItem('tips', 'trend')
trendTagonTip() trendTagonTip()
} else if (mode == "spotify") { } else if (mode == 'spotify') {
tipsToggle() tipsToggle()
localStorage.setItem("tips", "spotify") localStorage.setItem('tips', 'spotify')
var json = nowplaying("spotifytips") spotifytips()
spotifytips(json) } else if (mode == 'itunes') {
tipsToggle()
localStorage.setItem('tips', 'itunes')
itunestips()
} }
} }
//メモリ //メモリ
function startmem() { function startmem() {
postMessage(["sendSinmpleIpc", "startmem"], "*") postMessage(['sendSinmpleIpc', 'startmem'], '*')
} }
function renderMem(use, cpu, total){ function renderMem(use, cpu, total) {
$("#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) + "%)") $('#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) +
'%)'
)
} }
//トレンドタグ //トレンドタグ
function trendTagonTip() { function trendTagonTip() {
$(".trendtag").remove(); $('.trendtag').remove()
var domain = "imastodon.net" var domain = 'imastodon.net'
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem('acct_' + acct_id + '_at')
var start = "https://" + domain + "/api/v1/trend_tags" var start = 'https://' + domain + '/api/v1/trend_tags'
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json', 'content-type': 'application/json',
'Authorization': 'Bearer ' + at Authorization: 'Bearer ' + at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
if (json) {
var tags = "";
json = json.score;
Object.keys(json).forEach(function (tag) {
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()
} else {
$("#tips-text").html("");
} }
}); })
.then(function(response) {
if (!response.ok) {
response.text().then(function(text) {
setLog(response.url, response.status, text)
})
}
return response.json()
})
.catch(function(error) {
todo(error)
setLog(start, 'JSON', error)
console.error(error)
})
.then(function(json) {
if (json) {
var tags = ''
json = json.score
Object.keys(json).forEach(function(tag) {
tags =
tags +
`<a onclick="tagShow('${tag}')" class="pointer">
#${escapeHTML(tag)}
</a>
<span class="hide" data-tag="${tag}" data-regTag="${tag.toLowerCase()}"> 
<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()
} else {
$('#tips-text').html('')
}
})
} }
//Spotify //Spotify
spotint = null
function spotifytips() { function spotifytips() {
var start = "https://thedesk.top/now-playing?at=" + localStorage.getItem("spotify") + "&rt=" + localStorage.getItem("spotify-refresh"); if (spotint) clearInterval(spotint)
var at = localStorage.getItem("spotify"); var start = 'https://spotify.thedesk.top/current-playing?code=' + localStorage.getItem('spotify-token')
var at = localStorage.getItem('spotify-token')
if (at) { if (at) {
fetch(start, { fetch(start, {
method: 'GET', method: 'GET',
headers: { headers: {
'content-type': 'application/json' 'content-type': 'application/json'
} }
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
var ms = json.progress_ms;
var last = 1000 - ms % 1000;
var item = json.item;
var img = item.album.images[0].url;
var artisttxt = "";
for (i = 0; i < item.artists.length; i++) {
if (i > 0) {
artisttxt = artisttxt + "," + item.artists[i].name;
} else {
artisttxt = item.artists[0].name;
} }
} return response.json()
artisttxt = escapeHTML(artisttxt); })
sleep(last); .catch(function(error) {
var tms = item.duration_ms; todo(error)
var per = ms / item.duration_ms * 100; setLog(start, 'JSON', error)
ms = ms / 1000; console.error(error)
tms = tms / 1000; })
var s = Math.round(ms) % 60; .then(function(jsonRaw) {
if (s < 10) { var code = jsonRaw.token
s = "0" + s; localStorage.setItem('spotify-token', code)
} var json = jsonRaw.data
var m = (Math.round(ms) - Math.round(ms) % 60) / 60; var ms = json.progress_ms
var ts = Math.round(tms) % 60; if(!ms) {
if (ts < 10) { tips('ver')
ts = "0" + ts; return false
} }
var tm = (Math.round(tms) - Math.round(tms) % 60) / 60; var last = 1000 - (ms % 1000)
$("#tips-text").html('<div id="spot-box"><i class="material-icons pointer" onclick="spotifytips()" style="font-size:12px">refresh</i><img src="' + img + '" width="20" id="spot-img">' + escapeHTML(item.name) + '<span class="gray sml" id="spot-art">' + artisttxt + '</span><span id="spot-m">' + m + '</span>:<span id="spot-s">' + s + '</span>/' + tm + ":" + ts + '</span></div><div class="progress grey"><div class="determinate spotify-prog grey lighten-2" style="width: ' + per + '%" data-s="' + Math.round(ms) + '" data-total="' + item.duration_ms + '"></div></div>'); var item = json.item
spotint = setInterval(spotStart, 1000); var img = item.album.images[0].url
}); var artisttxt = ''
for (i = 0; i < item.artists.length; i++) {
if (i > 0) {
artisttxt = artisttxt + ',' + item.artists[i].name
} else {
artisttxt = item.artists[0].name
}
}
artisttxt = escapeHTML(artisttxt)
sleep(last)
var tms = item.duration_ms
var per = (ms / item.duration_ms) * 100
ms = ms / 1000
tms = tms / 1000
var s = Math.round(ms) % 60
if (s < 10) {
s = '0' + s
}
var m = (Math.round(ms) - (Math.round(ms) % 60)) / 60
var ts = Math.round(tms) % 60
if (ts < 10) {
ts = '0' + ts
}
var tm = (Math.round(tms) - (Math.round(tms) % 60)) / 60
var html = `
<div id="spot-box">
<div id="spot-refresh">
<i class="material-icons pointer" onclick="spotifytips()" style="font-size:20px">refresh</i>
<i class="material-icons pointer" onclick="nowplaying('spotify');show()" style="font-size:20px">send</i>
</div>
<div id="spot-cover">
<img src="${img}" id="spot-img">
</div>
<div id="spot-name">
${escapeHTML(item.name)}
</div>
<div id="spot-artist">
<span class="gray sml" id="spot-art">${artisttxt}</span>
</div>
<div id="spot-time">
<span id="spot-m">${m}</span>:<span id="spot-s">${s}</span>/${tm}:${ts}</span>
</div>
<div class="progress grey">
<div class="determinate spotify-prog grey lighten-2"
style="width:${per}%" data-s="${Math.round(ms)}" data-total="${item.duration_ms}">
</div>
</div>
</div>`
$('#tips-text').html(html)
spotint = setInterval(spotStart, 1000)
})
} else { } else {
Swal.fire({ Swal.fire({
type: 'info', type: 'info',
title: lang.lang_spotify_acct title: lang.lang_spotify_acct
}) })
tips('ver')
return false
} }
} }
function spotStart() { function spotStart() {
var total = $(".spotify-prog").attr("data-total"); var total = $('.spotify-prog').attr('data-total')
var s = $(".spotify-prog").attr("data-s"); var s = $('.spotify-prog').attr('data-s')
var news = s * 1 + 1; var news = s * 1 + 1
var per = news * 100000 / total; var per = (news * 100000) / total
var ns = news % 60; var ns = news % 60
var nm = (news - ns) / 60; var nm = (news - ns) / 60
if (ns < 10) { if (ns < 10) {
ns = "0" + ns; ns = '0' + ns
} }
if (per >= 100) { if (per >= 100) {
clearInterval(spotStart); clearInterval(spotStart)
spotifytips() spotifytips()
} else { } else {
$("#spot-m").text(nm); $('#spot-m').text(nm)
$("#spot-s").text(ns); $('#spot-s').text(ns)
} }
$(".spotify-prog").attr("data-s", news); $('.spotify-prog').attr('data-s', news)
$(".spotify-prog").css("width", per + "%"); $('.spotify-prog').css('width', per + '%')
} }
function trendTagonTipInterval() { function trendTagonTipInterval() {
setTimeout(trendTagonTip, 6000000); setTimeout(trendTagonTip, 6000000)
} }
//時計 //時計
var clockint; var clockint
function clock() { function clock() {
var now = new Date(); var now = new Date()
var last = 1000 - now.getTime() % 1000; var last = 1000 - (now.getTime() % 1000)
sleep(last); sleep(last)
clockint = setInterval(clockStart, 1000); clockint = setInterval(clockStart, 1000)
} }
function clockStart() { function clockStart() {
var nowTime = new Date(); // 現在日時を得る var nowTime = new Date() // 現在日時を得る
var nowHour = nowTime.getHours(); // 時を抜き出す var nowHour = nowTime.getHours() // 時を抜き出す
if (nowHour < 10) { nowHour = "0" + nowHour } if (nowHour < 10) {
var nowMin = nowTime.getMinutes(); // 分を抜き出す nowHour = '0' + nowHour
if (nowMin < 10) { nowMin = "0" + nowMin } }
var nowSec = nowTime.getSeconds(); // を抜き出す var nowMin = nowTime.getMinutes() // を抜き出す
if (nowSec < 10) { nowSec = "0" + nowSec } if (nowMin < 10) {
var msg = nowTime.getFullYear() + "/" + (nowTime.getMonth() + 1) + "/" + nowTime.getDate() + '<span style="font-size:20px; font-family:Open Sans">' + nowHour + ":" + nowMin + ":" + nowSec + "</span>"; nowMin = '0' + nowMin
$("#tips-text").html(msg); }
var nowSec = nowTime.getSeconds() // 秒を抜き出す
if (nowSec < 10) {
nowSec = '0' + nowSec
}
var msg =
nowTime.getFullYear() +
'/' +
(nowTime.getMonth() + 1) +
'/' +
nowTime.getDate() +
'<span style="font-size:20px; font-family:Open Sans">' +
nowHour +
':' +
nowMin +
':' +
nowSec +
'</span>'
$('#tips-text').html(msg)
} }
function sleep(waitMsec) { function sleep(waitMsec) {
var startMsec = new Date(); var startMsec = new Date()
while (new Date() - startMsec < waitMsec); while (new Date() - startMsec < waitMsec);
} }
function tipsToggle() { function tipsToggle() {
$("#tips").toggleClass("hide"); $('#tips').toggleClass('hide')
$("#tips-menu").toggleClass("hide"); $('#tips-menu').toggleClass('hide')
}
if (localStorage.getItem("tips")) {
tips(localStorage.getItem("tips"));
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,64 +1,65 @@
//プロフ編集 //プロフ編集
//文字系 //文字系
function profedit() { function profedit() {
var acct_id = $('#his-data').attr("use-acct"); var acct_id = $('#his-data').attr("use-acct")
todo("Updating..."); todo("Updating...")
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem("domain_" + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem("acct_" + acct_id + "_at")
var start = "https://" + domain + "/api/v1/accounts/update_credentials"; var start = "https://" + domain + "/api/v1/accounts/update_credentials"
var name = $("#his-name-val").val(); var name = $("#his-name-val").val()
var des = $("#his-des-val").val(); var des = $("#his-des-val").val()
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('PATCH', start, true); httpreq.open('PATCH', start, true)
httpreq.setRequestHeader('Content-Type', 'application/json'); httpreq.setRequestHeader('Content-Type', 'application/json')
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = "json"; httpreq.responseType = "json"
httpreq.send(JSON.stringify({ httpreq.send(JSON.stringify({
display_name: name, display_name: name,
note: des, note: des,
})); }))
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
$('#his-data').modal('close'); $('#his-data').modal('close')
todc(); todc()
} }
} }
} }
//画像系 //画像系
function imgChange(imgfile, target) { function imgChange(imgfile, target) {
var acct_id = $('#his-data').attr("use-acct"); var acct_id = $('#his-data').attr("use-acct")
todo("アップロードしています") todo("アップロードしています")
if (!imgfile.files.length) { if (!imgfile.files.length) {
console.warn("No Image to upload"); console.warn("No Image to upload")
return; return
} }
var file = imgfile.files[0]; var file = imgfile.files[0]
var fr = new FileReader(); var fr = new FileReader()
fr.onload = function (evt) { fr.onload = function (evt) {
var b64 = this.result; var b64 = this.result
var blob = toBlob(b64, 'image/png'); var blob = toBlob(b64, 'image/png')
var fd = new FormData(); var fd = new FormData()
fd.append(target, blob); fd.append(target, blob)
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem("domain_" + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem("acct_" + acct_id + "_at")
var start = "https://" + domain + "/api/v1/accounts/update_credentials"; var start = "https://" + domain + "/api/v1/accounts/update_credentials"
var httpreq = new XMLHttpRequest(); var httpreq = new XMLHttpRequest()
httpreq.open('PATCH', start, true); httpreq.open('PATCH', start, true)
httpreq.upload.addEventListener("progress", progshow, false); httpreq.upload.addEventListener("progress", progshow, false)
httpreq.setRequestHeader('Authorization', 'Bearer ' + at); httpreq.setRequestHeader('Authorization', 'Bearer ' + at)
httpreq.responseType = "json"; httpreq.responseType = "json"
httpreq.send(fd); httpreq.send(fd)
httpreq.onreadystatechange = function () { httpreq.onreadystatechange = function () {
if (httpreq.readyState === 4) { if (httpreq.readyState === 4) {
var json = httpreq.response; var json = httpreq.response
$('#his-data').modal('close'); if(this.status!==200){ setLog(start, this.status, this.response) }
todc(); $('#his-data').modal('close')
localStorage.removeItem("image"); todc()
localStorage.removeItem("image")
} }
} }
} }
$("#prof-change").html($("#prof-change").html()); $("#prof-change").html($("#prof-change").html())
$("#header-change").html($("#header-change").html()); $("#header-change").html($("#header-change").html())
fr.readAsDataURL(file); fr.readAsDataURL(file)
} }

View File

@@ -1,417 +1,479 @@
//ユーザーデータ表示 //ユーザーデータ表示
localStorage.removeItem("history"); localStorage.removeItem("history")
//コード受信 //コード受信
if (location.search) { if (location.search) {
var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/); var m = location.search.match(/\?mode=([a-zA-Z-0-9]+)\&code=(.+)/)
var mode = m[1]; var mode = m[1]
var codex = m[2]; var codex = m[2]
if (mode == "user") { if (mode == "user") {
udgEx(codex, 'main'); udgEx(codex, "main")
} }
} }
function udgEx(user, acct_id) { function udgEx(user, acct_id) {
if (user == "selector") { if (user == "selector") {
user = $("#his-acct").attr('fullname'); user = $("#his-acct").attr("fullname")
} }
if (acct_id == "selector") { if (acct_id == "selector") {
acct_id = $("#user-acct-sel").val(); acct_id = $("#user-acct-sel").val()
} }
if (acct_id == "main") { if (acct_id == "main") {
acct_id = localStorage.getItem("main"); acct_id = localStorage.getItem("main")
} }
console.log("Get user data of " + user); console.log("Get user data of " + user)
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem("domain_" + acct_id)
if (localStorage.getItem("mode_" + domain) == "misskey") { return false; } if (localStorage.getItem("mode_" + domain) == "misskey") {
var at = localStorage.getItem("acct_" + acct_id + "_at"); return false
var start = "https://" + domain + "/api/v1/search?resolve=true&q=" + user }
var at = localStorage.getItem("acct_" + acct_id + "_at")
var start = "https://" + domain + "/api/v2/search?resolve=true&q=" + encodeURIComponent(user)
fetch(start, { fetch(start, {
method: 'GET', method: "GET",
headers: { headers: {
'content-type': 'application/json', "content-type": "application/json",
'Authorization': 'Bearer ' + at Authorization: "Bearer " + at
} }
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
if (json.accounts) { }
var id = json.accounts[0].id; return response.json()
udg(id, acct_id); })
} else { .catch(function(error) {
postMessage(["openUrl", url], "*") todo(error)
} setLog(start, "JSON", error)
}); console.error(error)
return true; })
.then(function(json) {
if (json.accounts[0]) {
var id = json.accounts[0].id
udg(id, acct_id)
} else {
postMessage(["openUrl", user], "*")
}
})
return true
} }
function udg(user, acct_id) { function udg(user, acct_id) {
reset(); reset()
if (!user) { if (!user) {
user = localStorage.getItem("user-id_" + acct_id); user = localStorage.getItem("user-id_" + acct_id)
} }
todo("User Data Loading..."); todo("User Data Loading...")
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem("domain_" + acct_id)
if (localStorage.getItem("mode_" + domain) == "misskey") { if (localStorage.getItem("mode_" + domain) == "misskey") {
misskeyUdg(user, acct_id) misskeyUdg(user, acct_id)
return; return
} }
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem("acct_" + acct_id + "_at")
var start = "https://" + domain + "/api/v1/accounts/" + user; var start = "https://" + domain + "/api/v1/accounts/" + user
fetch(start, { fetch(start, {
method: 'GET', method: "GET",
headers: { headers: {
'content-type': 'application/json', "content-type": "application/json",
'Authorization': 'Bearer ' + at Authorization: "Bearer " + at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
//一つ前のユーザーデータ
if (!localStorage.getItem("history")) {
$("#his-history-btn").prop("disabled", true);
} else {
$("#his-history-btn").prop("disabled", false);
$('#his-data').attr("history", localStorage.getItem("history"));
} }
//moved設定時 })
if (json.moved) { .then(function(response) {
M.toast({ if (!response.ok) {
html: lang.lang_showontl_movetxt + '<button class="btn-flat toast-action" onclick="udg(\'' + response.text().then(function(text) {
json.moved.id + '\',\'' + acct_id + '\')">' + lang.lang_showontl_movebtn + '</button>', displayLength: 4000 setLog(response.url, response.status, text)
}) })
} }
$('#his-data').modal('open'); return response.json()
$('#his-data').attr("user-id", user); })
$('#his-data').attr("use-acct", acct_id); .catch(function(error) {
if (json.username != json.acct) { todo(error)
//Remote setLog(start, "JSON", error)
$('#his-data').attr("remote", "true"); console.error(error)
var fullname = json.acct; })
} else { .then(function(json) {
$('#his-data').attr("remote", "false"); //一つ前のユーザーデータ
var fullname = json.acct + "@" + domain; if (!localStorage.getItem("history")) {
} $("#his-history-btn").prop("disabled", true)
utl(json.id, '', acct_id);
flw(json.id, '', 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];
} else {
var actemojick = false;
}
//絵文字があれば
if (actemojick) {
Object.keys(json.emojis).forEach(function (key5) {
var emoji = json.emojis[key5];
var shortcode = emoji.shortcode;
var emoji_url = '<img src="' + emoji.url +
'" 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);
$("#his-prof").attr("src", json.avatar);
$('#his-data').css('background-image', 'url(' + json.header + ')');
$("#his-sta").text(json.statuses_count);
$("#his-follow").text(json.following_count);
var flerc = json.followers_count;
if (flerc < 0) {
flerc = "-";
}
$("#his-follower").text(flerc);
$("#his-since").text(crat(json.created_at));
$("#his-openin").attr("data-href", json.url);
if (json.fields) {
if (json.fields.length > 0) {
note = note + '<table id="his-field">'
for (var i = 0; i < json.fields.length; i++) {
var fname = json.fields[i].name;
var fval = json.fields[i].value;
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));
} else { } else {
$("#his-des").html(twemoji.parse(note)); $("#his-history-btn").prop("disabled", false)
$("#his-data").attr("history", localStorage.getItem("history"))
} }
} else { //moved設定時
$("#his-des").html(twemoji.parse(note)); if (json.moved) {
} M.toast({
if (json.bot) { html: lang.lang_showontl_movetxt + '<button class="btn-flat toast-action" onclick="udg(\'' + json.moved.id + "','" + acct_id + "')\">" + lang.lang_showontl_movebtn + "</button>",
$("#his-bot").html(lang.lang_showontl_botacct); displayLength: 4000
} })
$("#his-des").attr("data-acct", acct_id);
$('#his-data').css('background-size', 'cover');
$("#his-float-timeline").css("height", $("#his-data-show").height() + "px")
localStorage.setItem("history", user);
//自分の時
if (json.acct == localStorage.getItem("user_" + acct_id)) {
showFav('', acct_id);
showBlo('', acct_id);
showMut('', acct_id);
showDom('', acct_id);
showReq('', acct_id);
showFrl('', acct_id);
$("#his-name-val").val(json.display_name);
if (json.fields.length > 0) {
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; $("#his-data").modal("open")
des = des.replace(/<br \/>/g, "\n") $("#his-data").attr("user-id", user)
des = $.strip_tags(des); $("#his-data").attr("use-acct", acct_id)
$("#his-des-val").val(des); if (json.username != json.acct) {
$("#his-follow-btn").hide(); //Remote
$("#his-block-btn").hide(); $("#his-data").attr("remote", "true")
$("#his-mute-btn").hide(); var fullname = json.acct
$("#his-notf-btn").hide(); } else {
$("#his-domain-btn").hide(); $("#his-data").attr("remote", "false")
$("#his-emp-btn").hide(); var fullname = json.acct + "@" + domain
$(".only-my-data").show();
$(".only-his-data").hide();
if (localStorage.getItem("main") == acct_id) {
$("#his-main-acct").hide();
} }
} else { utlShow(json.id, "", acct_id)
relations(user, acct_id); flw(json.id, "", acct_id)
$(".only-my-data").hide(); fer(json.id, "", acct_id)
$(".only-his-data").show(); var dis_name = escapeHTML(json.display_name)
} dis_name = twemoji.parse(dis_name)
todc();
//外部データ取得(死かもしれないので) var note = json.note
udAdd(acct_id, user, json.url); if (json.emojis) {
}); var actemojick = json.emojis[0]
} else {
var actemojick = false
}
//絵文字があれば
if (actemojick) {
Object.keys(json.emojis).forEach(function(key5) {
var emoji = json.emojis[key5]
var shortcode = emoji.shortcode
var emoji_url = '<img src="' + emoji.url + '" 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)
$("#his-prof").attr("src", json.avatar)
$("#his-data").css("background-image", "url(" + json.header + ")")
$("#his-sta").text(json.statuses_count)
$("#his-follow").text(json.following_count)
var flerc = json.followers_count
if (flerc < 0) {
flerc = "-"
}
$("#his-follower").text(flerc)
$("#his-since").text(crat(json.created_at))
$("#his-openin").attr("data-href", json.url)
if (json.fields) {
var table = ""
if (json.fields.length > 0) {
$("#his-des").css("max-height", "250px")
table = '<table id="his-field">'
for (var i = 0; i < json.fields.length; i++) {
var fname = json.fields[i].name
var fval = json.fields[i].value
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"
}
table = table + '<tr><td class="his-field-title">' + escapeHTML(fname) + '</td><td class="his-field-content" title="' + when + '" style="background-color:' + color + '">' + fval + "</td></tr>"
}
table = table + "</table>"
$("#his-des").html(twemoji.parse(note))
} else {
$("#his-des").css("max-height", "400px")
}
$("#his-table").html(twemoji.parse(table))
} else {
$("#his-des").css("max-height", "400px")
}
$("#his-des").html(twemoji.parse(note))
if (json.bot) {
$("#his-bot").html(lang.lang_showontl_botacct)
}
$("#his-des").attr("data-acct", acct_id)
$("#his-data").css("background-size", "cover")
$("#his-float-timeline").css("height", $("#his-data-show").height() + "px")
localStorage.setItem("history", user)
//自分の時
if (json.acct == localStorage.getItem("user_" + acct_id)) {
showFav("", acct_id)
showBlo("", acct_id)
showMut("", acct_id)
showDom("", acct_id)
showReq("", acct_id)
showFrl("", acct_id)
$("#his-name-val").val(json.display_name)
if (json.fields.length > 0) {
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")
des = $.strip_tags(des)
$("#his-des-val").val(des)
$("#his-follow-btn").hide()
$("#his-block-btn").hide()
$("#his-mute-btn").hide()
$("#his-notf-btn").hide()
$("#his-domain-btn").hide()
$("#his-emp-btn").hide()
$(".only-my-data").show()
$(".only-his-data").hide()
if (localStorage.getItem("main") == acct_id) {
$("#his-main-acct").hide()
}
} else {
relations(user, acct_id)
$(".only-my-data").hide()
$(".only-his-data").show()
}
todc()
if(json.locked) {
$('#his-data').addClass('locked')
} else {
$('#his-data').removeClass('locked')
}
//外部データ取得(死かもしれないので)
udAdd(acct_id, user, json.url)
})
} }
function misskeyUdg(user, acct_id) { function misskeyUdg(user, acct_id) {
reset(); reset()
if (!user) { if (!user) {
user = localStorage.getItem("user-id_" + acct_id); user = localStorage.getItem("user-id_" + acct_id)
} }
todo("User Data Loading..."); todo("User Data Loading...")
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem("domain_" + acct_id)
if (localStorage.getItem("mode_" + domain) != "misskey") { if (localStorage.getItem("mode_" + domain) != "misskey") {
udg(user, acct_id) udg(user, acct_id)
return; return
} }
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem("acct_" + acct_id + "_at")
var start = "https://" + domain + "/api/users/show"; var start = "https://" + domain + "/api/users/show"
fetch(start, { fetch(start, {
method: 'POST', method: "POST",
headers: { headers: {
'content-type': 'application/json', "content-type": "application/json"
}, },
body: JSON.stringify({ body: JSON.stringify({
i: at, i: at,
userId: user userId: user
}) })
}).then(function (response) { })
return response.json(); .then(function(response) {
}).catch(function (error) { if (!response.ok) {
todo(error); response.text().then(function(text) {
console.error(error); setLog(response.url, response.status, text)
}).then(function (json) { })
//一つ前のユーザーデータ
if (!localStorage.getItem("history")) {
$("#his-history-btn").prop("disabled", true);
} else {
$("#his-history-btn").prop("disabled", false);
$('#his-data').attr("history", localStorage.getItem("history"));
}
$('#his-data').modal('open');
$('#his-data').attr("user-id", user);
$('#his-data').attr("use-acct", acct_id);
if (json.host) {
//Remote
$('#his-data').attr("remote", "false");
var fullname = json.username + "@" + json.host;
} else {
$('#his-data').attr("remote", "false");
var fullname = json.acct + "@" + domain;
}
utl(json.id, '', acct_id);
flw(json.id, '', acct_id);
fer(json.id, '', acct_id);
if (json.name) {
var dis_name = escapeHTML(json.name);
dis_name = twemoji.parse(dis_name);
} else {
var dis_name = json.name
}
$("#his-name").html(dis_name);
$("#his-acct").text(json.username);
$("#his-acct").attr("fullname", fullname);
$("#his-prof").attr("src", json.avatarUrl);
$('#his-data').css('background-image', 'url(' + json.bannerUrl + ')');
$("#his-sta").text(json.notesCount);
$("#his-follow").text(json.followingCount);
$("#his-follower").text(json.followersCount);
$("#his-since").text(crat(json.createdAt));
var note = escapeHTML(json.description);
$("#his-des").html(twemoji.parse(note));
if (json.isCat) {
$("#his-bot").html("Cat" + twemoji.parse("😺"));
}
$('#his-data').css('background-size', 'cover');
localStorage.setItem("history", user);
//自分の時
if (json.username == localStorage.getItem("user_" + acct_id) && !json.host) {
//showFav('', acct_id);
//showMut('', acct_id);
//showReq('', acct_id);
showFrl('', acct_id);
$("#his-name-val").val(json.name);
var des = json.note;
des = nl2br(des)
des = $.strip_tags(des);
$("#his-des-val").val(des);
$("#his-follow-btn").hide();
$("#his-block-btn").hide();
$("#his-mute-btn").hide();
$("#his-notf-btn").hide();
$("#his-domain-btn").hide();
$("#his-emp-btn").hide();
$(".only-my-data").show();
$(".only-his-data").hide();
if (localStorage.getItem("main") == acct_id) {
$("#his-main-acct").hide();
} }
} else { return response.json()
if (json.isFollowing) { })
//自分がフォローしている .catch(function(error) {
$("#his-data").addClass("following"); todo(error)
$("#his-follow-btn").text(lang.lang_status_unfollow); setLog(start, "JSON", error)
hisList(user, acct_id); console.error(error)
})
.then(function(json) {
//一つ前のユーザーデータ
if (!localStorage.getItem("history")) {
$("#his-history-btn").prop("disabled", true)
} else { } else {
$("#his-follow-btn").text(lang.lang_status_follow); $("#his-history-btn").prop("disabled", false)
$("#his-data").attr("history", localStorage.getItem("history"))
} }
if (json.isFollowed) { $("#his-data").modal("open")
//フォローされてる $("#his-data").attr("user-id", user)
$("#his-relation").text(lang.lang_showontl_followed); $("#his-data").attr("use-acct", acct_id)
} if (json.host) {
$("#his-block-btn").hide(); //Remote
if (json.isMuted) { $("#his-data").attr("remote", "false")
$("#his-data").addClass("muting"); var fullname = json.username + "@" + json.host
$("#his-mute-btn").text(lang.lang_status_unmute);
} else { } else {
$("#his-mute-btn").text(lang.lang_status_mute); $("#his-data").attr("remote", "false")
var fullname = json.acct + "@" + domain
} }
$(".only-my-data").hide(); utlShow(json.id, "", acct_id)
$(".only-his-data").show(); flw(json.id, "", acct_id)
} fer(json.id, "", acct_id)
todc(); if (json.name) {
}); var dis_name = escapeHTML(json.name)
dis_name = twemoji.parse(dis_name)
} else {
var dis_name = json.name
}
$("#his-name").html(dis_name)
$("#his-acct").text(json.username)
$("#his-acct").attr("fullname", fullname)
$("#his-prof").attr("src", json.avatarUrl)
$("#his-data").css("background-image", "url(" + json.bannerUrl + ")")
$("#his-sta").text(json.notesCount)
$("#his-follow").text(json.followingCount)
$("#his-follower").text(json.followersCount)
$("#his-since").text(crat(json.createdAt))
var note = escapeHTML(json.description)
$("#his-des").html(twemoji.parse(note))
if (json.isCat) {
$("#his-bot").html("Cat" + twemoji.parse("😺"))
}
$("#his-data").css("background-size", "cover")
localStorage.setItem("history", user)
//自分の時
if (json.username == localStorage.getItem("user_" + acct_id) && !json.host) {
//showFav('', acct_id);
//showMut('', acct_id);
//showReq('', acct_id);
showFrl("", acct_id)
$("#his-name-val").val(json.name)
var des = json.note
des = nl2br(des)
des = $.strip_tags(des)
$("#his-des-val").val(des)
$("#his-follow-btn").hide()
$("#his-block-btn").hide()
$("#his-mute-btn").hide()
$("#his-notf-btn").hide()
$("#his-domain-btn").hide()
$("#his-emp-btn").hide()
$(".only-my-data").show()
$(".only-his-data").hide()
if (localStorage.getItem("main") == acct_id) {
$("#his-main-acct").hide()
}
} else {
if (json.isFollowing) {
//自分がフォローしている
$("#his-data").addClass("following")
$("#his-follow-btn-text").text(lang.lang_status_unfollow)
hisList(user, acct_id)
} else {
$("#his-follow-btn-text").text(lang.lang_status_follow)
}
if (json.isFollowed) {
//フォローされてる
$("#his-relation").text(lang.lang_showontl_followed)
}
$("#his-block-btn").hide()
if (json.isMuted) {
$("#his-data").addClass("muting")
$("#his-mute-btn-text").text(lang.lang_status_unmute)
} else {
$("#his-mute-btn-text").text(lang.lang_status_mute)
}
$(".only-my-data").hide()
$(".only-his-data").show()
}
todc()
})
} }
//一つ前のユーザーデータ表示 //一つ前のユーザーデータ表示
function historyShow() { function historyShow() {
var acct_id = $('#his-data').attr("use-acct"); var acct_id = $("#his-data").attr("use-acct")
var user = $('#his-data').attr("history"); var user = $("#his-data").attr("history")
udg(user, acct_id, "true") udg(user, acct_id, "true")
} }
//選択アカウントのプロフ //選択アカウントのプロフ
function profShow() { function profShow() {
var acct_id = $("#post-acct-sel").val(); var acct_id = $("#post-acct-sel").val()
var user = localStorage.getItem("user-id_" + acct_id); var user = localStorage.getItem("user-id_" + acct_id)
udg(user, acct_id) udg(user, acct_id)
hide(); hide()
} }
//FF関係取得 //FF関係取得
function relations(user, acct_id) { function relations(user, acct_id) {
var domain = localStorage.getItem("domain_" + acct_id); var domain = localStorage.getItem("domain_" + acct_id)
var at = localStorage.getItem("acct_" + acct_id + "_at"); var at = localStorage.getItem("acct_" + acct_id + "_at")
var start = "https://" + domain + "/api/v1/accounts/relationships?id=" + user; var start = "https://" + domain + "/api/v1/accounts/relationships?id=" + user
fetch(start, { fetch(start, {
method: 'GET', method: "GET",
headers: { headers: {
'content-type': 'application/json', "content-type": "application/json",
'Authorization': 'Bearer ' + at Authorization: "Bearer " + at
},
}).then(function (response) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
var json = json[0];
if (json.following) {
//自分がフォローしている
$("#his-data").addClass("following");
$("#his-follow-btn").text(lang.lang_status_unfollow);
hisList(user, acct_id);
} else {
$("#his-follow-btn").text(lang.lang_status_follow);
} }
if (json.followed_by) { })
//フォローされてる .then(function(response) {
$("#his-relation").text(lang.lang_showontl_followed); if (!response.ok) {
} response.text().then(function(text) {
if (json.blocking) { setLog(response.url, response.status, text)
$("#his-data").addClass("blocking"); })
$("#his-block-btn").text(lang.lang_status_unblock); }
} else { return response.json()
$("#his-block-btn").text(lang.lang_status_block); })
} .catch(function(error) {
if (json.muting) { todo(error)
$("#his-data").addClass("muting"); setLog(start, "JSON", error)
$("#his-mute-btn").text(lang.lang_status_unmute); console.error(error)
} else { })
$("#his-mute-btn").text(lang.lang_status_mute); .then(function(json) {
} var json = json[0]
if (json.muting_notifications) { if(json.requested) {
$("#his-data").addClass("mutingNotf"); //フォロリク中
$("#his-notf-btn").text(lang.lang_showontl_notf + lang.lang_status_unmute); $('#his-data').addClass('following')
} else { $("#his-follow-btn-text").text(lang.lang_status_requesting)
$("#his-notf-btn").text(lang.lang_showontl_notf + lang.lang_status_mute); }
} if (json.following) {
if (json.domain_blocking) { //自分がフォローしている
$("#his-data").addClass("blockingDom"); $("#his-data").addClass("following")
$("#his-domain-btn").text(lang.lang_showontl_domain + lang.lang_status_unblock); $("#his-follow-btn-text").text(lang.lang_status_unfollow)
} else { hisList(user, acct_id)
$("#his-domain-btn").text(lang.lang_showontl_domain + lang.lang_status_block); } else {
} $("#his-follow-btn-text").text(lang.lang_status_follow)
//Endorsed }
if (json.endorsed) { if (json.followed_by) {
$("#his-end-btn").addClass("endorsed"); //フォローされてる
$("#his-end-btn").text(lang.lang_status_unendorse) $("#his-relation").text(lang.lang_showontl_followed)
} else { }
$("#his-end-btn").removeClass("endorsed"); if (json.blocking) {
$("#his-end-btn").text(lang.lang_status_endorse) $("#his-data").addClass("blocking")
} $("#his-block-btn-text").text(lang.lang_status_unblock)
//Blocked } else {
if (json.blocked_by) { $("#his-block-btn-text").text(lang.lang_status_block)
$("#my-data-nav .btn").addClass("disabled") }
$(".his-var-content").hide(); if (json.muting) {
$("#his-float-blocked").show() $("#his-data").addClass("muting")
$("#his-follow-btn").hide() $("#his-mute-btn-text").text(lang.lang_status_unmute)
} } else {
$("#his-mute-btn-text").text(lang.lang_status_mute)
}); }
if (json.muting_notifications) {
$("#his-data").addClass("mutingNotf")
$("#his-notf-btn-text").text(lang.lang_showontl_notf + lang.lang_status_unmute)
} else {
$("#his-notf-btn-text").text(lang.lang_showontl_notf + lang.lang_status_mute)
}
if (json.domain_blocking) {
$("#his-data").addClass("blockingDom")
$("#his-domain-btn-text").text(lang.lang_showontl_domain + lang.lang_status_unblock)
} else {
$("#his-domain-btn-text").text(lang.lang_showontl_domain + lang.lang_status_block)
}
//Endorsed
if (json.endorsed) {
$("#his-end-btn").addClass("endorsed")
$("#his-end-btn-text").text(lang.lang_status_unendorse)
} else {
$("#his-end-btn").removeClass("endorsed")
$("#his-end-btn-text").text(lang.lang_status_endorse)
}
//Blocked
if (json.blocked_by) {
$("#my-data-nav .btn").addClass("disabled")
$(".his-var-content").hide()
$("#his-float-blocked").show()
$("#his-follow-btn").hide()
}
})
} }
function profbrws() { function profbrws() {
var url = $("#his-openin").attr("data-href") var url = $("#his-openin").attr("data-href")
@@ -419,76 +481,82 @@ function profbrws() {
} }
function setMain() { function setMain() {
var acct_id = $("#his-data").attr("use-acct") var acct_id = $("#his-data").attr("use-acct")
localStorage.setItem("main", acct_id); localStorage.setItem("main", acct_id)
multiSelector(true) multiSelector(true)
M.toast({ html: lang.lang_manager_mainAcct, displayLength: 3000 }) M.toast({ html: lang.lang_manager_mainAcct, displayLength: 3000 })
} }
//オールリセット //オールリセット
function hisclose() { function hisclose() {
$('#his-data').modal('close'); $("#his-data").modal("close")
reset(); reset()
$('#his-data').attr("history", ""); $("#his-data").attr("history", "")
localStorage.removeItem("history"); localStorage.removeItem("history")
} }
function reset() { function reset() {
$(".his-var-content:eq(0)").show(); $(".his-var-content:eq(0)").show()
$(".his-var-content:gt(0)").hide(); $(".his-var-content:gt(0)").hide()
$("#my-data-nav .btn").removeClass("disabled") $("#my-data-nav .btn").removeClass("disabled")
$(".active-back").removeClass("active-back"); $(".active-back").removeClass("active-back")
$(".column-first").addClass("active-back"); $(".column-first").addClass("active-back")
$("#his-name").text("Loading"); $("#his-name").text("Loading")
$("#his-acct").text(""); $("#his-acct").text("")
$("#his-prof").attr("src", "../../img/loading.svg"); $("#his-prof").attr("src", "../../img/loading.svg")
$('#his-data').css('background-image', 'url(../../img/loading.svg)'); $("#his-data").css("background-image", "url(../../img/loading.svg)")
$("#his-sta").text(""); $("#his-sta").text("")
$("#his-follow").text(""); $("#his-follow").text("")
$("#his-follower").text(""); $("#his-follower").text("")
$("#his-des").html(""); $("#his-des").html("")
$('#his-data').css('background-size', 'cover'); $("#his-data").css("background-size", "cover")
$("#his-since").text(""); $("#his-since").text("")
$("#his-data").removeClass("following"); $("#his-data").removeClass("following")
$("#his-data").removeClass("muting"); $("#his-data").removeClass("muting")
$("#his-data").removeClass("blocking"); $("#his-data").removeClass("blocking")
$("#his-data").removeClass("mutingNotf"); $("#his-data").removeClass("mutingNotf")
$("#his-data").removeClass("blockingDom"); $("#his-data").removeClass("blockingDom")
$("#his-end-btn").removeClass("endorsed"); $("#his-end-btn").removeClass("endorsed")
$("#his-bot").html(""); $("#his-des").css("max-height", "250px")
$("#his-follow-btn").show(); $("#his-bot").html("")
$("#his-block-btn").show(); $("#his-follow-btn").show()
$("#his-mute-btn").show(); $("#his-block-btn").show()
$("#his-notf-btn").show(); $("#his-mute-btn").show()
$("#his-domain-btn").show(); $("#his-notf-btn").show()
$("#his-emp-btn").show(); $("#his-domain-btn").show()
$("#his-follow-btn").text(lang.lang_status_follow); $("#his-emp-btn").show()
$("#his-mute-btn").text(lang.lang_status_mute); $("#his-follow-btn-text").text(lang.lang_status_follow)
$("#his-block-btn").text(lang.lang_status_block); $("#his-mute-btn-text").text(lang.lang_status_mute)
$("#his-notf-btn").text(lang.lang_showontl_notf + lang.lang_status_mute); $("#his-block-btn-text").text(lang.lang_status_block)
$("#his-domain-btn").text(lang.lang_showontl_domain + lang.lang_status_block); $("#his-notf-btn").text(lang.lang_showontl_notf + lang.lang_status_mute)
$("#his-relation").text(""); $("#his-domain-btn").text(lang.lang_showontl_domain + lang.lang_status_block)
$(".cont-series").html(""); $("#his-relation").text("")
$("#domainblock").val(""); $(".cont-series").html("")
$("#his-lists-a").html(lang.lang_showontl_listwarn); $("#domainblock").val("")
$("#his-lists-b").html(''); $("#his-lists-a").html(lang.lang_showontl_listwarn)
$("#his-name-val").val(""); $("#his-lists-b").html("")
$("#his-des-val").val(""); $("#his-name-val").val("")
$("#his-f1-name").val(""); $("#his-f1-val").val(""); $("#his-des-val").val("")
$("#his-f2-name").val(""); $("#his-f2-val").val(""); $("#his-f1-name").val("")
$("#his-f3-name").val(""); $("#his-f3-val").val(""); $("#his-f1-val").val("")
$("#his-f4-name").val(""); $("#his-f4-val").val(""); $("#his-f2-name").val("")
$("#his-endorse").html(""); $("#his-f2-val").val("")
$("#his-openin").attr("data-href", ""); $("#his-f3-name").val("")
$("#his-float-timeline").show(); $("#his-f3-val").val("")
$("#his-float-blocked").hide(); $("#his-f4-name").val("")
$("#his-main-acct").show(); $("#his-f4-val").val("")
$("#his-endorse").html("")
$("#his-openin").attr("data-href", "")
$("#his-float-timeline").show()
$("#his-float-blocked").hide()
$("#his-main-acct").show()
$("#his-proof-prof").html("") $("#his-proof-prof").html("")
$('#his-data').removeClass('locked')
$('#his-data').removeClass('requesting')
} }
$('#my-data-nav .anc-link').on('click', function () { $("#my-data-nav .anc-link").on("click", function() {
var target = $(this).attr("go"); var target = $(this).attr("go")
if (target) { if (target) {
$("#my-data-nav .anc-link").removeClass("active-back"); $("#my-data-nav .anc-link").removeClass("active-back")
$(this).addClass("active-back"); $(this).addClass("active-back")
$(target).show(); $(target).show()
$(".his-var-content:not(" + target + ")").hide(); $(".his-var-content:not(" + target + ")").hide()
} }
})
});

View File

@@ -1,23 +1,25 @@
var dirname = __dirname; var dirname = __dirname
var dir = 'file://' + __dirname; var dir = 'file://' + __dirname
var base = dir + '/view/'; var base = dir + '/view/'
// Electronのモジュール // Electronのモジュール
const electron = require("electron"); const electron = require('electron')
const fs = require("fs");
const language = require('./main/language.js');
const css = require('./main/css.js');
const dl = require('./main/dl.js');
const img = require('./main/img.js');
const np = require('./main/np.js');
const systemFunc = require('./main/system.js');
const Menu = electron.Menu
const join = require('path').join;
// アプリケーションをコントロールするモジュール // アプリケーションをコントロールするモジュール
const app = electron.app; const app = electron.app
// Electronの初期化完了後に実行
app.on('ready', createWindow)
const fs = require('fs')
const language = require('./main/language.js')
const css = require('./main/css.js')
const dl = require('./main/dl.js')
const img = require('./main/img.js')
const np = require('./main/np.js')
const systemFunc = require('./main/system.js')
const Menu = electron.Menu
const join = require('path').join
// ウィンドウを作成するモジュール // ウィンドウを作成するモジュール
const BrowserWindow = electron.BrowserWindow; const BrowserWindow = electron.BrowserWindow
// メインウィンドウはGCされないようにグローバル宣言 // メインウィンドウはGCされないようにグローバル宣言
let mainWindow; let mainWindow
// アプリが多重起動しないようにする // アプリが多重起動しないようにする
const gotTheLock = app.requestSingleInstanceLock() const gotTheLock = app.requestSingleInstanceLock()
@@ -29,212 +31,307 @@ if (!gotTheLock) {
// 多重起動を試みた場合、既に存在するウィンドウにフォーカスを移す // 多重起動を試みた場合、既に存在するウィンドウにフォーカスを移す
// Someone tried to run a second instance, we should focus our window. // Someone tried to run a second instance, we should focus our window.
if (mainWindow) { if (mainWindow) {
if (mainWindow.isMinimized()) mainWindow.restore() if (mainWindow.isMinimized()) mainWindow.restore()
mainWindow.focus() mainWindow.focus()
} }
}) })
} }
if (process.argv.indexOf("--dev") === -1) { // 全てのウィンドウが閉じたら終了
var packaged = true; app.on('window-all-closed', function () {
} else { electron.session.defaultSession.clearCache(() => {})
var packaged = false; app.quit()
console.log( })
"||\\\\\\ \n"+
"|||| \\\\\\\\ \n"+
"|||| \\\\\\\\ \n"+
"|||| Am I a \\\\\\\\ \n"+
"|||| cat? ^ ^ \\\\\\\\\\ _____ _ ____ _ \n"+
"|||| (.-.) \\\\\\\\\\ |_ _| |__ ___| _ \\ ___ ___| | __\n"+
"|||| ___> ) ||||| | | | '_ \\ / _ \\ | | |/ _ \\/ __| |/ /\n"+
"|||| < _ _) ////// | | | | | | __/ |_| | __/\__ \\ < \n"+
"|||| |_||_| ///// |_| |_| |_|\\___|____/ \\___||___/_|\\_\\ \n"+
"|||| ///// \n"+
"|||| /////\n"+
"|||| /////\n"+
"||||//////"
)
console.log("Welcome!")
}
var info_path = join(app.getPath("userData"), "window-size.json");
var max_info_path = join(app.getPath("userData"), "max-window-size.json");
var lang_path = join(app.getPath("userData"), "language");
var ha_path = join(app.getPath("userData"), "hardwareAcceleration");
try {
fs.readFileSync(ha_path, 'utf8');
app.disableHardwareAcceleration()
if(!packaged) console.log("disabled: Hardware Acceleration");
} catch{
if(!packaged) console.log("enabled: Hardware Acceleration");
}
var window_size;
try {
window_size = JSON.parse(fs.readFileSync(info_path, 'utf8'));
} catch (e) {
window_size = {
width: 1000,
height: 750
}; // デフォルトバリュー
}
var max_window_size;
try {
max_window_size = JSON.parse(fs.readFileSync(max_info_path, 'utf8'));
} catch (e) {
max_window_size = {
width: "string",
height: "string",
x: "string",
y: "string"
}; // デフォルトバリュー
}
function isFile(file) { function isFile(file) {
try { try {
fs.statSync(file); fs.statSync(file)
return true return true
} catch (err) { } catch (err) {
if (err.code === 'ENOENT') return false if (err.code === 'ENOENT') return false
} }
} }
// 全てのウィンドウが閉じたら終了
app.on('window-all-closed', function () {
if (process.platform != 'darwin') {
electron.session.defaultSession.clearCache(() => { })
app.quit();
}
});
// macOSでウィンドウを閉じた後に再度開けるようにする
app.on('activate', function () {
if (mainWindow == null) {
createWindow();
}
});
function createWindow() { function createWindow() {
var lang_path = join(app.getPath('userData'), 'language')
if (isFile(lang_path)) { if (isFile(lang_path)) {
var lang = fs.readFileSync(lang_path, 'utf8'); var lang = fs.readFileSync(lang_path, 'utf8')
} else { } else {
var langs = app.getLocale(); var langs = app.getLocale()
console.log(langs); console.log(langs)
if (~langs.indexOf("ja")) { if (~langs.indexOf('ja')) {
lang = "ja"; lang = 'ja'
} else if (~langs.indexOf("de")) { } else if (~langs.indexOf('de')) {
lang = "de"; lang = 'de'
} else if (~langs.indexOf("cs")) { } else if (~langs.indexOf('cs')) {
lang = "cs"; lang = 'cs'
} else if (~langs.indexOf("bg")) { } else if (~langs.indexOf('bg')) {
lang = "bg"; lang = 'bg'
} else { } else {
lang = "en"; lang = 'en'
} }
fs.mkdir(app.getPath("userData"), function (err) { fs.mkdir(app.getPath('userData'), function (err) {
fs.writeFileSync(lang_path, lang); fs.writeFileSync(lang_path, lang)
}); })
}
if (!packaged) console.log('your lang:' + app.getLocale())
if (!packaged) console.log('launch:' + lang)
//Opening
const package = fs.readFileSync(__dirname + '/package.json')
if(lang == 'ja') {
const maxims = JSON.parse(fs.readFileSync(__dirname + '/maxim.ja.json'))
var show = maxims[Math.floor(Math.random() * maxims.length)]
} else if(lang == 'ja-KS') {
//ja-KSも作れたらいいね
const maxims = JSON.parse(fs.readFileSync(__dirname + '/maxim.ja.json'))
var show = maxims[Math.floor(Math.random() * maxims.length)]
} else{
var show = 'TheDesk 2018'
}
const data = JSON.parse(package)
const version = data.version
const codename = data.codename
var openingWindow = new BrowserWindow({
width: 300,
height: 400,
transparent: false,
frame: false,
resizable: false,
})
openingWindow.loadURL(`${__dirname}/opening.html?ver=${version}&codename=${codename}&maxim=${encodeURI(show)}`)
if (process.argv.indexOf('--dev') === -1) {
var packaged = true
} else {
var packaged = false
console.log(
'||\\\\\\ \n' +
'|||| \\\\\\\\ \n' +
'|||| \\\\\\\\ \n' +
'|||| Am I a \\\\\\\\ \n' +
'|||| cat? ^ ^ \\\\\\\\\\ _____ _ ____ _ \n' +
'|||| (.-.) \\\\\\\\\\ |_ _| |__ ___| _ \\ ___ ___| | __\n' +
"|||| ___> ) ||||| | | | '_ \\ / _ \\ | | |/ _ \\/ __| |/ /\n" +
'|||| < _ _) ////// | | | | | | __/ |_| | __/__ \\ < \n' +
'|||| |_||_| ///// |_| |_| |_|\\___|____/ \\___||___/_|\\_\\ \n' +
'|||| ///// \n' +
'|||| /////\n' +
'|||| /////\n' +
'||||//////'
)
console.log('If it does not show the window, you might forget `npm run construct`.')
}
var info_path = join(app.getPath('userData'), 'window-size.json')
var max_info_path = join(app.getPath('userData'), 'max-window-size.json')
var ha_path = join(app.getPath('userData'), 'hardwareAcceleration')
var ua_path = join(app.getPath('userData'), 'useragent')
var frame_path = join(app.getPath('userData'), 'frame')
try {
fs.readFileSync(ha_path, 'utf8')
app.disableHardwareAcceleration()
if (!packaged) console.log('disabled: Hardware Acceleration')
} catch {
if (!packaged) console.log('enabled: Hardware Acceleration')
}
var window_size
try {
window_size = JSON.parse(fs.readFileSync(info_path, 'utf8'))
} catch (e) {
window_size = {
width: 1000,
height: 750,
} // デフォルトバリュー
}
var max_window_size
try {
max_window_size = JSON.parse(fs.readFileSync(max_info_path, 'utf8'))
} catch (e) {
max_window_size = {
width: 'string',
height: 'string',
x: 'string',
y: 'string',
} // デフォルトバリュー
}
try {
var frameRaw = fs.readFileSync(frame_path, 'utf8')
if (frameRaw == 'false') {
var frame = false
var frameTitle = 'hidden'
} else {
var frame = true
var frameTitle = 'default'
}
} catch {
var frame = true
} }
if(!packaged) console.log("your lang:" + app.getLocale());
if(!packaged) console.log("launch:" + lang);
// メイン画面の表示。ウィンドウの幅、高さを指定できる // メイン画面の表示。ウィンドウの幅、高さを指定できる
var platform = process.platform; var platform = process.platform
var bit = process.arch; var bit = process.arch
if (platform == "linux") { var arg = {
var arg = { webPreferences: {
webPreferences: { webviewTag: true,
webviewTag: true, nodeIntegration: false,
nodeIntegration: false, contextIsolation: true,
contextIsolation: true, preload: join(__dirname, 'js', 'platform', 'preload.js'),
preload: join(__dirname, "js", "platform", "preload.js") },
}, width: window_size.width,
width: window_size.width, height: window_size.height, x: window_size.x, y: window_size.y, icon: __dirname + '/desk.png', show: false height: window_size.height,
} x: window_size.x,
} else if (platform == "win32") { y: window_size.y,
var arg = { show: false,
webPreferences: { frame: frame,
webviewTag: true,
nodeIntegration: false,
contextIsolation: true,
preload: join(__dirname, "js", "platform", "preload.js")
},
width: window_size.width, height: window_size.height, x: window_size.x, y: window_size.y, simpleFullscreen: true, show: false
}
} else if (platform == "darwin") {
var arg = {
webPreferences: {
webviewTag: true,
nodeIntegration: false,
contextIsolation: true,
preload: join(__dirname, "js", "platform", "preload.js")
},
width: window_size.width, height: window_size.height, x: window_size.x, y: window_size.y, simpleFullscreen: true, show: false
}
} }
mainWindow = new BrowserWindow(arg); if (platform == 'linux') {
arg.resizable = true
arg.icon = __dirname + '/desk.png'
} else if (platform == 'win32') {
arg.simpleFullscreen = true
} else if (platform == 'darwin') {
arg.simpleFullscreen = true
arg.titleBarStyle = frameTitle
}
mainWindow = new BrowserWindow(arg)
mainWindow.once('page-title-updated', () => { mainWindow.once('page-title-updated', () => {
openingWindow.close()
mainWindow.show() mainWindow.show()
console.log('Accessibility: ' + app.accessibilitySupportEnabled)
if (window_size.max) { if (window_size.max) {
mainWindow.maximize(); mainWindow.maximize()
} }
}) })
electron.session.defaultSession.clearCache(() => { }) if (!packaged) mainWindow.toggleDevTools()
electron.session.defaultSession.clearCache(() => {})
if (process.argv) { if (process.argv) {
if (process.argv[1]) { if (process.argv[1]) {
var m = process.argv[1].match(/([a-zA-Z0-9]+)\/\?[a-zA-Z-0-9]+=(.+)/); var m = process.argv[1].match(/([a-zA-Z0-9]+)\/\?[a-zA-Z-0-9]+=(.+)/)
if (m) { if (m) {
var mode = m[1]; var mode = m[1]
var code = m[2]; var code = m[2]
var plus = '?mode=' + mode + '&code=' + code; var plus = '?mode=' + mode + '&code=' + code
} else { } else {
var plus = ""; var plus = ''
} }
} else { } else {
var plus = ""; var plus = ''
} }
} else { } else {
var plus = ""; var plus = ''
} }
mainWindow.loadURL(base + lang + '/index.html' + plus); var ua
try {
ua = fs.readFileSync(ua_path, 'utf8')
} catch (e) {
//default UA Example:
// Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) thedesk/18.11.3 Chrome/76.0.3809.146 Electron/6.0.12 Safari/537.36
const crypto = require('crypto')
const N = 100
var ua = 'Mastodon client: ' + crypto.randomBytes(N).toString('base64').substring(0, N)
}
mainWindow.loadURL(base + lang + '/index.html' + plus, { userAgent: ua })
if (!window_size.x && !window_size.y) { if (!window_size.x && !window_size.y) {
mainWindow.center(); mainWindow.center()
} }
// ウィンドウが閉じられたらアプリも終了 // ウィンドウが閉じられたらアプリも終了
mainWindow.on('closed', function () { mainWindow.on('closed', function () {
electron.ipcMain.removeAllListeners(); electron.ipcMain.removeAllListeners()
mainWindow = null; mainWindow = null
}); })
mainWindow.on('close', function () { closeArg = false
mainWindow.on('close', function (e, arg) {
writePos(mainWindow)
if (!closeArg) {
e.preventDefault()
}
const promise = new Promise(function (resolve) {
mainWindow.webContents.send('asReadEnd', '')
setTimeout(function () {
resolve()
}, 3000)
})
promise.then(function (response) {
closeArg = true
mainWindow.close()
})
})
electron.ipcMain.on('sendMarkersComplete', function (e, arg) {
closeArg = true
mainWindow.close()
})
function writePos(mainWindow) {
if ( if (
max_window_size.width == mainWindow.getBounds().width && max_window_size.width == mainWindow.getBounds().width &&
max_window_size.height == mainWindow.getBounds().height && max_window_size.height == mainWindow.getBounds().height &&
max_window_size.x == mainWindow.getBounds().x && max_window_size.x == mainWindow.getBounds().x &&
max_window_size.y == mainWindow.getBounds().y max_window_size.y == mainWindow.getBounds().y
) { ) {
var size = { width: mainWindow.getBounds().width, height: mainWindow.getBounds().height, x: mainWindow.getBounds().x, y: mainWindow.getBounds().y, max: true } var size = {
width: mainWindow.getBounds().width,
height: mainWindow.getBounds().height,
x: mainWindow.getBounds().x,
y: mainWindow.getBounds().y,
max: true,
}
} else { } else {
var size = { width: mainWindow.getBounds().width, height: mainWindow.getBounds().height, x: mainWindow.getBounds().x, y: mainWindow.getBounds().y } var size = {
width: mainWindow.getBounds().width,
height: mainWindow.getBounds().height,
x: mainWindow.getBounds().x,
y: mainWindow.getBounds().y,
}
} }
fs.writeFileSync(info_path, JSON.stringify(size)); fs.writeFileSync(info_path, JSON.stringify(size))
}); }
mainWindow.on('maximize', function () { mainWindow.on('maximize', function () {
fs.writeFileSync(max_info_path, JSON.stringify(mainWindow.getBounds())); writePos(mainWindow)
}); fs.writeFileSync(max_info_path, JSON.stringify(mainWindow.getBounds()))
})
mainWindow.on('minimize', function () {
writePos(mainWindow)
mainWindow.webContents.send('asRead', '')
})
var platform = process.platform; var platform = process.platform
var bit = process.arch; var bit = process.arch
Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang, mainWindow, packaged, dir, dirname))); Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang, mainWindow, packaged, dir, dirname, frame)))
if (!frame) {
mainWindow.setMenu(null)
}
//CSS //CSS
css.css(mainWindow); css.css(mainWindow)
//アップデータとダウンロード //アップデータとダウンロード
dl.dl(mainWindow, lang_path, base, dirname); dl.dl(mainWindow, lang_path, base, dirname)
//画像選択と画像処理 //画像選択と画像処理
img.img(mainWindow, dir); img.img(mainWindow, dir)
//NowPlaying //NowPlaying
np.TheDeskNowPlaying(mainWindow); np.TheDeskNowPlaying(mainWindow)
//その他system //その他system
systemFunc.system(mainWindow, dir, lang, dirname); systemFunc.system(mainWindow, dir, lang, dirname)
setInterval(function () {
mouseTrack(mainWindow)
}, 1000)
}
var x = 0
var y = 0
var unchanged = 0
var locked = false
function mouseTrack(mainWindow) {
let mousePos = electron.screen.getCursorScreenPoint()
let xNow = mousePos.x
let yNow = mousePos.x
if (x != xNow || y != yNow) {
unchanged = 0
locked = false
} else {
unchanged++
if (unchanged > 60 && !locked) {
unchanged = 0
locked = true
mainWindow.webContents.send('asRead', '')
}
}
x = xNow
y = yNow
} }
// Electronの初期化完了後に実行
app.on('ready', createWindow);
var onError = function (err, response) {
console.error(err, response);
};
app.setAsDefaultProtocolClient('thedesk') app.setAsDefaultProtocolClient('thedesk')

View File

@@ -23,7 +23,7 @@ function css(mainWindow) {
ipc.on('theme-json-create', function (e, arg) { ipc.on('theme-json-create', function (e, arg) {
var themecss = join(app.getPath("userData"), JSON5.parse(arg)["id"] + var themecss = join(app.getPath("userData"), JSON5.parse(arg)["id"] +
".thedesktheme"); ".thedesktheme");
fs.writeFileSync(themecss, JSON.stringify(JSON5.parse(arg))); fs.writeFileSync(themecss, JSON5.stringify(JSON5.parse(arg)));
if (JSON5.parse(arg)["id"]) { if (JSON5.parse(arg)["id"]) {
e.sender.webContents.send('theme-json-create-complete', ""); e.sender.webContents.send('theme-json-create-complete', "");
} else { } else {
@@ -31,83 +31,246 @@ function css(mainWindow) {
} }
}) })
ipc.on('theme-json-delete', function (e, arg) { ipc.on('theme-json-delete', function (e, arg) {
var themecss = join(app.getPath("userData"), arg + ".thedesktheme"); try{
console.log(themecss); var themecss = join(app.getPath("userData"), arg);
fs.unlink(themecss, function (err) { console.log(themecss);
e.sender.webContents.send('theme-json-delete-complete', ""); fs.unlink(themecss, function (err) {
}); e.sender.webContents.send('theme-json-delete-complete', "");
});
} catch {
e.sender.webContents.send('theme-json-delete-complete', 'cannot delete');
}
}) })
ipc.on('theme-json-request', function (e, arg) { ipc.on('theme-json-request', function (e, arg) {
var themecss = join(app.getPath("userData"), arg + ".thedesktheme"); try {
var json = JSON.parse(fs.readFileSync(themecss, 'utf8')); var themecss = join(app.getAppPath(), '/source/themes', arg)
e.sender.webContents.send('theme-json-response', json); var raw = fs.readFileSync(themecss, 'utf8')
var json = JSON5.parse(raw)
} catch {
var themecss = join(app.getPath("userData"), arg)
var raw = fs.readFileSync(themecss, 'utf8')
var json = JSON5.parse(raw)
}
e.sender.webContents.send('theme-json-response', [json, raw]);
}) })
ipc.on('theme-css-request', function (e, arg) { ipc.on('theme-css-request', function (e, arg) {
var themecss = join(app.getPath("userData"), arg + ".thedesktheme");
try { try {
var json = JSON.parse(fs.readFileSync(themecss, 'utf8')); var themecss = join(app.getAppPath(), '/source/themes', arg)
var json = JSON5.parse(fs.readFileSync(themecss, 'utf8'))
} catch {
var themecss = join(app.getPath("userData"), arg)
var json = JSON5.parse(fs.readFileSync(themecss, 'utf8'))
}
var primary = json.vars.primary; try {
var secondary = json.vars.secondary; var css
var text = json.vars.text; if (json.version) {
if (json.base == "light") { var bg = json.primary.background
var drag = "rgba(255, 255, 255, 0.8)"; var subcolor = json.primary.subcolor
var beforehover = "#757575"; var text = json.primary.text
var selected = "#3f3f3f" var accent = json.primary.accent
var selectedWithShare = "#b2babd" if (json.base == "light") {
var gray = "#757575" var drag = "rgba(255, 255, 255, 0.8)";
} else { var beforehover = "#757575";
var drag = "rgba(0, 0, 0, 0.8)"; var selected = "#3f3f3f"
var beforehover = "#9e9e9e"; var selectedWithShare = "#b2babd"
var selected = "#c0c0c0" var gray = "#757575"
var selectedWithShare = "#003a30" var hisData = 'rgba(255, 255, 255, 0.9)'
var gray = "#cccccc"
}
if (json.props) {
if (json.props.TheDeskAccent) {
var emphasized = json.props.TheDeskAccent
} else { } else {
var emphasized = secondary; var drag = "rgba(0, 0, 0, 0.8)";
var beforehover = "#9e9e9e";
var selected = "#c0c0c0"
var selectedWithShare = "#003a30"
var gray = "#cccccc"
var hisData = 'rgba(0, 0, 0, 0.8)'
}
if (!json.advanced) {
json.advanced = {}
}
if (json.advanced.modal) {
var modal = json.advanced.modal
} else {
var modal = bg
}
if (json.advanced.modalFooter) {
var modalFooter = json.advanced.modalFooter
} else {
var modalFooter = bg
if (modal != bg) modalFooter = modal
}
if (json.advanced.thirdColor) {
var thirdColor = json.advanced.thirdColor
} else {
var thirdColor = subcolor
}
if (json.advanced.forthColor) {
var forthColor = json.advanced.forthColor
} else {
var forthColor = subcolor
if (thirdColor != subcolor) forthColor = thirdColor
}
if (json.advanced.bottom) {
var bottom = json.advanced.bottom
} else {
var bottom = subcolor
}
if (json.advanced.emphasized) {
var emphasized = json.advanced.emphasized
} else {
var emphasized = accent
}
if (json.advanced.postbox) {
var postbox = json.advanced.postbox
} else {
var postbox = subcolor
}
if (json.advanced.active) {
var active = json.advanced.active
} else {
var active = accent
}
if (json.advanced.selected) {
var selected = json.advanced.selected
}
if (json.advanced.selectedWithShare) {
var selectedWithShare = json.advanced.selectedWithShare
} }
} else {
var emphasized = primary;
}
var css = ".customtheme {--bg:" + secondary + ";--drag:" + drag + ";" + var css = ":root {--bg:" + bg + ";--drag:" + drag + ";" +
"--color:" + text + ";--beforehover:" + beforehover + ";--modal:" + "--text:" + text + ";--beforehover:" + beforehover + ";--modal:" +
secondary + ";--subcolor:" + primary + ";--box:" + primary + modal + ";--thirdColor:" + thirdColor + ";--subcolor:" + forthColor +
";--sidebar:" + primary + ";--shared:" + emphasized + ";" + ";--bottom:" + bottom + ";--accent:" + accent + ";" + ";--emphasized:" + emphasized + ";--his-data:" +
"--notfbox:" + secondary + ";--emphasized:" + primary + ";--his-data:" + hisData +
secondary + ";--active:" + active + ";--postbox:" + postbox + ";--modalfooter:" +
";--active:" + primary + ";--postbox:" + primary + ";--modalfooter:" + modalFooter + ";--selected:" + selected + ";--selectedWithShare:" + selectedWithShare +
primary + "--gray:" + gray + ";}" +
";--accentbtn:" + primary + ";--selected:" + selected + ";--selectedWithShare:" + selectedWithShare + "}"+ ".customtheme #imagemodal{background: url(\"../img/pixel.svg\");}";
"--gray:" + gray + ";"+ } else {
".customtheme #imagemodal{background: url(\"../img/pixel.svg\");}"; var css = compatibleTheme(json)
}
e.sender.webContents.send('theme-css-response', css); e.sender.webContents.send('theme-css-response', css);
} catch (e) { } catch (e) {
var css = ""; var css = "";
} }
}) })
ipc.on('theme-json-list', function (e, arg) { function compatibleTheme(json) {
fs.readdir(app.getPath("userData"), function (err, files) { var primary = json.vars.primary;
if (err) throw err; var secondary = json.vars.secondary;
var fileList = files.filter(function (file) { var text = json.vars.text;
var tfile = join(app.getPath("userData"), file); if (json.base == "light") {
return fs.statSync(tfile).isFile() && /.*\.thedesktheme$/.test(tfile); //絞り込み var drag = "rgba(255, 255, 255, 0.8)";
}) var beforehover = "#757575";
var themes = []; var selected = "#3f3f3f"
for (var i = 0; i < fileList.length; i++) { var selectedWithShare = "#b2babd"
var themecss = join(app.getPath("userData"), fileList[i]); var gray = "#757575"
var json = JSON.parse(fs.readFileSync(themecss, 'utf8')); } else {
themes.push({ var drag = "rgba(0, 0, 0, 0.8)";
name: json.name, var beforehover = "#9e9e9e";
id: json.id var selected = "#c0c0c0"
}) var selectedWithShare = "#003a30"
var gray = "#cccccc"
}
if (json.advanced) {
if (json.advanced.TheDeskAccent) {
var emphasized = json.advanced.TheDeskAccent
} else {
var emphasized = secondary
} }
e.sender.webContents.send('theme-json-list-response', themes); if (json.advanced.TheDeskActive) {
}); var active = json.advanced.TheDeskActive
} else {
var active = primary
}
if (json.advanced.TheDeskModal) {
var modal = json.advanced.TheDeskModal
} else {
var modal = secondary
}
if (json.advanced.TheDeskBottom) {
var bottom = json.advanced.TheDeskBottom
} else {
var bottom = primary
}
if (json.advanced.TheDeskPostbox) {
var postbox = json.advanced.TheDeskPostbox
} else {
var postbox = primary
}
if (json.advanced.TheDeskSubcolor) {
var subcolor = json.advanced.TheDeskSubcolor
} else {
var subcolor = primary
}
} else {
var emphasized = primary
var acs = secondary
var active = primary
var modal = secondary
var bottom = primary
var postbox = primary
var subcolor = primary
}
var css = ".customtheme {--bg:" + secondary + ";--drag:" + drag + ";" +
"--text:" + text + ";--beforehover:" + beforehover + ";--modal:" +
modal + ";--thirdColor:" + subcolor + ";--subcolor:" + subcolor +
";--bottom:" + bottom + ";--accent:" + emphasized + ";" +
"--subcolor:" + secondary + ";--emphasized:" + active + ";--his-data:" +
secondary +
";--active:" + active + ";--postbox:" + postbox + ";--modalfooter:" +
primary +
";--active:" + subcolor + ";--selected:" + selected + ";--selectedWithShare:" + selectedWithShare + "}" +
"--gray:" + gray + ";" +
".customtheme #imagemodal{background: url(\"../img/pixel.svg\");}";
return css
}
ipc.on('theme-json-list', function (e, arg) {
var files1 = fs.readdirSync(join(app.getAppPath(), '/source/themes'))
var file1List = files1.filter(function (file) {
if (file.match(/\.thedesktheme$/)) {
var tfile = join(app.getAppPath(), '/source/themes', file)
return fs.statSync(tfile).isFile() && /.*\.thedesktheme$/.test(tfile)
} else {
return null
}
})
var themes = [];
for (var i = 0; i < file1List.length; i++) {
var themecss = join(app.getAppPath(), '/source/themes', file1List[i]);
var json = JSON5.parse(fs.readFileSync(themecss, 'utf8'));
let compat = true
if (json.version) compat = false
themes.push({
name: json.name,
id: json.id,
compatible: compat,
default: true
})
}
var files2 = fs.readdirSync(app.getPath("userData"))
var file2List = files2.filter(function (file) {
if (file.match(/\.thedesktheme$/)) {
var tfile = join(app.getPath("userData"), file)
return fs.statSync(tfile).isFile() && /.*\.thedesktheme$/.test(tfile)
} else {
return null
}
})
for (var i = 0; i < file2List.length; i++) {
var themecss = join(app.getPath("userData"), file2List[i]);
var json = JSON5.parse(fs.readFileSync(themecss, 'utf8'));
let compat = true
if (json.version) compat = false
themes.push({
name: json.name,
id: json.id,
compatible: compat,
default: false
})
}
e.sender.webContents.send('theme-json-list-response', themes);
}) })
} }
exports.css = css; exports.css = css;

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