@oxymoron.13/tizentube-s95b 0.2.1 → 0.2.2

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 +42 -49
  2. package/S95B-CHANGES.txt +3 -9
  3. package/dist/userScript.js +2 -2
  4. package/package.json +5 -11
  5. package/UPSTREAM-README.md +0 -42
  6. package/mods/config.js +0 -117
  7. package/mods/domrect-polyfill.js +0 -104
  8. package/mods/features/adblock.js +0 -584
  9. package/mods/features/autoFrameRate.js +0 -42
  10. package/mods/features/enableFeatures.js +0 -19
  11. package/mods/features/moreSubtitles.js +0 -378
  12. package/mods/features/pictureInPicture.js +0 -198
  13. package/mods/features/preferredVideoQuality.js +0 -101
  14. package/mods/features/s95bCodec.js +0 -45
  15. package/mods/features/s95bI18n.js +0 -36
  16. package/mods/features/s95bMenu.js +0 -246
  17. package/mods/features/sponsorblock.js +0 -437
  18. package/mods/features/standaloneUserscript.js +0 -107
  19. package/mods/features/updater.js +0 -119
  20. package/mods/features/userAgentSpoofing.js +0 -73
  21. package/mods/features/videoQueuing.js +0 -64
  22. package/mods/package-lock.json +0 -2321
  23. package/mods/package.json +0 -33
  24. package/mods/resolveCommand.js +0 -376
  25. package/mods/rollup.config.js +0 -41
  26. package/mods/spatial-navigation-polyfill.js +0 -1756
  27. package/mods/tiny-sha256.js +0 -99
  28. package/mods/translations/i18nResources.js +0 -11
  29. package/mods/translations/index.js +0 -18
  30. package/mods/translations/language-names.js +0 -981
  31. package/mods/translations/resources/ar.json +0 -308
  32. package/mods/translations/resources/az.json +0 -308
  33. package/mods/translations/resources/bs.json +0 -308
  34. package/mods/translations/resources/cs.json +0 -308
  35. package/mods/translations/resources/de.json +0 -308
  36. package/mods/translations/resources/dk.json +0 -308
  37. package/mods/translations/resources/el.json +0 -308
  38. package/mods/translations/resources/en.json +0 -308
  39. package/mods/translations/resources/es-419.json +0 -308
  40. package/mods/translations/resources/es.json +0 -308
  41. package/mods/translations/resources/fi-FI.json +0 -308
  42. package/mods/translations/resources/fr.json +0 -311
  43. package/mods/translations/resources/hr.json +0 -308
  44. package/mods/translations/resources/hu.json +0 -308
  45. package/mods/translations/resources/id.json +0 -308
  46. package/mods/translations/resources/it.json +0 -308
  47. package/mods/translations/resources/ja.json +0 -308
  48. package/mods/translations/resources/lt.json +0 -308
  49. package/mods/translations/resources/lv.json +0 -308
  50. package/mods/translations/resources/pl.json +0 -308
  51. package/mods/translations/resources/pt-BR.json +0 -308
  52. package/mods/translations/resources/pt-PT.json +0 -308
  53. package/mods/translations/resources/ro.json +0 -310
  54. package/mods/translations/resources/ru.json +0 -308
  55. package/mods/translations/resources/sr-Cyrl.json +0 -308
  56. package/mods/translations/resources/sr-Latn.json +0 -308
  57. package/mods/translations/resources/tlh.json +0 -308
  58. package/mods/translations/resources/tr.json +0 -308
  59. package/mods/translations/resources/uk.json +0 -308
  60. package/mods/translations/resources/vi.json +0 -309
  61. package/mods/translations/resources/zh-CN.json +0 -308
  62. package/mods/translations/resources/zh-TW.json +0 -308
  63. package/mods/translations/update-translations.js +0 -55
  64. package/mods/ui/chapters.js +0 -137
  65. package/mods/ui/clock.js +0 -71
  66. package/mods/ui/customCommandExecution.js +0 -49
  67. package/mods/ui/customGuideAction.js +0 -119
  68. package/mods/ui/customUI.js +0 -192
  69. package/mods/ui/customYTSettings.js +0 -29
  70. package/mods/ui/disableWhosWatching.js +0 -48
  71. package/mods/ui/settings.js +0 -1024
  72. package/mods/ui/sidebarModification.js +0 -179
  73. package/mods/ui/speedUI.js +0 -119
  74. package/mods/ui/theme.js +0 -26
  75. package/mods/ui/ui.css +0 -157
  76. package/mods/ui/ui.js +0 -261
  77. package/mods/ui/ytUI.js +0 -510
  78. package/mods/userScript.js +0 -28
  79. package/mods/utils/ASTParser.js +0 -67
  80. package/mods/utils/innerTubeCalls.js +0 -138
  81. package/service/package-lock.json +0 -4193
  82. package/service/package.json +0 -29
  83. package/service/rollup.config.js +0 -47
  84. package/service/service.js +0 -118
