Anistar custom style

Тема для сайта anistar

  1. // ==UserScript==
  2. // @noframes
  3. // @name Anistar custom style
  4. // @description Тема для сайта anistar
  5. // @author DygDyg
  6. // @homepage http://dygdyg.ddns.net
  7. // @include /^https?://(.*).online-star(.*)\.org/.*$/
  8. // @include /^https?://(.*)anistar(.*)\.org/.*$/
  9. // @run-at document-start
  10. // @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
  11. // @icon https://cdn.discordapp.com/attachments/483711805529653268/609561809799872545/favicon2.png
  12. // @require https://greatest.deepsurf.us/scripts/397029-moment-with-locales/code/moment-with-locales.js
  13. // @require https://greatest.deepsurf.us/scripts/397028-moment/code/moment.js
  14. // @grant GM_setValue
  15. // @grant GM_getValue
  16. // @grant GM_addStyle
  17. // @grant GM_notification
  18. // @grant GM_info
  19. // @grant GM_registerMenuCommand
  20. // @version 0.47.12
  21. // @namespace https://greatest.deepsurf.us/users/303755
  22. // ==/UserScript==
  23.  
  24.  
  25.  
  26.  
  27. var $ = window.jQuery;
  28. ////////////////////////////////
  29.  
  30. if (GM_getValue('background', null) == null) GM_setValue('background', '');
  31. if (GM_getValue('enable_push', null) == null) GM_setValue('enable_push', false);
  32. if (GM_getValue('torrent_start', null) == null) GM_setValue('torrent_start', false);
  33.  
  34.  
  35. var ver_info = '2';
  36. var _label = 'Нововведения:';
  37. var _info = 'Добавил в меню настроке пункты включения пуш уведомлений и автопереключения на вкладку "скачать"';
  38.  
  39.  
  40. $(document).ready(function () {
  41. //menu();
  42. })
  43.  
  44.  
  45. var pazl = encodeURIComponent('<svg height="512pt" viewBox="0 -27 512.001 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m448.285156 329.226562 63.714844-63.710937-63.714844-63.714844 10.265625-10.265625c17.761719-17.761718 17.761719-46.660156.003907-64.421875-8.605469-8.601562-20.046876-13.339843-32.214844-13.339843-12.164063 0-23.605469 4.738281-32.207032 13.339843l-10.265624 10.265625-63.714844-63.714844-18.800782 18.804688v29.71875c33.257813 7.925781 58.066407 37.890625 58.066407 73.539062 0 35.652344-24.808594 65.617188-58.066407 73.539063v92.152344h-55.15625l-10.996093 10.996093 84.953125 84.949219 63.714844-63.714843 8.847656 8.851562c17.761718 17.761719 46.660156 17.761719 64.421875 0s17.761719-46.660156 0-64.421875zm0 0"/><path d="m271.316406 331.386719v-90.105469h12.511719c25.121094 0 45.554687-20.433594 45.554687-45.554688 0-25.117187-20.433593-45.550781-45.554687-45.550781h-12.511719v-90.105469h-90.105468v-14.515624c0-25.121094-20.433594-45.554688-45.554688-45.554688-25.117188 0-45.550781 20.433594-45.550781 45.554688v14.515624h-90.105469v90.105469h12.515625c22.039063 0 40.46875 15.730469 44.65625 36.554688 1.816406 2.539062 2.898437 5.640625 2.898437 8.996093 0 3.355469-1.082031 6.457032-2.898437 9-4.1875 20.820313-22.617187 36.554688-44.65625 36.554688h-12.515625v90.105469h90.105469v-14.519531c0-25.117188 20.433593-45.550782 45.550781-45.550782 25.121094 0 45.554688 20.433594 45.554688 45.550782v14.519531zm0 0"/></svg>')
  46.  
  47. var audio = new Audio();
  48. // https://csscolor.ru Палитра цветов
  49.  
  50. //Цвет прозрачной "плёнки" на текущем видео
  51. let RGBA1 = "rgba(69, 152, 255, 0.75)";
  52.  
  53. //Цвет задней подложки
  54. let background2 = "#4a4a4a";
  55. let background1 = "#333333";
  56.  
  57. //Основной цвет сайта
  58. let MainColor = "#1368d1";
  59.  
  60.  
  61.  
  62.  
  63. GM_addStyle(`
  64.  
  65. .b-top-but {
  66. filter: hue-rotate(310deg);
  67. }
  68.  
  69. .title_quote, .title_spoiler {
  70. background: #1368d1 !important;
  71. }
  72.  
  73. .scriptcode,
  74. .title_quote,
  75. .quote,
  76. .title_spoiler,
  77. .text_spoiler
  78. {
  79. border-color: transparent !important;
  80. }
  81.  
  82. .news_header .title_left > a:hover,
  83. .news_text ul a:hover {
  84. color: #bfbebe !important;
  85. }
  86.  
  87. .drowmenu,
  88. header .menu.active > p,
  89. header .menu:hover > p,
  90. header .menu.active > p > span, header .menu:hover > p
  91. {
  92. background-color: ${background2} !important;
  93. }
  94.  
  95. small .news .descripts,
  96. .vide_be > span:hover,
  97. .vide_be > span.actv,
  98. .cat_anime.menu_link .tit_sp a,
  99. .descripts,
  100. .news_header .tags a,
  101. body,
  102. .left-menu ul li a,
  103. header .menu.active > p > span, header .menu:hover > p > span,
  104. .cal-list > span:hover, .cal-list > span.active,
  105. .top-new .janrs,
  106. .text-s p,
  107. .left-menu2 ul li a
  108. {
  109. color: #ffffff !important;
  110. text-shadow: -2px 2px 2px #000 !important;
  111. }
  112.  
  113. .icon-clock span,
  114. .icon-vip span,
  115. .icon-resp span,
  116. .icon-chat span,
  117. .icon-copy span
  118. {
  119. filter: hue-rotate(280deg);
  120. }
  121.  
  122. .list-nav ul li,
  123. .flat_button
  124. {
  125. background-color: ${MainColor} !important;
  126. }
  127.  
  128. .torrent .download, torrent .download a
  129. {
  130. filter: hue-rotate(90deg) !important;
  131. background: #ffffff00 url(https://cdn.discordapp.com/attachments/667612136788328478/673252757150367744/tor_down_03.png) no-repeat top left !important;
  132. }
  133. .torrent .cont,
  134. .torrent .info_d
  135. {
  136. background:transparent !important;
  137. }
  138.  
  139. .pagenav a,
  140. .left-panel-bottom,
  141. .news_header .title_left > a,
  142. .login_nav2 form input[type=submit],
  143. .search-block [type="submit"],
  144. .cal-list,
  145. .mini_nav li.logout a,
  146. .anime_status .block_selected .selected-title,
  147. .status_val::before,
  148. .news_text ul a,
  149. .vide_be > span,
  150. .contain_zerkls span,
  151. .color_t > span,
  152. .mirror_video>span,
  153. .contain_zerkls span,
  154. .select_config ul li:hover,
  155. #playlist_pric > span,
  156. header .menu.active .menu__handle::before,
  157. header .menu.active .menu__handle::after,
  158. header .menu.active .menu__handle span,
  159. header .menu.active > p:hover .menu__handle::before,
  160. header .menu.active > p:hover .menu__handle::after,
  161. header .menu.active > p:hover .menu__handle span,
  162. .panel-bottom-shor .right-panel-bottom > span,
  163. .mybutton,
  164. .color_t.com_links_tab a,
  165. .cat-cal.manga,
  166. .button_c,
  167. .berrors,
  168. .title-3
  169. {
  170. background: ${MainColor} !important;
  171. }
  172.  
  173. .main.wrapper.width1200
  174. {
  175. background-color: #4a4a4ab0 !important;
  176. }
  177.  
  178.  
  179. .prefooter ul li a:hover,
  180. .left-menu2 ul li a:hover,
  181. #news_set_sort a,
  182. .autor_nav a,
  183. .news .descripts a,
  184. .news_text .descripts a,
  185. .video_as a,
  186. .left-menu ul li a:hover,
  187. .text-s h3,
  188. .text-s h1,
  189. .reason,
  190. .views-icon a,
  191. .date-icon a,
  192. .autor-icon a,
  193. .date-icon,
  194. .views-icon,
  195. .news_header .rat_col_new span,
  196. #alert_pric,
  197. .alert-title,
  198. .alert_vip_hd a,
  199. .close-alert,
  200. .news_header .title_left .title a,
  201. .news_header .tags,
  202. .title-6 span,
  203. .dle-confirm.ui-dialog-content.ui-widget-content a,
  204. .as_play_list li:hover .aslist_title,
  205. .panel-tab a.active-tab,
  206. .mini_nav ul li a:hover,
  207. .cal-list > span.active > span,
  208. .janrs .rate .rating .rat_col_new span,
  209. .login_nav2 a:hover,
  210. .cal-list > span:hover > span,
  211. .cal-list > span.active > span,
  212. .news_text ul b,
  213. .plash a,
  214. .right-anime .row-cyber:hover .col-text,
  215. .panel-tab a
  216. {
  217. text-shadow: -1px 1px 2px #000000 !important;
  218. color: ${MainColor} !important;
  219. }
  220.  
  221. .top-w .title-top
  222. {
  223. text-shadow: 0px 0px 0px #000 !important;
  224. -webkit-text-stroke: 0.3px #000;
  225. font-size: 25px;
  226. color: ${MainColor} !important;
  227. }
  228.  
  229.  
  230. #alert_pric
  231. {
  232. border: ${MainColor} 3px solid !important;
  233. }
  234.  
  235. .selected_form.active-s,
  236. .as_play_list li.play_as .aslist_title
  237. {
  238. background:${RGBA1}!important;
  239. }
  240.  
  241. .list-nav ul li:hover a,
  242. .icon-vip:hover span,
  243. .icon-clock:hover span,
  244. .icon-resp:hover span,
  245. .icon-chat:hover span,
  246. .icon-copy:hover span
  247. {
  248. background-position: 0px 18px;
  249. color: ${MainColor} !important;
  250. }
  251.  
  252. .soc,
  253. a[title="Официальный Telegram канал AniStar об аниме"] img
  254. {
  255. height: 0;
  256. width: 0;
  257. }
  258.  
  259. .logo,
  260. .width50.float-left.left1 .logo a,
  261. .vk-top .icon-top:hover,
  262. .profile-top .icon-top
  263. {
  264. /*background: url('https://cdn.discordapp.com/attachments/483711805529653268/609547342256930816/svg-editor-image.svg') no-repeat top left;*/
  265. filter: hue-rotate(-45deg) brightness(145%) !important;
  266. }
  267.  
  268. /*.logo,
  269. .width50.float-left.left1 .logo a
  270. {
  271. background: url('https://cdn.discordapp.com/attachments/483711805529653268/609548039014711296/logo1.png') no-repeat center;*/
  272. filter: hue-rotate(-45deg) brightness(145%);
  273. }*/
  274.  
  275. .avatar
  276. {
  277. border: 2px solid ${MainColor} !important;
  278. }
  279.  
  280. .vip_traf,
  281. .button.ui-button.ui-state-default,
  282. .mini_nav li a:before,
  283. .rating .unit-rating .current-rating,
  284. .top-w .janrs .unit-rating,
  285. .ui-button.ui-state-default
  286. {
  287. filter: hue-rotate(-45deg) brightness(145%) !important;
  288. }
  289.  
  290. .panel-tab a
  291. {
  292. border-bottom: 3px solid ${MainColor} !important;
  293. }
  294.  
  295. .panel-tab a.active-tab
  296. {
  297. border-bottom: 3px solid #FED000 !important;
  298. }
  299.  
  300. .bg-white-main
  301. {
  302. backdrop-filter: blur(3px);
  303. }
  304.  
  305. .UCOWisrw0aLVBW9otEVJiZmA0 a,
  306. .newclasswqasdvsdv .newclasswqasdvsdv2,
  307. .newclasswqasdvsdv .text_vi_sky,
  308. #timeout_autoplay,
  309. .sw_bladeo2,
  310. iframe#brend_iframe,
  311. .eapp-telegram-chat-root-layout-component,
  312. div#TTwitch_remove2
  313. {
  314. display: none !important;
  315. }
  316.  
  317. .new_menu {
  318. background: #00000000 !important;
  319. }
  320.  
  321. /*Тень для объектов*/
  322. .cal-list,
  323. .search-block,
  324. .new_menu,
  325. .news-list,
  326. #page_wrap,
  327. header,
  328. .left-panel-bottom,
  329. .title_left a,
  330. .list-nav ul
  331. {
  332. box-shadow: -12px 10px 7px 3px #00000045;
  333. }
  334.  
  335. `);
  336.  
  337. function background() {
  338. GM_addStyle(`
  339. html
  340. {
  341. background: url(${GM_getValue('background')}) ${background1};
  342. background-attachment: fixed;
  343. background-size: 100%;
  344. }
  345.  
  346. `);
  347. }
  348.  
  349. background();
  350.  
  351.  
  352.  
  353. $(document).ready(function () {
  354. $('body').prepend($('<div>', { id: 'pazl', 'data-tooltip': 'Настройки', style: 'filter: grayscale(1);' }).mouseover(function (eventObject) {
  355. $('#pazl').css({ filter: 'grayscale(0)' })
  356. }).mouseout(function (eventObject) {
  357. $('#pazl').css({ filter: 'grayscale(1)' })
  358. }))
  359. $('body').prepend($('<div>', { id: 'tooltip' }))
  360.  
  361.  
  362. $("[data-tooltip]").mousemove(function (eventObject) {
  363.  
  364. $data_tooltip = $(this).attr("data-tooltip");
  365.  
  366. $("#tooltip").text($data_tooltip)
  367. .css({
  368. "top": eventObject.pageY + 5,
  369. "left": eventObject.pageX - 100
  370. })
  371. .show();
  372.  
  373.  
  374. }).mouseout(function () {
  375.  
  376. $("#tooltip").hide()
  377. .text("")
  378. .css({
  379. "top": 0,
  380. "left": 0
  381. });
  382. }).on('click', () => {
  383. menu();
  384. });
  385. });
  386.  
  387. GM_addStyle(`
  388. #pazl
  389. {
  390. width: 64px;
  391. height: 64px;
  392. position: fixed;
  393. z-index: 9999999;
  394. top: 72px;
  395. right: -3px;
  396. cursor: pointer;
  397. transition: filter 0.5s;
  398. backdrop-filter: blur(3px);
  399. border-radius: 10px 0px 0px 10px;
  400. border-style: solid;
  401. border-color: #1368d1;
  402. box-shadow: -8px 8px 10px 4px #0000006e;
  403. background-size: 100%;
  404. background-color: #ffffff1a;
  405. background-image: url(https://www.pinclipart.com/picdir/big/413-4136396_clipart-of-cedar-puzzle-icon-png-download.png?width=60&height=60);
  406. }
  407.  
  408. #tooltip {
  409. z-index: 999999999;
  410. position: absolute;
  411. display: none;
  412. top:0px;
  413. left:0px;
  414. background-color: #000;
  415. padding: 5px 10px 5px 10px;
  416. color: white;
  417. opacity: 0.6;
  418. border-radius: 5px;
  419. }
  420.  
  421. .top-w > div,
  422. .top-w > div:hover > a,
  423. .news_avatar img,
  424. .main-cal
  425. {
  426. box-shadow: -8px 8px 10px 4px #0000006e;
  427. border-radius: 15px;
  428. border-color: #054a9e;
  429. }
  430.  
  431. .top-w > div,
  432. .news_avatar img,
  433. .main-cal
  434. {
  435. /*border-style: solid;*/
  436. }
  437.  
  438. .top-w > div .timer_cal,
  439. .anime_title_cal
  440. {
  441. border-radius: 0 0 11px 11px;
  442. backdrop-filter: blur(1px);
  443. }
  444.  
  445. div#nextserial {
  446. border-radius: 0 0 11px 11px;
  447. bottom: 7px;
  448. backdrop-filter: blur(1px);
  449. }
  450. `);
  451.  
  452.  
  453. $(document).ready(function () {
  454.  
  455. $('head').append($('<link rel="shortcut icon" type="image/x-icon"/>').attr('href', "https://cdn.discordapp.com/attachments/483711805529653268/609561809799872545/favicon2.png"));
  456. //$('#myDiv').remove();
  457.  
  458. if (GM_getValue('torrent_start') == true) {
  459. click = $("#torrent_all");
  460. if (click.length) click.click();
  461. } else {
  462.  
  463. }
  464.  
  465.  
  466. });
  467.  
  468.  
  469. //#region Модальное окно //стиль
  470. GM_addStyle(`
  471.  
  472. #alert {
  473. background: #000000a3;
  474. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 800 800'%3E%3Cg fill='none' stroke='%23383838' stroke-width='2'%3E%3Cpath d='M769 229L1037 260.9M927 880L731 737 520 660 309 538 40 599 295 764 126.5 879.5 40 599-197 493 102 382-31 229 126.5 79.5-69-63'/%3E%3Cpath d='M-31 229L237 261 390 382 603 493 308.5 537.5 101.5 381.5M370 905L295 764'/%3E%3Cpath d='M520 660L578 842 731 737 840 599 603 493 520 660 295 764 309 538 390 382 539 269 769 229 577.5 41.5 370 105 295 -36 126.5 79.5 237 261 102 382 40 599 -69 737 127 880'/%3E%3Cpath d='M520-140L578.5 42.5 731-63M603 493L539 269 237 261 370 105M902 382L539 269M390 382L102 382'/%3E%3Cpath d='M-222 42L126.5 79.5 370 105 539 269 577.5 41.5 927 80 769 229 902 382 603 493 731 737M295-36L577.5 41.5M578 842L295 764M40-201L127 80M102 382L-261 269'/%3E%3C/g%3E%3Cg fill='%23696969'%3E%3Ccircle cx='769' cy='229' r='8'/%3E%3Ccircle cx='539' cy='269' r='8'/%3E%3Ccircle cx='603' cy='493' r='8'/%3E%3Ccircle cx='731' cy='737' r='8'/%3E%3Ccircle cx='520' cy='660' r='8'/%3E%3Ccircle cx='309' cy='538' r='8'/%3E%3Ccircle cx='295' cy='764' r='8'/%3E%3Ccircle cx='40' cy='599' r='8'/%3E%3Ccircle cx='102' cy='382' r='8'/%3E%3Ccircle cx='127' cy='80' r='8'/%3E%3Ccircle cx='370' cy='105' r='8'/%3E%3Ccircle cx='578' cy='42' r='8'/%3E%3Ccircle cx='237' cy='261' r='8'/%3E%3Ccircle cx='390' cy='382' r='8'/%3E%3C/g%3E%3C/svg%3E");
  475. backdrop-filter: blur(2px);
  476. width: 100%;
  477. height: 100%;
  478. position: fixed;
  479. z-index: 9999999999;
  480. text-align: center;
  481. }
  482.  
  483. #window1 {
  484. background-color: #272727db !important;
  485. width: 300px;
  486. /*height: 120px;*/
  487. border-radius: 4px;
  488. position: absolute;
  489. top: 10%;
  490. left: 50%;
  491. transform: translate(-50%);
  492. padding: 10px 10px 10px 10px;
  493. box-shadow: 7px 7px 3px 3px rgba(0,0,0,.1);
  494. }
  495.  
  496. .stop-scrolling {
  497. height: 100%;
  498. overflow: hidden;
  499. }
  500.  
  501. .theme_button {
  502. display: block;
  503. padding: 7px 16px 8px;
  504. margin: 5px;
  505. font-size: 12.5px;
  506. zoom: 1;
  507. cursor: pointer;
  508. white-space: nowrap;
  509. outline: none;
  510. font-family: -apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,"Noto Sans Armenian","Noto Sans Bengali","Noto Sans Cherokee","Noto Sans Devanagari","Noto Sans Ethiopic","Noto Sans Georgian","Noto Sans Hebrew","Noto Sans Kannada","Noto Sans Khmer","Noto Sans Lao","Noto Sans Osmanya","Noto Sans Tamil","Noto Sans Telugu","Noto Sans Thai",sans-serif;
  511. vertical-align: top;
  512. line-height: 15px;
  513. text-align: center;
  514. text-decoration: none;
  515. background: none;
  516. background-color: #5181b8;
  517. color: #fff;
  518. border: 0;
  519. border-radius: 4px;
  520. box-sizing: border-box;
  521. box-shadow: 7px 7px 3px 3px rgba(0,0,0,.1);
  522. }
  523.  
  524. .theme_button:hover {
  525. background-color: #3b597b;
  526. }
  527.  
  528. #button_check_update:hover {
  529. color: #5181b8;
  530. }
  531.  
  532. div#test1 {
  533. text-align: center;
  534. }
  535.  
  536. div#key {
  537. text-align: center;
  538. margin-bottom: 40px;
  539. }
  540.  
  541. .text {
  542. width: 290px;
  543. cursor: default;
  544. margin: 5px;
  545. box-sizing: border-box;
  546. padding: 7px;
  547. border: none;
  548. border-radius: 2px;
  549. display: flex;
  550. height: 86px;
  551. resize: none;
  552. background: #6b6b6bad !important;
  553. color: white;
  554. box-shadow: 7px 7px 3px 3px rgba(0,0,0,.1);
  555. }
  556.  
  557. div#image {
  558. width: 290px;
  559. height: 180px;
  560. margin: 0 auto;
  561. margin-bottom: 5px;
  562. border-radius: 4px;
  563. }
  564.  
  565. div#cont2 {
  566. text-align: left;
  567. user-select: none;
  568. }
  569. }
  570.  
  571.  
  572. .theme_text_name {
  573. //cursor: pointer;
  574. user-select: none;
  575. font-size: 19px;
  576. line-height: 25px;
  577. font-weight: 400;
  578. -webkit-font-smoothing: subpixel-antialiased;
  579. -moz-osx-font-smoothing: auto;
  580. margin: -1px 0 -1px -1px;
  581. overflow: hidden;
  582. text-overflow: ellipsis;
  583. padding-left: 1px;
  584. color: #fff;
  585. box-shadow: 7px 7px 3px 3px rgba(0,0,0,.1);
  586. }
  587.  
  588. .cont-bottom {
  589. border-bottom: 1px solid #b5b1b191;
  590. }
  591. img.izo {
  592. object-fit: cover;
  593. width: 100%;
  594. height: 100%;
  595. background: url(https://sun9-57.userapi.com/c857620/v857620009/18a5fd/uOxmtZm_L2A.jpg);
  596. background-size: 100%;
  597. border-radius: 3px;
  598. box-shadow: 7px 7px 3px 3px rgba(0,0,0,.1);
  599. }
  600.  
  601.  
  602. `)
  603.  
  604. //#endregion
  605. //#region Модальное окно //логика
  606.  
  607. var newImage;
  608. var on = true;
  609. function menu() {
  610.  
  611. $('body').addClass('stop-scrolling').prepend(
  612. $('<div>', { id: 'alert' }).append(
  613. $('<div>', { id: 'window1' }).append(
  614. $('<div>', {
  615. class: 'cont-bottom', id: 'cont1', html:
  616. [
  617. $('<div>', { class: 'theme_text_name', text: 'Установка фона' }),
  618. $('<div>', { id: 'image' }).append($('<img>', { class: 'izo', src: GM_getValue('background') })),
  619. $('<textarea>', { class: 'text', id: 'text_background', text: GM_getValue('background') }).on('change keyup blur', function (e) {
  620. let URLtext = $('#text_background').val();
  621. $('#image img.izo').attr('src', URLtext);
  622. newImage = URLtext;
  623. })
  624. ]
  625. })).append(
  626. $('<div>', {
  627. class: 'cont-bottom', id: 'cont2', html:
  628. [
  629. $('<input type="checkbox" id="check_torrent" name="cc" data-tooltip="test"/> Вкладка "скачать" по умолчанию<br />').prop('checked', GM_getValue('torrent_start')),
  630. $('<input type="checkbox" id="enable_push" /> Включить пуш уведомления<br />').prop('checked', GM_getValue('enable_push'))
  631. ]
  632. })
  633. ).append(
  634. $('<div>', { class: 'theme_button', id: 'button_save', style: 'margin-top: 10px;', text: 'Сохранить' }).on('click', () => {
  635. newImage = $('#text_background').val();
  636. console.log($('#text_background').val());
  637.  
  638. GM_setValue('torrent_start', $('#check_torrent').prop('checked'));
  639. GM_setValue('background', $('#text_background').val());
  640. GM_setValue('enable_push', $('#enable_push').prop('checked'));
  641.  
  642. $('html').css({ 'background': 'url("' + newImage + '") #2F2F30', 'background-size': '100%', 'background-attachment': 'fixed' });
  643. exit_();
  644. })).append(
  645. $('<div>', { class: 'theme_button', id: 'button_exit', text: 'Закрыть' }).on('click', exit_)).append(
  646. $('<div>', { class: 'theme_text_name', id: 'button_check_update', text: 'Проверить обновление' }).on('click', sites_)
  647. )
  648. )
  649. );
  650. }
  651.  
  652. function sites_() {
  653. window.open("https://greatest.deepsurf.us/ru/scripts/395933-anistar-custom-style");
  654. }
  655.  
  656. function exit_() {
  657. $('#alert').remove();
  658. $('body').removeClass('stop-scrolling');
  659. }
  660. //#endregion
  661.  
  662. if (GM_getValue('ver_info', null) == null) GM_setValue('ver_info', '0');
  663.  
  664. $(document).ready(function () {
  665. if (GM_getValue('ver_info') != ver_info) {
  666. info();
  667. GM_setValue('ver_info', ver_info);
  668. }
  669.  
  670. })
  671.  
  672. function info() {
  673. $('body').addClass('stop-scrolling').prepend(
  674. $('<div>', { id: 'alert' }).append(
  675. $('<div>', { id: 'window1' }).append(
  676. $('<div>', {
  677. class: 'cont-bottom', id: 'cont1', html: [
  678. $('<div>', { class: 'theme_text_name', text: GM_info.script.name + ' ' + GM_info.script.version }),
  679. $('<div>', { class: 'theme_text_name', text: _label }),
  680. ]
  681. })
  682. ).append(
  683. $('<div>', {
  684. class: 'cont-bottom', id: 'cont1', html: [
  685. $('<div>', { style: 'font-size: 14px; text-align: -webkit-auto;', class: 'theme_text_name', text: _info })
  686. ]
  687. })).append(
  688. $('<div>', { class: 'theme_button', id: 'button_exit', text: 'Закрыть' }).on('click', exit_))
  689. )
  690. )
  691. }
  692.  
  693.  
  694.  
  695.  
  696. $(document).ready(function () {
  697. let news = $('.top-w');
  698. if (!news.length) return;
  699. let req = /^\d{2}:\d{2}:\d{2}/i;
  700. let serialy = [];
  701. for (let i = 0; news.length > i; i++) {
  702. let blok = $(news[i]);
  703. let timer = blok.find('.timer_cal').text().trim();
  704. if (req.test(timer)) {
  705. let title = blok.find('.title-top').text().trim();
  706. let imagePreview = blok.children().css("background-image").replace(/url\(|\)|\"|\'/g, '');
  707. let link = blok.find('a').attr('href');
  708. // link = new URL(link)
  709. // console.log(time, title, imagePreview, link);
  710. timer = timer.split(':')
  711. second = parseInt(timer[2]) + (timer[1] * 60) + (timer[0] * 60 * 60);
  712. enable = true;
  713. serialy.push({ title, link, imagePreview, timer, second, enable })
  714. }
  715. }
  716.  
  717.  
  718. var delay_ = 60 * 1000;
  719. var enable_ = true;
  720.  
  721. if (GM_getValue('enable_push') == true) notification();
  722.  
  723. function notification() {
  724. //$('.title-6').css({ color: '#39f941' });
  725. $('.title-6').css({ color: '#e91e63' }).text($('.title-6').text() + '(Пуш включены)');
  726.  
  727. setInterval(function () {
  728. if (!serialy.length) return;
  729. if (GM_getValue('enable_push') == true) {
  730. for (let i = 0; serialy.length > i; i++) {
  731. if (serialy[i].enable == true) {
  732. if (serialy[i].second >= 0) {
  733. serialy[i].second = serialy[i].second - (delay_ / 1000);
  734. } else {
  735. audio.src = 'https://cdn.discordapp.com/attachments/667612136788328478/682908205944537088/z_uk-budte-vkontakte-s-no_ostyami.mp3';
  736. audio.play();
  737. GM_notification({
  738. title: 'Вышла новая серия',
  739. text: serialy[i].title,
  740. image: serialy[i].imagePreview,
  741. onclick: function () {
  742. window.open(serialy[i].link);
  743. }
  744. });
  745. serialy[i].enable = false;
  746. }
  747. }
  748. }
  749. }
  750. }, delay_)
  751.  
  752. }
  753.  
  754. })