@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.
- package/README.md +42 -49
- package/S95B-CHANGES.txt +3 -9
- package/dist/userScript.js +2 -2
- package/package.json +5 -11
- package/UPSTREAM-README.md +0 -42
- package/mods/config.js +0 -117
- package/mods/domrect-polyfill.js +0 -104
- package/mods/features/adblock.js +0 -584
- package/mods/features/autoFrameRate.js +0 -42
- package/mods/features/enableFeatures.js +0 -19
- package/mods/features/moreSubtitles.js +0 -378
- package/mods/features/pictureInPicture.js +0 -198
- package/mods/features/preferredVideoQuality.js +0 -101
- package/mods/features/s95bCodec.js +0 -45
- package/mods/features/s95bI18n.js +0 -36
- package/mods/features/s95bMenu.js +0 -246
- package/mods/features/sponsorblock.js +0 -437
- package/mods/features/standaloneUserscript.js +0 -107
- package/mods/features/updater.js +0 -119
- package/mods/features/userAgentSpoofing.js +0 -73
- package/mods/features/videoQueuing.js +0 -64
- package/mods/package-lock.json +0 -2321
- package/mods/package.json +0 -33
- package/mods/resolveCommand.js +0 -376
- package/mods/rollup.config.js +0 -41
- package/mods/spatial-navigation-polyfill.js +0 -1756
- package/mods/tiny-sha256.js +0 -99
- package/mods/translations/i18nResources.js +0 -11
- package/mods/translations/index.js +0 -18
- package/mods/translations/language-names.js +0 -981
- package/mods/translations/resources/ar.json +0 -308
- package/mods/translations/resources/az.json +0 -308
- package/mods/translations/resources/bs.json +0 -308
- package/mods/translations/resources/cs.json +0 -308
- package/mods/translations/resources/de.json +0 -308
- package/mods/translations/resources/dk.json +0 -308
- package/mods/translations/resources/el.json +0 -308
- package/mods/translations/resources/en.json +0 -308
- package/mods/translations/resources/es-419.json +0 -308
- package/mods/translations/resources/es.json +0 -308
- package/mods/translations/resources/fi-FI.json +0 -308
- package/mods/translations/resources/fr.json +0 -311
- package/mods/translations/resources/hr.json +0 -308
- package/mods/translations/resources/hu.json +0 -308
- package/mods/translations/resources/id.json +0 -308
- package/mods/translations/resources/it.json +0 -308
- package/mods/translations/resources/ja.json +0 -308
- package/mods/translations/resources/lt.json +0 -308
- package/mods/translations/resources/lv.json +0 -308
- package/mods/translations/resources/pl.json +0 -308
- package/mods/translations/resources/pt-BR.json +0 -308
- package/mods/translations/resources/pt-PT.json +0 -308
- package/mods/translations/resources/ro.json +0 -310
- package/mods/translations/resources/ru.json +0 -308
- package/mods/translations/resources/sr-Cyrl.json +0 -308
- package/mods/translations/resources/sr-Latn.json +0 -308
- package/mods/translations/resources/tlh.json +0 -308
- package/mods/translations/resources/tr.json +0 -308
- package/mods/translations/resources/uk.json +0 -308
- package/mods/translations/resources/vi.json +0 -309
- package/mods/translations/resources/zh-CN.json +0 -308
- package/mods/translations/resources/zh-TW.json +0 -308
- package/mods/translations/update-translations.js +0 -55
- package/mods/ui/chapters.js +0 -137
- package/mods/ui/clock.js +0 -71
- package/mods/ui/customCommandExecution.js +0 -49
- package/mods/ui/customGuideAction.js +0 -119
- package/mods/ui/customUI.js +0 -192
- package/mods/ui/customYTSettings.js +0 -29
- package/mods/ui/disableWhosWatching.js +0 -48
- package/mods/ui/settings.js +0 -1024
- package/mods/ui/sidebarModification.js +0 -179
- package/mods/ui/speedUI.js +0 -119
- package/mods/ui/theme.js +0 -26
- package/mods/ui/ui.css +0 -157
- package/mods/ui/ui.js +0 -261
- package/mods/ui/ytUI.js +0 -510
- package/mods/userScript.js +0 -28
- package/mods/utils/ASTParser.js +0 -67
- package/mods/utils/innerTubeCalls.js +0 -138
- package/service/package-lock.json +0 -4193
- package/service/package.json +0 -29
- package/service/rollup.config.js +0 -47
- 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
|
-
}
|