@@ -1,138 +0,0 @@
1
- import resolveCommand from '../resolveCommand.js';
2
-
3
- function requestNextAndNavigateChannel(params) {
4
- const mappings = Object.values(window._yttv).find(a => a && a.mappings);
5
- const CurrentIdentityService = mappings.get('CurrentIdentityService');
6
- const KabukiInnerTubeClient = mappings.get('KabukiInnerTubeClient');
7
- const videoId = params.tileRenderer ? params.tileRenderer.contentId : params.lockupViewModel.contentId;
8
- const paramsValue = params.tileRenderer ? params.tileRenderer.onSelectCommand.watchEndpoint.params : params.lockupViewModel.rendererContext.commandContext.onTap.innertubeCommand.watchEndpoint.params;
9
- const randomDelay = Math.floor(Math.random() * 2000);
10
-
11
- CurrentIdentityService.get().then(identity => {
12
- const request = {
13
- identity,
14
- isPrefetch: false,
15
- path: '/youtubei/v1/next',
16
- payload: {
17
- videoId,
18
- params: paramsValue,
19
- racyCheckOk: true,
20
- contentCheckOk: true,
21
- playbackContext: {
22
- lactMilliseconds: randomDelay,
23
- isLyricsMode: false
24
- },
25
- autonavState: 'STATE_NONE',
26
- mdxContext: {
27
- mdxReceiverContext: {
28
- mdxConnectedDevices: []
29
- }
30
- }
31
- },
32
- clickTracking: {
33
- clickTrackingParams: null,
34
- }
35
- }
36
-
37
- KabukiInnerTubeClient.fetch(request).subscribe((response) => {
38
- const contents = response?.contents?.singleColumnWatchNextResults?.results?.results?.contents;
39
- if (contents) {
40
- const itemSectionRenderer = contents.find(item => item.itemSectionRenderer);
41
- const videoMetadataRenderer = itemSectionRenderer?.itemSectionRenderer?.contents?.find(item => item.videoMetadataRenderer);
42
- if (videoMetadataRenderer) {
43
- const navigation = videoMetadataRenderer.videoMetadataRenderer?.owner?.videoOwnerRenderer?.navigationEndpoint;
44
- if (navigation) resolveCommand(navigation);
45
- }
46
- }
47
- });
48
- });
49
- }
50
-
51
- function getGuide() {
52
- const mappings = Object.values(window._yttv).find(a => a && a.mappings);
53
- const KabukiInnerTubeClient = mappings.get('KabukiInnerTubeClient');
54
-
55
- const request = {
56
- path: '/youtubei/v1/guide'
57
- };
58
-
59
- return new Promise((resolve, _) => {
60
- KabukiInnerTubeClient.fetch(request).subscribe((response) => {
61
- resolve(response);
62
- });
63
- });
64
- }
65
-
66
- // Recursively find a feedbackToken inside a (possibly nested) innertube command.
67
- // The "Not interested" / "Don't recommend channel" panel items carry their token either
68
- // directly (onTap.innertubeCommand.feedbackEndpoint) or wrapped in an openPopupAction
69
- // (onTap.innertubeCommand.openPopupAction...commandExecutorCommand.commands[].feedbackEndpoint).
70
- function findFeedbackToken(obj) {
71
- if (!obj || typeof obj !== 'object') return null;
72
- if (typeof obj.feedbackToken === 'string') return obj.feedbackToken;
73
- for (const value of Object.values(obj)) {
74
- const token = findFeedbackToken(value);
75
- if (token) return token;
76
- }
77
- return null;
78
- }
79
-
80
- // YouTube moved the feedback tokens out of the long press menu into an engagement
81
- // panel (panelId + params). Fetch the panel and return its feedback tokens in order:
82
- // [0] = "Not interested", [1] = "Don't recommend channel".
83
- function getFeedbackPanelTokens(panelId, params) {
84
- const mappings = Object.values(window._yttv).find(a => a && a.mappings);
85
- const KabukiInnerTubeClient = mappings.get('KabukiInnerTubeClient');
86
-
87
- const request = {
88
- path: '/youtubei/v1/get_panel',
89
- payload: {
90
- panelId,
91
- params
92
- }
93
- };
94
-
95
- return new Promise((resolve, reject) => {
96
- KabukiInnerTubeClient.fetch(request).subscribe((response) => {
97
- const listItems = response?.content?.engagementPanelSectionListRenderer?.content?.listViewModel?.listItems;
98
- if (!Array.isArray(listItems)) {
99
- resolve([]);
100
- return;
101
- }
102
- resolve(
103
- listItems
104
- .map((item) => findFeedbackToken(item?.listItemViewModel))
105
- .filter(Boolean)
106
- );
107
- }, reject);
108
- });
109
- }
110
-
111
- // Send a feedback token (e.g. "Not interested" / "Don't recommend channel") to YouTube.
112
- // The response may contain a followUpDialog with dismissal reasons that should be
113
- // presented to the user (see markFeedback in resolveCommand.js).
114
- function sendFeedbackToken(feedbackToken) {
115
- const mappings = Object.values(window._yttv).find(a => a && a.mappings);
116
- const KabukiInnerTubeClient = mappings.get('KabukiInnerTubeClient');
117
-
118
- const request = {
119
- path: '/youtubei/v1/feedback',
120
- payload: {
121
- feedbackTokens: [feedbackToken]
122
- }
123
- };
124
-
125
- return new Promise((resolve, reject) => {
126
- KabukiInnerTubeClient.fetch(request).subscribe((response) => {
127
- resolve(response);
128
- }, reject);
129
- });
130
- }
131
-
132
- export {
133
- requestNextAndNavigateChannel,
134
- getGuide,
135
- findFeedbackToken,
136
- getFeedbackPanelTokens,
137
- sendFeedbackToken
138
- }