-
Notifications
You must be signed in to change notification settings - Fork 0
/
Airdatestv_enhancer.user.js
12996 lines (11801 loc) · 357 KB
/
Airdatestv_enhancer.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ==UserScript==
// @name Airdates.tv enhancer
// @namespace V@no
// @author V@no
// @description 2.5 tons of enhancements
// @include http://www.airdates.tv/*
// @include https://www.airdates.tv/*
// @include /^https?:\/\/(www\.)?disqus(cdn)?\.com\/embed\/comments\/.*$/
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAADv0lEQVRYw+1Wv08jVxD+Zt7uWy92jOMjh6ULBUkHVbiU5A9If6LKSUdqUNLQsnIKlC7FgZQmoqFCgvQoQog0F0EXqNOQAsjZHBL22t43k8K7iw25S5OcpeRGGu3b3TfvzXzzE3hHIybKFlEU0dzc3Henp6flOI4BQI0xaozRTqfDzjl4nqciAlWlJEkAAKqKIAhgjFEAYGaoqhLlR7PneVQqlZiZsbS09GxQAe+OMp8BmEjfBYCmzOk3HdhLA7I68A931pyyeSMUURTx4uJisrOzo+041nYca6/3jTpH6hypOig5lzM7KDtWdqyLPyyqI5ezAOqI1BEpSJXhlOH0yZOfdX19/ep1CMA5B1UFp/AREZhvjdEciMxESeEgsPKQQaSaYyWpnO/be4bnUvV6XYwxYGa8TRq6LQ2w0SlQrVYRhuHoFEjTaXQKtFot9Hq9f+0yEfdmBay1o0Vg5EGYJAlE5L+LgHP3jXu7VefvEMhK8cgUYGYMtNF/nMQlr1cgiiLudDpYXVUEgUUQWJTfKyIMawjDGqgICN8yjQG1sIZaWMOPv1bBgpwL1QcoTE6iMDkJFUC1C9Uuvvr6Prp5N5ydnaWzs7MhFygI4+P999gA1BoQrPhQSXsiC3QAuPehQwNBt9t/Jsn9IMzFtre3w/39/Yubm5tis9mEiFAQBP1NRNA+IeuYxhhYazX9RwAQx3GWyuR5HlQ1iysNggDT09OYmpq6vry8fFCv190QAvPz89/u7u6WDg4OUCgU0Gw2USqVAACFQgHn5+dERDDG5LVCREhEEAQBrLVoNpuoVqsQEVhr0Wg0wMwolUqkqri6ukIQBOOVSqUI4DpH4OTkxK6urnaOjo4A3GZDt9uFqkJEUC6X+25RharC932ICJxzeQHzfR/WWlhr0Wq1QEQgIvi+D1VFkiRoNBpYXl52a2trHgDQ8fGxv7m5+dvFxcWjDLJMiawwZQd5ngdjDB4//gSe56NcLsMYg3a7jRcvfkGxWAQR5QiFYQjf9zN3YWxsDBMTEyiXy2DmYGFhoevNzMx82m63HxWLxSELkyTpj2fphJT5HwDirgMnirjzEsQMZsL0Rx/j+tVVNhUPp7MCKn3jer0ekiQBEXWiKDLe1tYW7e3t5RGZWZtxKp8e1I/uw8PDv8hyxcOuwv/8FX7/qZLLqQjCKUHhYQ9/fPAlkufPoalLv3j6tB8DKysrz+I4/rA/zlN2nzAzRCRH4U6jYmRTKcBEpESk2X4RGSpyaaZk3xJV/X5jY+Ml3tH/nv4E5KQFif7uYoAAAAAASUVORK5CYII=
// @license MIT
// @version 1.73b5
// @run-at document-start
// @grant none
// ==/UserScript==
//tab = 2 spaces
/*global DB, GM_info, DISQUS, device, Colors, assignColor, loadColor, engines, ymToday, ym2str, coalesce, markSearchResults, search, updateSelectedOnly, readCookieRaw, loadArchiveFromPathname, hashChanged, require, HTMLDocument*/
/*jshint supernew: true, globals: true, evil: true, loopfunc: true, jquery: true, boss: true, expr: true, devel: true, strict: global, scripturl: true, -W018, -W014*/
"use strict";
var changesLogText = multiline(function(){/*
<span class="warning info">if all your settings are lost after website upgrade to secure connection on Oct 13, 2019,</span>
<span class="warning info">go to <a href="http://www.airdates.tv/legacy_cookies#backupsettings" target="_blank">this</a> page and backup your settings, then you can restore them in <a href="#settings">options</a></span>
1.73b5 (2021-10-08)
+ restrict maximum width of the content (helps for wide resolution monitors)
! "collapse multiple" would collapse "premiere" or "returning" shows if there is an episode without season before it
! clicking on search link at the header would show arrow pointing at the searchbar without animation until page refreshed.
* clean up for jslint
//enableEpDateFixMenu
1.73b4 (2021-07-25)
+ setting to activate date offset
+ date offset of displays in tooltip which episode it's inherit current position
+ filter in changes log by clicking at legend titles
+ archive date to website title
! disqus reload button didn't scroll down properly
! disqus message count didn't work
! disqus theme didn't change together with main site
! opened details would get closed when "today" is changed
! date offset + time offset = incorrect date offset position
! errors on "_u" pages
* changes log will not longer popup when script first installed or when localStorage data deleted
* legend in changes log is always visible
- ability enable/disable episode offset feature via #epdatefix0 and #epdatefix1 hashtags
- disqus recommendations b.s.
? date offset + collapsemulti = hidden/incorrect title
1.73b3 (2020-12-13)
+ hide "Also on" section of disqus
1.73b2 (2020-10-15)
+ ability set date offset for episodes
! wrong svg icons color on light background
1.72.2 (2020-10-10)
! watched filter didn't work properly when show highlighted by search or marked as new/returned
1.72.1 (2020-10-10)
* tooltip on watched checkboxes now show additional info if SHIFT+click available
1.72 (2020-10-10)
+ while "Show all episodes" list is opened, holding SHIFT key and clicking on "watched" checkbox will select/deselect all previous episodes
+ filter to hide watched episodes
! duplicate week days for custom shows were not removed and not in order
! in some browsers (Tor Browser) after clicking left mouse button on a link that opens link in a new tab it would delete some of the user settings (that was some WTF bug)
1.71 (2020-06-26)
+ new option "number of opisodes per day" for custom shows
! menu popup did not change size with page zoom
1.70.1 (2020-05-13)
! links incorrectly selected for middle click in some cases
! watched incorrectly set on shows with changed "Episode # offset"
1.70 (2020-05-08)
+ date of content's last update at the bottom of the page
* table min width decreased to allow display without scrollbars on low resolution screens
! old unused settings were not deleted
! messages under search bar displayed in one line
! custom links not properly sorted
1.69 (2020-03-18)
* option "Sunday is first day of the week" changed to "First day of the week" with ability select Monday, Sunday or Saturday.
! missing days in the past in some situations
1.68 (2020-03-13)
+ option "Sunday is first day of the week"
! some show's name incorrectly truncated in links in the search result
1.67 (2020-02-02)
+ ability change some colors of the website
+ ability enter RGB and HSB values in colorpicker
! accounts with hundreds "my shows" could fail properly sort shows
! colorpicker not shown in Custom Shows settings
1.66.1 (2020-01-14)
! option's misalignment in default theme
* color picker for today's color now shows the color value in option's field
1.66 (2020-01-14)
+ option for today's color
1.65.2 (2020-01-12)
! error when trying open an item when searched for info:myshows
* today's color in dark theme to orange
1.65.1 (2020-01-12)
! account popup would show up after closing secondary popup via X icon (options, custom shows, etc)
! my shows on top shown in wrong ordered
* improved my show on top sorting performance
1.65 (2020-01-1)
+ option to show "My Shows" on top of the list
1.64.1 (2020-01-06)
! middle click on a show would not open selected links
1.64 (2020-01-04)
+ new tags for custom links: {YEAR}, {MONTH}, {DAY}
1.63.2 (2020-01-04)
* it's possible now add custom show without specifying season
1.63.1 (2020-01-04)
! custom shows with day of the week would not set correct date with time offset activated
* horizontal scrollbar shown in Custom Shows popup
1.63 (2020-01-03)
+ prompt's buttons now highlighted when cursor over
+ option to make popups more stand out by bluring background around them
+ ability specify day of the week of a custom show
! horizontal scrollbar shown in Links Manager
! account popup not dimmed when import/export colors prompt opened
* when popups are opened, page scroll is disabled
1.62.2 (2019-10-24)
! fixed missing weeks
1.62.1 (2019-10-24)
+ tooltip for "go to the top" button
! leave archive bottom link was not scroll to the top
1.62 (2019-10-24)
+ jump to the top button
+ option to show next/prev month buttons under calendar
! some color issue in changes log with dark theme
! prompt to enter a date to jump to (when clicked on archive's date) was not showing correct currently viewing date
1.61.2 (2019-10-20)
+ information about server upgrade inside changes log and what to do
1.61.1 (2019-10-13)
+ #backupsettings to the link under search bar
! link in disqus comments to non-secure website with a hashtag command would execute command instead of opening webpage
1.61 (2019-10-13)
+ added hashtag command #backupsettings
1.60.4 (2019-10-13)
+ tooltip explaining how user's colors saved
! links favicons used insecured connection
1.60.3 (2019-07-14)
+ main menu icon instead of "Account" link
! Sunday column would wrap under Saturday in small windows
* cookies icon for guests
1.60.2 (2019-07-14)
+ search icons
! cookies that store guest's colors will no longer expire
* search bar placeholder to "Find Show ..."
* text "Account" to "Tools" on main menu link
1.60.1 (2019-03-31)
! watched checkbox was removed from first custom show of the week when new day started
1.60 (2019-03-04)
+ ADEU keyword in disqus
! disqus troll script would not initialize on new comments which were loaded without page refresh
* custom shows link no longer shown when viewing as another user
1.59 (2018-12-09)
+ ability add custom icon for each link (can be an URL or "data:" type)
+ option to change how custom colors displayed: use all available width or wrap in 7 per line
! some changes links manager would not reflect in opened details of a show
! improved drag'n drop in links manager
! greatly improved performance during changing number of custom colors to display in settings
* quick colors and link's icons are now scalable with page zoom in Waterfox
* replaced color picker icon with a SVG, which allows to be scaled without compromising quality
1.58.1 (2018-12-02)
! in some situations all days disappear
! search bar not centered
1.58 (2018-12-02)
+ ability change order in list of all episodes of a show
1.57 (2018-11-20)
+ after an update changes log highlights changes between new and old versions
! "My Shows" displayed duplicate entries when settings where restored from old backups
! deleted custom show has "edit" link in "My Shows" list, producing error in console
! newly added custom color wasn't pre-selected
1.56.1 (2018-11-18)
* selected color in quick color picks now shows rounded
1.56 (2018-11-18)
+ changes log shown after update (can be disabled via checkbox in top-right corner)
+ quick color picks shows which one is the current color
! after a link was changed, middle click on a show would use old data for the selected links
! links manager missing cursor-over indicator on edit/delete buttons
! custom show name field shown as "error" after "clear" button used
1.55.2 (2018-11-10)
! settings restore could create duplicate custom shows
! clicking on disqus notification icon would not open the notification panel
1.55.1 (2018-11-10)
! search by name failed find custom shows
* custom shows no longer displayed as duplicate if original show with exact same name + season + episode already exists in the same day
1.55 (2018-11-10)
+ tooltips on quick color pick
+ option to change displayed number of custom colors
+ when editing a custom show, if name changed to an existing show, the submit button label changes to "Merge", the name in the list changes color to red and the show it will be merged with changes to green
! color box of a last in the list custom show would display outside of the area, requiring user to scroll
! clicking edit link on custom show from search results would not highlight line in episodes data
! when colors box opened in custom shows popup, escape button closes the color box instead of whole custom shows popup
! clicking outside of color box in "Custom shows" could activate other actions on clicked element
* increased number of custom colors to remember from 7 to 100
* when color box in "Custom shows" list is opened, popup around of it fades and hovering cursor over other elements on the page no longer trigger anything
1.54.2 (2018-11-07)
! number of weeks ignored if number of past weeks changed immediately after number of weeks changed from "All" to any number
1.54.1 (2018-11-07)
! incorrect number of weeks shown in search results
1.54 (2018-11-07)
+ option to limit how many weeks to show (past weeks are included into the count)
* increased number of past weeks to 5
1.53.2 (2018-11-06)
! disqus trolls script didn't work
1.53.1 (2018-11-06)
! custom show's color box was displayed on it's own line in older browsers
1.53 (2018-11-06)
+ colors in custom shows list
+ clicking "Edit" on custom show from details dropdown automatically highlights the episode data line
! collapse multiple didn't work on added/updated shows without page refresh
! some icons in details dropdown were black on dark background
* if custom show name matches any existing custom shows, it automatically highlighted and currently selected one shows as crossed off (because it would be merged with the matched one)
* season/episode number is no longer restricted to max 99
1.52 (2018-11-05)
+ when editing a custom show and name changed to unique, it's now possible add it as a new show or update existing
+ "More info" state in custom show editor is now remembered
* any field that prevent custom show from submitting is now highlighted
1.51.1 (2018-11-05)
! custom shows not shown in past weeks
1.51 (2018-11-04)
+ new show episode data fields are now can be separated by any character(s) that is not 0-9, date also may be spited as separate year, month and day
+ visual aid in the custom shows list highlighting affected item after submitting data
+ more explanation about episode data format
+ Custom shows form changes label on submit button to reflect if a show being edited or a new show will be created
+ arrow keys in custom shows list would select for editing next/prev show
! text-shadow on titles highlighted by search would affect new/returning tags, producing unreadable text
! clicking "Show all episodes" from "My Shows" list would not properly display list of episodes
! missing "Edit" link in for custom shows in "My shows" list
! white icon in show's details in search results
* new show episodes data fields are now showing evenly spaced
1.50 (2018-11-03)
+ backup/restore custom shows
1.49 (2018-11-03)
+ if custom show fields are empty, deleting a show would fill up the fields with information from deleted show
1.48.1 (2018-11-03)
! myshow list would not update new name of custom shows
1.48 (2018-11-03)
+ ability add custom shows
+ text shadow on highlighted (rainbow) search results
! in some cases script totally failed, due to work around for SVG images showing too large while page is still loading.
1.47 (2018-10-19)
+ links regex now applied to the entire url, but only if MONKEY_REGEXP or MONKEY_N_REGEXP tags were not used
! MagnetDL links included unnecessary / at the end search keyword
1.46.2 (2018-10-19)
! horizontal scrollbar shown when links manager is overflowing
! submit button not disabled after new link was submitted
1.46.1 (2018-10-19)
! issues after a link was created and deleted without page refresh
1.46 (2018-10-18)
+ ability add <a href="https://www.w3schools.com/jsref/jsref_obj_regexp.asp" target="_blank">regular expressions</a> filters to links (one regexp per line)
! edit buttons not shown in links manager in some browsers
! edited link would fail in opened show details
! in older browsers show details would not open on first click and episode offset would fail
! MagnetDL links
1.45.3 (2018-10-02)
! track today not working when 1st of the month is Monday
1.45.2 (2018-09-29)
! missing comments reload button in some browsers
! black comments reload icon in dark theme
1.45.1 (2018-08-12)
! filter checkboxes were too close to each other
1.45 (2018-08-12)
+ clicking on logo changes theme
! JS errors at login page
* tweaked colors of day's date in dark theme
* changed theme handling/selection in options, this will allow user add custom themes in the future
1.44.2 (2018-07-19)
! loading icon when clicked at disqus notification badge would hide prematurely before notification window opened.
! disqus badge routine start multiple timers
1.44.1 (2018-07-15)
! dark theme looked bad in archive
* tweaked the look of notification badge
1.44 (2018-07-15)
+ disqus message notification badge on top of the page
+ colorpicker set to last used color if current show has no assigned color
1.43.1 (2018-07-14)
! colorpicker stops working if used at search results
! on small screens sundays would move underneath of saturday when search is active
! when myshows list is opened, adding/removing a show would not reflect at the list
1.43 (2018-07-14)
+ remember and show last 7 custom colors as quick pick, they can be removed via middle click
! main input hex color in colopicker would fail
* updated logo with less outline on darker theme
1.42 (2018-07-14)
+ updated logo, it now looks good with any background.
! disqus would not show text after switching theme without page refresh
1.41 (2018-07-13)
+ dark theme build-in
1.40.2 (2018-07-13)
* better support for dark themes
1.40.1 (2018-07-10)
! on small screens sundays would move underneath of saturday
* opened show border now obeys color of the text
1.40 (2018-07-09)
+ episode season number offset
1.39 (2018-07-09)
+ episode number offset
! script fails on some pages displaying huge characters (i.e. login page)
! in some browsers it shows huge "something" while page still loading
1.38.3 (2018-05-26)
! collapse multiple failed at midnight when enabled "Track today"
1.38.2 (2018-04-23)
! Show details would not open
1.38.1 (2018-04-22)
* clean up saved settings (remove any non-existing or with missmatched type settings)
1.38 (2018-04-16)
+ option to track today (feature introduced in v 1.35)
1.37.4 (2018-04-15)
! MS Edge compatibility
1.37.3 (2018-04-13)
! if episode is in the past and hidden via "show past weeks" setting, clicking on "Show in calendar" from search result would not reveal the episode.
* if getting name of same show failed, next attempt will be possible only after 1 hour
* if getting name of a show failed during period of 4 weeks, the show will be removed from the account.
1.37.2 (2018-03-27)
+ enter key now submits form in links manager
! left click on links didn't work
! links with empty URL field no longer accepted
* undo message after clear colors/hidde or watched list now visible even when page scrolled down
* when viewing as different user, links to clear colors/hidden and watched lists are no longer visible
* Add and Reset buttons in links manager renamed to Submit and Clear
1.37.1 (2018-03-25)
! broken my shows list in Firefox
* renamed "Show hidden" checkbox to "Hidden shows"
1.37 (2018-03-23)
+ reload disqus button
! clicking on engine's checkboxes would open the engine link
1.36.3 (2018-03-18)
! errors in console in MS Edge
1.36.2 (2018-03-18)
! in certain situations changing time offset would break collapse multiple
! auto scroll setting were inverted on page refresh
* settings "Scroll on search" renamed to "Auto scroll to the top"
1.36.1 (2018-03-18)
! in certain situations changing time offset would break collapse multiple
1.36 (2018-03-18)
+ links to Wikipedia in search result
+ information about shows stored in local storage, now included in settings backup
! 1.35 broke disqus
! links to airdates hashtags mistakenly opened in new tab if hashtag was was after domain name instead of /
! invalid colors would display show with white text
! searches that include info:A-Z no longer sent to server
! info:myshows didn't list shows without name
1.35 (2018-03-17)
+ today automatically changes at midnight without page refresh and updates listing of current month
! possible open multiple popups via hashtags
* back button now shows on popups opened via hashtag
1.34.1 (2018-03-15)
! search result had too much empty space on top
! link under search bar covers Sundays date when small logo enabled
* different approach stopping page from scrolling on search
1.34 (2018-03-15)
+ time offset option
+ option to disable scroll when using search field
1.33.1 (2018-03-12)
! color input field undo now records when color picked via palette
1.33 (2018-03-12)
+ missing color input field in color picker
* improved color input field in color picker: no need for # and it automatically filters out non-valid values, custom undo/redo that works between shows
1.32 (2018-03-04)
+ add/reset buttons in Links Manager are now disabled when fields are empty
+ clear colors/hidden/watched lists in options
+ ability undo after clear colors/hidden/watched
! reset button in Links Manager would not remove icon in result when clicked first time
! broken restore settings
! when a popup once opened via a hashtag (#options, #linksmanager, #changes), opening that popup via click would not show back button
* alert popup after clear colors/hidden/watched replaced with a notification message with ability to undo
1.31 (2018-02-25)
+ button in prompt popup to save/load file
+ hashtags #options and #linksmanager
+ tooltips on links in links manager
! color validation during import colors didn't work properly
! the end of text in url field in links manager was covered up by the dropdown menu button
! color picker in search result displayed behind the search results and was inaccessible
! asterisk on new links in links manager is now always visible even if link's title is truncated
* export colors filters out invalid colors
* links manager is now consistent width
- save/load from file links, they are now integrated into prompt itself
1.30.2 (2018-02-18)
! incorrect favicon for internal airdates.tv links
1.30.1 (2018-02-18)
! error opening show from "My shows" list
1.30 (2018-02-18)
+ animation speed setting
+ links manager automatically scrolls to new (or edited) link after submit
+ custom prompt popup for import/export colors/settings
! exporting ~160 colors via text string would corrupt some colors due to Chrome limitations
! errors in console when attempting restore settings or import colors with invalid data
* importing colors now validates input before saving to the account
1.29 (2018-02-12)
+ ESC key closes popups
+ show/hide this show icon
! when number of visible links different from default, opening a show would make the animation jump
! long text wrapped in popup windows
! clicking on edit link icon in Links Manager, would not display correct lin in the "Result" row
! "reset sort" link in Links Manager would take whole row
! MS Edge would not initialize properly
* links with long names are longer "wrap"
* significally improved performance of Links manager
* faster opening/closing show animation
* selectable links in show details are now separate from other links
* links manager popup now has limited max size
1.28.4 (2018-02-07)
+ random series as example in links manager
! editing/adding a link while a show opened would produce incorrect links in the opened show until page refresh
1.28.3 (2018-02-07)
! Firefox decided render shadow much bigger then supposed to
1.28.2 (2018-02-07)
! in Firefox shadow would show on opened show when popup was opened
1.28.1 (2018-02-07)
+ shadow on "popups", making them more pronounced
1.28 (2018-02-04)
+ search by adding #s:keyword in the address
+ changes log
+ ability use hash tags as links in comments (<a href="#s:test">#s:<i>search-keyword</i></a>, <a href="#info:1234">#info:<i>NN</i></a>, <a href="#myshows">#myshows</a>, <a href="#hidden">#hidden</a>, <a href="#changes">#changes</a>). Without ADE it will open a blank page.
+ option for small logo
! disqus troll would not work at all in some browsers
! disqus troll would not work on additionally loaded comments
! "watched" checkboxes shown through search field
! close button on popups would not work if cursor not in the middle of it
* removed disq.us from links in comments
* links in comments open in new tab
* when searching via hash tag, clearing search field with X icon would also remove the hash tag from address bar
1.27.5 (2018-01-22)
! broken fix for paste via right click in search bar
1.27.4 (2018-01-22)
+ cloud icon next to member name
1.27.3 (2018-01-22)
! fails initialize with some invalid colors in cookies
* replaced some icons with SVG, should now be more browser independent and consistent
1.27.2 (2018-01-21)
! sorting by color with fallback to sorting by name was in reverse
1.27 (2018-01-21)
+ link to support website
! middle click on title would attempt open 2 tabs for each selected link
! significantly improved initialization speed for guests and members with no colors (very noticeable with #showhidden in the address)
*/}, true).trim();
let log = console.log.bind(console),
self = this,
timeOffset = 0,
isFrame = window.top !== window.self,
_Date = Date,
today,
blankFunc = function(){},
SVG = {
del: '<svg viewBox="0 0 24 24"><path d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"></path></svg>',
search: '<svg viewBox="0 0 6 6"><path d="M2.23 0a2.23 2.23 0 0 1 1.7 3.68l.08.1h.28L6 5.47 5.49 6 3.77 4.29V4l-.1-.09A2.23 2.23 0 1 1 2.24 0m0 .69a1.54 1.54 0 1 0 1.54 1.54A1.54 1.54 0 0 0 2.23.69z"/></svg>',
show: '<svg viewBox="0 0 24 24"><path d="M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z"></path></svg>',
hide: '<svg viewBox="0 0 24 24"><path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z"></path></svg>',
backup: '<svg viewBox="0 0 24 24"><path d="M12,3A9,9 0 0,0 3,12H0L4,16L8,12H5A7,7 0 0,1 12,5A7,7 0 0,1 19,12A7,7 0 0,1 12,19C10.5,19 9.09,18.5 7.94,17.7L6.5,19.14C8.04,20.3 9.94,21 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M14,12A2,2 0 0,0 12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12Z" /></svg>',
restore: '<svg viewBox="0 0 24 24"><path d="M13,3A9,9 0 0,0 4,12H1L4.89,15.89L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3M12,8V13L16.28,15.54L17,14.33L13.5,12.25V8H12Z" /></svg>',
clear: '<svg viewBox="0 0 24 24"><path d="M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8.46,11.88L9.87,10.47L12,12.59L14.12,10.47L15.53,11.88L13.41,14L15.53,16.12L14.12,17.53L12,15.41L9.88,17.53L8.47,16.12L10.59,14L8.46,11.88M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z"></path></svg>',
edit: '<svg viewBox="0 0 24 24"><path d="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"></path></svg>',
guest: '<svg xmlns="http://www.w3.org/2000/svg" class="cookieIcon" viewBox="0 0 18 18"><rect class="cookieIconHoles" width="10.27" height="14.58" x="3.04" y="2.49" rx="3.33" ry="3.33" transform="rotate(-41.95 8.18 9.78)"/><path d="M9 0a9 9 0 1 0 9 9 8.44 8.44 0 0 0-.13-1.5A1.05 1.05 0 0 0 17 7h-2V6a.98.98 0 0 0-1-1h-2V4a.98.98 0 0 0-1-1h-1V1a.98.98 0 0 0-1-1M6.5 3A1.5 1.5 0 1 1 5 4.5 1.5 1.5 0 0 1 6.5 3m-3 4A1.5 1.5 0 1 1 2 8.5 1.5 1.5 0 0 1 3.5 7m5 1A1.5 1.5 0 1 1 7 9.5 1.5 1.5 0 0 1 8.5 8m5 2a1.5 1.5 0 0 1 0 3 1.5 1.5 0 0 1-1.5-1.5 1.5 1.5 0 0 1 1.5-1.5M8 13a1.5 1.5 0 1 1-1.5 1.5A1.5 1.5 0 0 1 8 13z"/></svg>',
link: '<svg viewBox="0 0 24 24"><path d="M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z"></path></svg>',
customlinks: '<svg viewBox="0 0 24 24"><path d="M3,5H9V11H3V5M5,7V9H7V7H5M11,7H21V9H11V7M11,15H21V17H11V15M5,20L1.5,16.5L2.91,15.09L5,17.17L9.59,12.59L11,14L5,20Z" /></svg>',
customshows: '<svg viewBox="0 0 24 24"><path d="M2,6V8H14V6H2M2,10V12H14V10H2M20.04,10.13C19.9,10.13 19.76,10.19 19.65,10.3L18.65,11.3L20.7,13.35L21.7,12.35C21.92,12.14 21.92,11.79 21.7,11.58L20.42,10.3C20.31,10.19 20.18,10.13 20.04,10.13M18.07,11.88L12,17.94V20H14.06L20.12,13.93L18.07,11.88M2,14V16H10V14H2Z" /></svg>',
settings: '<svg viewBox="0 0 24 24"><path d="M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z" /></svg>',
menu: '<svg xmlns="http://www.w3.org/2000/svg" class="menuIcon" viewBox="0 0 18 12"><path d="M0 0h18v2H0V0m0 5h18v2H0V5m0 5h18v2H0z"/></svg>',
user: '<svg viewBox="0 0 24 24"><path d="M12,4C15.64,4 18.67,6.59 19.35,10.04C21.95,10.22 24,12.36 24,15A5,5 0 0,1 19,20H6A6,6 0 0,1 0,14C0,10.91 2.34,8.36 5.35,8.04C6.6,5.64 9.11,4 12,4M7.5,9.69C6.06,11.5 6.2,14.06 7.82,15.68C8.66,16.5 9.81,17 11,17V18.86L13.83,16.04L11,13.21V15C10.34,15 9.7,14.74 9.23,14.27C8.39,13.43 8.26,12.11 8.92,11.12L7.5,9.69M9.17,8.97L10.62,10.42L12,11.79V10C12.66,10 13.3,10.26 13.77,10.73C14.61,11.57 14.74,12.89 14.08,13.88L15.5,15.31C16.94,13.5 16.8,10.94 15.18,9.32C14.34,8.5 13.19,8 12,8V6.14L9.17,8.97Z"></path></svg>',
reload: '<svg viewBox="0 0 24 24"><path d="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"></path></svg><span>Reload</span>',
close: '<svg viewBox="0 0 24 24"><path d="M19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M19,19H5V5H19V19M17,8.4L13.4,12L17,15.6L15.6,17L12,13.4L8.4,17L7,15.6L10.6,12L7,8.4L8.4,7L12,10.6L15.6,7L17,8.4Z"></path></svg>',
closehover: '<svg viewBox="0 0 24 24"><path d="M19,3H16.3H7.7H5A2,2 0 0,0 3,5V7.7V16.4V19A2,2 0 0,0 5,21H7.7H16.4H19A2,2 0 0,0 21,19V16.3V7.7V5A2,2 0 0,0 19,3M15.6,17L12,13.4L8.4,17L7,15.6L10.6,12L7,8.4L8.4,7L12,10.6L15.6,7L17,8.4L13.4,12L17,15.6L15.6,17Z"></path></svg>',
viewas: '<svg viewBox="0 0 24 24"><path d="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z"></path></svg>',
back: '<svg viewBox="0 0 24 24"><path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z" /></svg>',
};
/*work around for some SVG pictures shown huge before page is fully loaded*/
(function loop()
{
let head = document.head;
if (!head)
{
return setTimeout(loop, 0);
}
let style = document.createElement("style");
head.appendChild(style);
style.innerHTML = "svg{max-width:1.2em;max-height:1.2em;}";
if (!isFrame && window.location.href.match(/^http:/))
{
let s = document.createElement("script");
s.src = "/public/javascripts/db.js";
head.appendChild(s);
s = document.createElement("script");
s.src = "/public/javascripts/main.js";
head.appendChild(s);
s = document.createElement("script");
s.src = "/public/javascripts/jqColorPicker.min.js";
head.appendChild(s);
window.engines = [];
}
})();
receiveMessage.f = {};//list of functions
receiveMessage.f.reloadDisqus = function messageFunc_reloadDisqus(r)
{
if (typeof(r) == "undefined")
{
this.r = true;
DISQUS.reset({
reload: true,
});
}
else if (this.r)
{
$("html, body").animate({scrollTop: $("#disqus_thread").find("iframe")[0].offsetTop + r }, 300);
}
};
window.self.addEventListener("message", receiveMessage, false);
if (!isFrame)
{
try
{
timeOffset = ~~ls("settings").timeOffset;
if (!(timeOffset instanceof Number))
timeOffset = 0;
}
catch(er){}
Date = function()
{
let args = Array.prototype.slice.call(arguments);
args.splice(0, 0, this);
let n = (new (Function.prototype.bind.apply(_Date, args))).getTime() + 3600000 * timeOffset;
return new _Date(n);
};
Date._now = function()
{
return (new _Date()).getTime();
// return Math.floor((Date.now() - 1523246400000) / 1000); //2018-04-09 00:00:00
};
}
if (!Date.now)
{
Date.now = function()
{
return (new Date()).getTime();
};
}
Object.defineProperty(window, 'browser', { get: function()
{
let browser = "";
if((navigator.userAgent.indexOf("Opera") || navigator.userAgent.indexOf('OPR')) != -1 )
{
browser = "opera";
}
else if(navigator.userAgent.indexOf("Edge") != -1)
{
browser = "edge";
}
else if(navigator.userAgent.indexOf("Chrome") != -1 )
{
browser = "chrome";
}
else if(navigator.userAgent.indexOf("Firefox") != -1 )
{
browser = "ff";
}
else if(navigator.userAgent.indexOf("Safari") != -1)
{
browser = "safari";
}
else if((navigator.userAgent.indexOf("MSIE") != -1 ) || (!!document.documentMode == true )) //IF IE > 10
{
browser = "ie";
}
return browser;
}});
let mainFunc = function mainFunc(event)
{
/* jshint validthis: true */
if (typeof($) == "undefined")
return;
//create a DIV container and move everything into that container
const elContent = document.getElementById("content") || document.createElement("div"),
elSearchbarContainer = document.createElement("div");
elContent.id = "content";
elSearchbarContainer.id = "searchbarContainer";
elSearchbarContainer.appendChild(document.getElementById("searchbar"));
elContent.appendChild(elSearchbarContainer);
while(document.body.children.length)
elContent.appendChild(document.body.firstChild);
document.body.appendChild(elContent);
let browser = window.browser;
if (browser)
document.body.classList.toggle(browser, true);
let disqusMessageCount = function disqusMessageCount(count)
{
if (count)
{
disqusMessageCount.el.setAttribute("unread", "");
disqusMessageNotifLoaded(false);
}
else
{
disqusMessageCount.el.removeAttribute("unread");
// disqusMessageCount.el.classList.toggle("loading", false);
disqusMessageNotifLoaded(false);
count = "";
}
disqusMessageCount.el.textContent = count;
};
receiveMessage.f.disqusMessageCount = disqusMessageCount;
let adeName = "Airdates.tv enhancer",
adeVersion = "n/a",
prevVersion = null,
force = false,
enginesDefault = [],
_engines = [],
_hidden = ls("hidden") || [],
loopWait = 1000,
_enginesList = [],
pickerCallbacks = {};
try
{
adeName = GM_info.script.name;
adeVersion = GM_info.script.version;
}catch(er){}
cs.list = ["s","n"];
cs.listLegacy = {
sh: "showHidden",
sn: "showNew",
sr: "showReturn",
cm: "collapseMulti",
w: "weeksPast",
wa: "enableWatched",
middleClick: "middleClick"
};
let enginesHide = ls("enginesHide") || [];
let Settings = {
SORT_NAME: 0,
SORT_COLOR: 1,
inited: false,
box: null,
/*
colorsDef: {
"807fff": {name: ""},
"ff7fff": {name: ""},
"80ff7f": {name: ""},
"7fffff": {name: ""},
"ff7f7f": {name: ""},
},
*/
prefs: {},
prefsDef: {
animSpeed: 2,
archiveBottom: 1, //show next/prev month links below calendar
collapseMulti: 0,
cushowsHelp: 0,
enableWatched: 0,
enableEpDateFix: 0,
lastColor: "",
lastColors: [],
lastColorsLine: 7, //number of last colors per line
lastColorsShow: 7, //number of last colors to show
middleClick: [],
myShowsTop: 0, //move my shows on top of the list
noChangesLog: 0,
popupBlur: 1, //blur background when popups are shown
searchOrder: 0,
searchScroll: 1,
shortTitle: 0,
shortTitleExpand: 1,
showHidden: 0,
showNew: 0,
showReturn: 0,
showWatched: 1,
smallLogo: 0,
sortBy: 0,
theme: "",
themeColors: {
text: "",
bg: "",
date: "",
dateBg: "",
today: "",
todayBg: "",
todayBorder: ""
},
timeOffset: 0,
todayChange: 1,
version: "",
weeks: 0, //total number of weeks to show
weeksPast: 0, //number of past weeks
weekStart: 0, //0=Mon, 1=Sun, 2=Sat
},
prefsFilter: {
animSpeed: function(p)
{
return Math.max(0, Math.min(9, p));
},
},
filter: function Settings_filter(id, val)
{
if (id in this.prefsFilter)
return this.prefsFilter[id](val);
return val;
},
pref: function Settings_pref(id, val, prefs)
{
prefs = prefs || this.prefs;
let ids = id.split(".");
if (ids.length > 1)
{
return this.pref(ids[1], val, prefs[ids[0]]);
}
if (typeof(val) == "undefined")
return typeof(prefs[id]) == "undefined" ? null : prefs[id];
prefs[id] = this.filter(id, val);
this.save();
},
init: function Settings_init()
{
if (this.inited)
return;
this.prefs = ls("settings");
if (!this.prefs || typeof(this.prefs) != "object")
this.prefs = cloneObj(this.prefsDef);
if ("weeks" in this.prefs && !("weeksPast" in this.prefs))
{
this.prefs.weeksPast = this.prefs.weeks;
this.prefs.weeks = this.prefsDef.weeks;
}
//add any missing settings and remove any non-existing
function fixPref(pref, def)
{
for(let i in def)
{
if (!(i in pref))
pref[i] = def[i];
if (typeof(def[i]) == "object" && !Array.isArray(def[i]))
fixPref(pref[i], def[i]);
}
for(let i in pref)
{
if (!(i in def))
delete pref[i];
}
}
fixPref(this.prefs, this.prefsDef);
if (this.prefs.theme === 1)
this.prefs.theme = "dark";
//remove any non-existing settings
for(let i in this.prefs)
{
if (!(i in this.prefsDef) || typeof(this.prefs[i]) !== typeof(this.prefsDef[i]))
delete this.prefs[i];
}
let c,// = cs("wa"),
s = false;
/*
//too old compatibility to care?
if (c !== null)
{
this.prefs.enableWatched = c ? 1 : 0;
eraseCookie("wa");
s = true;
}
c = cs("showhidden");
if (c !== null)
{
this.prefs.showHidden = c ? 1 : 0;
eraseCookie("showhidden");
s = true;
}
c = cs("sh");
if (c !== null)
{
this.prefs.showHidden = c ? 1 : 0;
eraseCookie("sh");
s = true;
}
c = cs("cm");
if (c !== null)
{
this.prefs.collapseMulti = c ? 1 : 0;
eraseCookie("cm");
s = true;
}
c = cs("middleClick");
if (c !== null)
{
this.prefs.middleClick = c ? c : [];
eraseCookie("middleClick");
s = true;
}
c = cs("w");
if (c !== null)
{
this.prefs.weeks = c;
eraseCookie("w");
s = true;
}
*/
/* splitting New/Returning into two separate filters */
c = cs("sn");
if (c === null && this.pref("showNew") === null)
{
let n = cs("n") ? 1 : 0;
this.prefs.showNew = n;
this.prefs.showReturn = n;
s = true;
}
else if (c !== null)
{
this.prefs.showNew = c;
eraseCookie("sn");
s = true;
}
c = cs("sr");
if (c !== null)
{
this.prefs.showReturn = c;
eraseCookie("sr");
s = true;
}
window.createCookie = createCookie;
// window.eraseCookie = eraseCookie;
// window.readCookie = readCookie;
if (this.pref("version") != adeVersion)
{
if (!Settings.prefs.noChangesLog && Settings.prefs.version != adeVersion)
{
prevVersion = Settings.prefs.version;
if (Settings.prefs.version !== "")
{
setTimeout(function()
{
changesLog.show(true);
});
}
if (!DB.loggedInUsername)
{
setTimeout(function()
{
for(let id in DB.savedColors)
{
DB.setColor(id, DB.savedColors[id]);
}
});
}
}
if ("weekSunday" in this.prefs)
{
this.prefs.weekStart = this.prefs.weekSunday;
delete this.prefs.weekSunday;
this.save();
}
if (versionsCompare(this.pref("version"), "1.71") < 0)
{
let l = ls("customShows") || {i:1,l:{}},
changed = false;
for (let obj in l.l)
{
for (let i = 0; i < l.l[obj][1].length; i++)
{
let data = l.l[obj][1][i];
if (data.length == 6)
{
data[6] = data[5]; //custom show days of the week
data[5] = 1;
changed = true;
}
}
}
if (changed)
{
ls("customShows", l);
}
}
if (versionsCompare(this.pref("version"), "1.72") < 0)
{
let w = watched._list;
for (let i in w)
{
let l = w[i],
n = [];
for (let e = 0; e < l.length; e++)
{
n[n.length] = episodeTools.short(l[e]);
}
w[i] = n;
}
watched.save(1);
}
this.prefs.version = adeVersion;
s = true;
}
if (s)
this.save();
this.themes.init();
this.create();
this.lastUpdateShow();
this.inited = true;
},//Settings.init()
create: function Settings_create(callback)
{
if (Settings.box)
return callback ? callback() : true;
let html = multiline(function(){/*
<div id="settings-popup" class="popup">
<div id="settings-popup-content">
<div class="header">
<div class="back" title="Back">
{SVG-BACK}
</div>
<h4>Options</h4>
<div class="close" title="Close" title="Close">
{SVG-CLOSEHOVER}
{SVG-CLOSE}
</div>
</div>
<div class="content settings">
</div>
</div>
</div>
*/});//html
let popup = $(html).appendTo("#content"),
content = popup.find(".content"),
a = document.createElement("a"),
i = document.createElement("span"),
span = document.createElement("div"),
that = self,
opt;
span.appendChild(i);
span.appendChild(a);
Settings.box = popup;
content.append(createCheckbox("enableWatched", "Enable watched", this.prefs.enableWatched ? true : false, this.callback, null, ""));
//enableEpDateFixMenu
content.append(createCheckbox("enableEpDateFix", "Enable Episode Date Offset", this.prefs.enableEpDateFix ? true : false, function(e, id, check)
{
epDateFix.init(check);
}, ['Warning! This will increase page loading time.\n\nRequires page reload'], ""));
content.append(createCheckbox("shortTitle", "Truncate long titles", this.prefs.shortTitle ? true : false, this.callback, ["Shorten titles to fit into single row."], ""));
content.append(createCheckbox("shortTitleExpand", "Auto expand truncated titles", this.prefs.shortTitleExpand ? true : false, this.callback, ["Show full title when cursor over it. If disabled you still be able see full title in tooltip or when show is opened."], ""));
content.append(createCheckbox("smallLogo", "Small logo", this.prefs.smallLogo ? true : false, this.callback, null, ""));
content.append(createCheckbox("searchScroll", "Auto scroll to the top", this.prefs.searchScroll ? true : false, this.callback, ["Scroll to the top on search and page refresh"], ""));
content.append(createCheckbox("todayChange", "Track today", this.prefs.todayChange ? true : false, this.callback, ['Automatically change "today" at midnight'], ""));
content.append(createCheckbox("archiveBottom", "Show bottom archive links", this.prefs.archiveBottom ? true : false, this.callback, ['Show next/prev month links below calendar'], ""));
content.append(createCheckbox("popupBlur", "Blur behind popups", this.prefs.popupBlur ? true : false, this.callback, ['Make popups standout more'], ""));
content.append(createCheckbox("myShowsTop", "My Shows on top", this.prefs.myShowsTop ? true : false, function(e, id, check)
{
that.callback(e, id, check);
sortMyShows();
}, ['Move My Shows to the top of the list'], ""));
opt = $(multiline(function(){/*
<span id="weekStartBox">First day of the week:
<select>
<option value="2">Saturday</option>
<option value="1">Sunday</option>
<option value="0">Monday</option>
</select>
</span>
*/}))
.appendTo(content)
.find("select")