File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed
Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 1414 "ru" : " Смотрите аниме онлайн на русском"
1515 },
1616 "url" : " anilib.me" ,
17- "version" : " 1.0.9 " ,
17+ "version" : " 1.0.10 " ,
1818 "logo" : " https://cdn.rcd.gg/PreMiD/websites/A/AnimeLib/assets/logo.png" ,
1919 "thumbnail" : " https://cdn.rcd.gg/PreMiD/websites/A/AnimeLib/assets/thumbnail.png" ,
2020 "color" : " #A020F0" ,
2929 "settings" : [
3030 {
3131 "id" : " privacy" ,
32- "title" : " Privacy Mode " ,
32+ "title" : " Приватный режим " ,
3333 "icon" : " fad fa-shield-alt" ,
3434 "value" : false
3535 },
3636 {
3737 "id" : " buttons" ,
38- "title" : " Show Buttons " ,
38+ "title" : " Показывать кнопки " ,
3939 "icon" : " fas fa-compress-arrows-alt" ,
4040 "value" : true
4141 },
4242 {
4343 "id" : " titleAsPresence" ,
44- "title" : " Show Anime Title As Presence " ,
44+ "title" : " Отображать название аниме как название Презенса " ,
4545 "icon" : " fad fa-user-edit" ,
4646 "value" : false
4747 }
Original file line number Diff line number Diff line change @@ -23,6 +23,25 @@ enum ActivityAssets {
2323 Pause = 'https://cdn.rcd.gg/PreMiD/resources/pause.png' ,
2424}
2525
26+ type RouteName =
27+ | ''
28+ | 'anime'
29+ | 'characters'
30+ | 'people'
31+ | 'catalog'
32+ | 'user'
33+ | 'top-views'
34+ | 'collections'
35+ | 'reviews'
36+ | 'team'
37+ | 'franchise'
38+ | 'publisher'
39+ | 'media'
40+ | 'news'
41+ | 'faq'
42+ | 'messages'
43+ | 'downloads'
44+
2645interface IFrameVideo {
2746 duration : number
2847 currentTime : number
@@ -61,6 +80,7 @@ presence.on('UpdateData', async () => {
6180 presence . getSetting < boolean > ( 'titleAsPresence' ) ,
6281 ] )
6382 const path = document . location . pathname
83+ const route = < RouteName > `${ path } /` . split ( '/' ) [ 2 ]
6484
6585 let animeData : AnimeData ,
6686 userData : UserData ,
@@ -71,7 +91,7 @@ presence.on('UpdateData', async () => {
7191 teamData : TeamData ,
7292 publisherData : PublisherData
7393
74- switch ( ` ${ path } /` . split ( '/' ) [ 2 ] ) {
94+ switch ( route ) {
7595 case '' :
7696 presenceData . details = 'Главная страница'
7797 presenceData . state = 'Так внимательно изучает...'
You can’t perform that action at this time.
0 commit comments