@oxymoron.13/tizentube-s95b 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +49 -42
  2. package/S95B-CHANGES.txt +9 -3
  3. package/UPSTREAM-README.md +42 -0
  4. package/dist/userScript.js +2 -2
  5. package/mods/config.js +117 -0
  6. package/mods/domrect-polyfill.js +104 -0
  7. package/mods/features/adblock.js +584 -0
  8. package/mods/features/autoFrameRate.js +42 -0
  9. package/mods/features/enableFeatures.js +19 -0
  10. package/mods/features/moreSubtitles.js +378 -0
  11. package/mods/features/pictureInPicture.js +198 -0
  12. package/mods/features/preferredVideoQuality.js +101 -0
  13. package/mods/features/s95bCodec.js +45 -0
  14. package/mods/features/s95bI18n.js +36 -0
  15. package/mods/features/s95bMenu.js +246 -0
  16. package/mods/features/sponsorblock.js +437 -0
  17. package/mods/features/standaloneUserscript.js +107 -0
  18. package/mods/features/updater.js +119 -0
  19. package/mods/features/userAgentSpoofing.js +73 -0
  20. package/mods/features/videoQueuing.js +64 -0
  21. package/mods/package-lock.json +2321 -0
  22. package/mods/package.json +33 -0
  23. package/mods/resolveCommand.js +376 -0
  24. package/mods/rollup.config.js +41 -0
  25. package/mods/spatial-navigation-polyfill.js +1756 -0
  26. package/mods/tiny-sha256.js +99 -0
  27. package/mods/translations/i18nResources.js +11 -0
  28. package/mods/translations/index.js +18 -0
  29. package/mods/translations/language-names.js +981 -0
  30. package/mods/translations/resources/ar.json +308 -0
  31. package/mods/translations/resources/az.json +308 -0
  32. package/mods/translations/resources/bs.json +308 -0
  33. package/mods/translations/resources/cs.json +308 -0
  34. package/mods/translations/resources/de.json +308 -0
  35. package/mods/translations/resources/dk.json +308 -0
  36. package/mods/translations/resources/el.json +308 -0
  37. package/mods/translations/resources/en.json +308 -0
  38. package/mods/translations/resources/es-419.json +308 -0
  39. package/mods/translations/resources/es.json +308 -0
  40. package/mods/translations/resources/fi-FI.json +308 -0
  41. package/mods/translations/resources/fr.json +311 -0
  42. package/mods/translations/resources/hr.json +308 -0
  43. package/mods/translations/resources/hu.json +308 -0
  44. package/mods/translations/resources/id.json +308 -0
  45. package/mods/translations/resources/it.json +308 -0
  46. package/mods/translations/resources/ja.json +308 -0
  47. package/mods/translations/resources/lt.json +308 -0
  48. package/mods/translations/resources/lv.json +308 -0
  49. package/mods/translations/resources/pl.json +308 -0
  50. package/mods/translations/resources/pt-BR.json +308 -0
  51. package/mods/translations/resources/pt-PT.json +308 -0
  52. package/mods/translations/resources/ro.json +310 -0
  53. package/mods/translations/resources/ru.json +308 -0
  54. package/mods/translations/resources/sr-Cyrl.json +308 -0
  55. package/mods/translations/resources/sr-Latn.json +308 -0
  56. package/mods/translations/resources/tlh.json +308 -0
  57. package/mods/translations/resources/tr.json +308 -0
  58. package/mods/translations/resources/uk.json +308 -0
  59. package/mods/translations/resources/vi.json +309 -0
  60. package/mods/translations/resources/zh-CN.json +308 -0
  61. package/mods/translations/resources/zh-TW.json +308 -0
  62. package/mods/translations/update-translations.js +55 -0
  63. package/mods/ui/chapters.js +137 -0
  64. package/mods/ui/clock.js +71 -0
  65. package/mods/ui/customCommandExecution.js +49 -0
  66. package/mods/ui/customGuideAction.js +119 -0
  67. package/mods/ui/customUI.js +192 -0
  68. package/mods/ui/customYTSettings.js +29 -0
  69. package/mods/ui/disableWhosWatching.js +48 -0
  70. package/mods/ui/settings.js +1024 -0
  71. package/mods/ui/sidebarModification.js +179 -0
  72. package/mods/ui/speedUI.js +119 -0
  73. package/mods/ui/theme.js +26 -0
  74. package/mods/ui/ui.css +157 -0
  75. package/mods/ui/ui.js +261 -0
  76. package/mods/ui/ytUI.js +510 -0
  77. package/mods/userScript.js +28 -0
  78. package/mods/utils/ASTParser.js +67 -0
  79. package/mods/utils/innerTubeCalls.js +138 -0
  80. package/package.json +11 -5
  81. package/service/package-lock.json +4193 -0
  82. package/service/package.json +29 -0
  83. package/service/rollup.config.js +47 -0
  84. package/service/service.js +118 -0
package/mods/config.js ADDED
@@ -0,0 +1,117 @@
1
+ const CONFIG_KEY = 'ytaf-configuration';
2
+ const defaultConfig = {
3
+ enableAdBlock: true,
4
+ enableSponsorBlock: true,
5
+ enableSponsorBlockToasts: true,
6
+ sponsorBlockManualSkips: ['intro', 'outro', 'filler'],
7
+ enableSponsorBlockSponsor: true,
8
+ enableSponsorBlockIntro: true,
9
+ enableSponsorBlockOutro: true,
10
+ enableSponsorBlockInteraction: true,
11
+ enableSponsorBlockSelfPromo: true,
12
+ enableSponsorBlockPreview: true,
13
+ enableSponsorBlockMusicOfftopic: true,
14
+ enableSponsorBlockFiller: false,
15
+ enableSponsorBlockHighlight: true,
16
+ videoSpeed: 1,
17
+ preferredVideoQuality: 'auto',
18
+ enableDeArrow: true,
19
+ enableDeArrowThumbnails: false,
20
+ focusContainerColor: '#0f0f0f',
21
+ routeColor: '#0f0f0f',
22
+ enableFixedUI: (window.h5vcc) ? false : true,
23
+ enableHqThumbnails: false,
24
+ enableChapters: true,
25
+ enableLongPress: true,
26
+ enableShorts: true,
27
+ dontCheckUpdateUntil: 0,
28
+ enableWhoIsWatchingMenu: false,
29
+ permanentlyEnableWhoIsWatchingMenu: false,
30
+ enableWhosWatchingMenuOnAppExit: false,
31
+ enableShowUserLanguage: true,
32
+ enableShowOtherLanguages: false,
33
+ showWelcomeToast: true,
34
+ enablePreviousNextButtons: true,
35
+ enableSuperThanksButton: false,
36
+ enableAIAskButton: false,
37
+ enableSpeedControlsButton: true,
38
+ enablePatchingVideoPlayer: true,
39
+ enableMPButton: true,
40
+ enableSwapMPWithPIP: false,
41
+ enablePreviews: true,
42
+ enableHideWatchedVideos: false,
43
+ hideWatchedVideosThreshold: 80,
44
+ hideWatchedVideosPages: [],
45
+ enableHideEndScreenCards: false,
46
+ enableYouThereRenderer: true,
47
+ lastAnnouncementCheck: 0,
48
+ enableScreenDimming: false,
49
+ dimmingTimeout: 60,
50
+ dimmingOpacity: 0.5,
51
+ enablePaidPromotionOverlay: true,
52
+ speedSettingsIncrement: 0.25,
53
+ preferredVideoCodec: 'any',
54
+ launchToOnStartup: null,
55
+ reloadHomeOnStartup: true,
56
+ disabledSidebarContents: [],
57
+ sidebarContentsOrder: [],
58
+ disableChannelsOnSidebar: false,
59
+ enableUpdater: true,
60
+ autoFrameRate: false,
61
+ autoFrameRatePauseVideoFor: 0,
62
+ enableSigninReminder: false,
63
+ sortSubscriptionsByAlphabet: false,
64
+ enableClock: false,
65
+ isClock12HourFormat: false,
66
+ clockShowSeconds: false,
67
+ clockHideWhenVideoPlaying: false,
68
+ disableEnlargingThumbnails: false,
69
+ enableShrinkingThumbnails: false,
70
+ hideRelatedVideosPlayer: false,
71
+ };
72
+
73
+ let localConfig;
74
+
75
+ try {
76
+ localConfig = JSON.parse(window.localStorage[CONFIG_KEY]);
77
+ } catch (err) {
78
+ console.warn('Config read failed:', err);
79
+ localConfig = defaultConfig;
80
+ }
81
+
82
+ export function configRead(key) {
83
+ if (localConfig[key] === undefined) {
84
+ console.warn('Populating key', key, 'with default value', defaultConfig[key]);
85
+ localConfig[key] = defaultConfig[key];
86
+ }
87
+
88
+ return localConfig[key];
89
+ }
90
+
91
+ export function configWrite(key, value) {
92
+ console.info('Setting key', key, 'to', value);
93
+ localConfig[key] = value;
94
+ window.localStorage[CONFIG_KEY] = JSON.stringify(localConfig);
95
+ configChangeEmitter.dispatchEvent(new CustomEvent('configChange', { detail: { key, value } }));
96
+ }
97
+
98
+ export const configChangeEmitter = {
99
+ listeners: {},
100
+ addEventListener(type, callback) {
101
+ if (!this.listeners[type]) this.listeners[type] = [];
102
+ this.listeners[type].push(callback);
103
+ },
104
+ removeEventListener(type, callback) {
105
+ if (!this.listeners[type]) return;
106
+ this.listeners[type] = this.listeners[type].filter(cb => cb !== callback);
107
+ },
108
+ dispatchEvent(event) {
109
+ const type = event.type;
110
+ if (!this.listeners[type]) return;
111
+ this.listeners[type].forEach(cb => {
112
+ try {
113
+ cb.call(this, event)
114
+ } catch (_) {};
115
+ });
116
+ }
117
+ };
@@ -0,0 +1,104 @@
1
+ //
2
+ // https://raw.githubusercontent.com/Financial-Times/polyfill-library/c25c30e4463bef60fba1213ecb697f3e3f253d7b/polyfills/DOMRect/polyfill.js
3
+ // License: MIT
4
+ //
5
+
6
+ (function (global) {
7
+ function number(v) {
8
+ return v === undefined ? 0 : Number(v);
9
+ }
10
+
11
+ function different(u, v) {
12
+ return u !== v && !(isNaN(u) && isNaN(v));
13
+ }
14
+
15
+ function DOMRect(xArg, yArg, wArg, hArg) {
16
+ var x, y, width, height, left, right, top, bottom;
17
+
18
+ x = number(xArg);
19
+ y = number(yArg);
20
+ width = number(wArg);
21
+ height = number(hArg);
22
+
23
+ Object.defineProperties(this, {
24
+ x: {
25
+ get: function () { return x; },
26
+ set: function (newX) {
27
+ if (different(x, newX)) {
28
+ x = newX;
29
+ left = right = undefined;
30
+ }
31
+ },
32
+ enumerable: true
33
+ },
34
+ y: {
35
+ get: function () { return y; },
36
+ set: function (newY) {
37
+ if (different(y, newY)) {
38
+ y = newY;
39
+ top = bottom = undefined;
40
+ }
41
+ },
42
+ enumerable: true
43
+ },
44
+ width: {
45
+ get: function () { return width; },
46
+ set: function (newWidth) {
47
+ if (different(width, newWidth)) {
48
+ width = newWidth;
49
+ left = right = undefined;
50
+ }
51
+ },
52
+ enumerable: true
53
+ },
54
+ height: {
55
+ get: function () { return height; },
56
+ set: function (newHeight) {
57
+ if (different(height, newHeight)) {
58
+ height = newHeight;
59
+ top = bottom = undefined;
60
+ }
61
+ },
62
+ enumerable: true
63
+ },
64
+ left: {
65
+ get: function () {
66
+ if (left === undefined) {
67
+ left = x + Math.min(0, width);
68
+ }
69
+ return left;
70
+ },
71
+ enumerable: true
72
+ },
73
+ right: {
74
+ get: function () {
75
+ if (right === undefined) {
76
+ right = x + Math.max(0, width);
77
+ }
78
+ return right;
79
+ },
80
+ enumerable: true
81
+ },
82
+ top: {
83
+ get: function () {
84
+ if (top === undefined) {
85
+ top = y + Math.min(0, height);
86
+ }
87
+ return top;
88
+ },
89
+ enumerable: true
90
+ },
91
+ bottom: {
92
+ get: function () {
93
+ if (bottom === undefined) {
94
+ bottom = y + Math.max(0, height);
95
+ }
96
+ return bottom;
97
+ },
98
+ enumerable: true
99
+ }
100
+ });
101
+ }
102
+
103
+ global.DOMRect = DOMRect;
104
+ }(self));