@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
package/service/package.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "service",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "service.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"keywords": [],
|
|
10
|
-
"author": "",
|
|
11
|
-
"license": "ISC",
|
|
12
|
-
"description": "",
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@patrickkfkan/peer-dial": "^0.1.2",
|
|
15
|
-
"cors": "^2.8.5",
|
|
16
|
-
"express": "^4.19.2",
|
|
17
|
-
"uuid": "^11.1.1"
|
|
18
|
-
},
|
|
19
|
-
"devDependencies": {
|
|
20
|
-
"@babel/core": "^7.24.7",
|
|
21
|
-
"@babel/preset-env": "^7.24.7",
|
|
22
|
-
"@rollup/plugin-babel": "^6.0.4",
|
|
23
|
-
"@rollup/plugin-commonjs": "^26.0.1",
|
|
24
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
25
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
26
|
-
"@rollup/plugin-replace": "^5.0.7",
|
|
27
|
-
"rollup": "^4.18.1"
|
|
28
|
-
}
|
|
29
|
-
}
|
package/service/rollup.config.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
-
import babel from '@rollup/plugin-babel';
|
|
4
|
-
import replace from '@rollup/plugin-replace';
|
|
5
|
-
import json from '@rollup/plugin-json';
|
|
6
|
-
import fs from 'fs';
|
|
7
|
-
|
|
8
|
-
// Custom Rollup plugin to inject XML content
|
|
9
|
-
function injectXmlContent() {
|
|
10
|
-
return {
|
|
11
|
-
name: 'inject-xml-content',
|
|
12
|
-
renderChunk(code) {
|
|
13
|
-
|
|
14
|
-
const pattern = /var\s+(\w+)_TEMPLATE\s+=\s+fs\$3\.readFileSync\(__dirname\s+\+\s+'\/\.\.\/xml\/([^']+)'\s*,\s*'utf8'\);/g;
|
|
15
|
-
|
|
16
|
-
const modifiedCode = code.replace(pattern, (match, varName, fileName) => {
|
|
17
|
-
const xmlContent = fs.readFileSync(`node_modules/@patrickkfkan/peer-dial/xml/${fileName}`, 'utf8');
|
|
18
|
-
return `var ${varName}_TEMPLATE = ${JSON.stringify(xmlContent)};`;
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
return { code: modifiedCode, map: null };
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
input: 'service.js',
|
|
28
|
-
output: {
|
|
29
|
-
file: '../dist/service.js',
|
|
30
|
-
format: 'cjs'
|
|
31
|
-
},
|
|
32
|
-
plugins: [
|
|
33
|
-
injectXmlContent(),
|
|
34
|
-
replace({
|
|
35
|
-
'Gate.prototype.await = function await(callback)': 'Gate.prototype.await = function(callback)',
|
|
36
|
-
'Async.prototype.await = function await(callback)': 'Async.prototype.await = function (callback)',
|
|
37
|
-
delimiters: ['', ''],
|
|
38
|
-
}),
|
|
39
|
-
resolve(),
|
|
40
|
-
json(),
|
|
41
|
-
commonjs(),
|
|
42
|
-
babel({
|
|
43
|
-
babelHelpers: 'bundled',
|
|
44
|
-
presets: ['@babel/preset-env']
|
|
45
|
-
})
|
|
46
|
-
]
|
|
47
|
-
};
|
package/service/service.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
const dial = require("@patrickkfkan/peer-dial");
|
|
2
|
-
const express = require('express');
|
|
3
|
-
const cors = require('cors');
|
|
4
|
-
const uuid = require('uuid');
|
|
5
|
-
const app = express();
|
|
6
|
-
|
|
7
|
-
const corsOptions = {
|
|
8
|
-
origin: '*',
|
|
9
|
-
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',
|
|
10
|
-
credentials: true,
|
|
11
|
-
optionsSuccessStatus: 204
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
app.use(cors(corsOptions));
|
|
15
|
-
|
|
16
|
-
const PORT = global.isTizenTube ? 8095 : 8085;
|
|
17
|
-
const apps = {
|
|
18
|
-
"YouTube": {
|
|
19
|
-
name: "YouTube",
|
|
20
|
-
state: "stopped",
|
|
21
|
-
allowStop: true,
|
|
22
|
-
pid: null,
|
|
23
|
-
additionalData: {},
|
|
24
|
-
launch(launchData) {
|
|
25
|
-
const tbPackageId = tizen.application.getAppInfo().packageId;
|
|
26
|
-
tizen.application.launchAppControl(
|
|
27
|
-
new tizen.ApplicationControl(
|
|
28
|
-
"http://tizen.org/appcontrol/operation/view",
|
|
29
|
-
null,
|
|
30
|
-
null,
|
|
31
|
-
null,
|
|
32
|
-
[
|
|
33
|
-
new tizen.ApplicationControlData("module", [JSON.stringify(
|
|
34
|
-
{
|
|
35
|
-
moduleName: '@oxymoron.13/tizentube-s95b',
|
|
36
|
-
moduleType: 'npm',
|
|
37
|
-
args: launchData
|
|
38
|
-
}
|
|
39
|
-
)])
|
|
40
|
-
]
|
|
41
|
-
), `${tbPackageId}.${global.isTizenTube ? 'TizenTubeStandalone' : 'TizenBrewStandalone'}`);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const dialServer = new dial.Server({
|
|
47
|
-
expressApp: app,
|
|
48
|
-
port: PORT,
|
|
49
|
-
prefix: "/dial",
|
|
50
|
-
manufacturer: 'Reis Can',
|
|
51
|
-
modelName: 'TizenBrew',
|
|
52
|
-
friendlyName: `TizenTube (${tizen.systeminfo.getCapability('http://tizen.org/system/model_name')})`,
|
|
53
|
-
uuid: uuid.v5(tizen.systeminfo.getCapability('http://tizen.org/system/tizenid'), '4bcbc514-bdd6-4163-8215-316526fd1d9b'),
|
|
54
|
-
delegate: {
|
|
55
|
-
getApp(appName) {
|
|
56
|
-
return apps[appName];
|
|
57
|
-
},
|
|
58
|
-
launchApp(appName, launchData, callback) {
|
|
59
|
-
console.log(`Got request to launch ${appName} with launch data: ${launchData}`);
|
|
60
|
-
const app = apps[appName];
|
|
61
|
-
if (app) {
|
|
62
|
-
const parsedData = launchData.split('&').reduce((acc, cur) => {
|
|
63
|
-
const parts = cur.split('=');
|
|
64
|
-
const key = parts[0];
|
|
65
|
-
const value = parts[1];
|
|
66
|
-
|
|
67
|
-
if (typeof value !== 'undefined') {
|
|
68
|
-
acc[key] = value;
|
|
69
|
-
} else {
|
|
70
|
-
acc[key] = '';
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return acc;
|
|
74
|
-
}, {});
|
|
75
|
-
|
|
76
|
-
if (parsedData.yumi) {
|
|
77
|
-
app.additionalData = parsedData;
|
|
78
|
-
app.state = "running"
|
|
79
|
-
callback("");
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
app.pid = "run";
|
|
83
|
-
app.state = "starting";
|
|
84
|
-
app.launch(launchData);
|
|
85
|
-
app.state = "running";
|
|
86
|
-
}
|
|
87
|
-
callback(app.pid);
|
|
88
|
-
},
|
|
89
|
-
stopApp(appName, pid, callback) {
|
|
90
|
-
console.log(`Got request to stop ${appName} with pid: ${pid}`);
|
|
91
|
-
const app = apps[appName];
|
|
92
|
-
if (app && app.pid === pid) {
|
|
93
|
-
app.pid = null;
|
|
94
|
-
app.state = "stopped";
|
|
95
|
-
callback(true);
|
|
96
|
-
} else {
|
|
97
|
-
callback(false);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
setInterval(() => {
|
|
105
|
-
tizen.application.getAppsContext((appsContext) => {
|
|
106
|
-
const tbPackageId = tizen.application.getAppInfo().packageId;
|
|
107
|
-
const app = appsContext.find(app => app.appId === `${tbPackageId}.${global.isTizenTube ? 'TizenTubeStandalone' : 'TizenBrewStandalone'}`);
|
|
108
|
-
if (!app) {
|
|
109
|
-
apps["YouTube"].state = "stopped";
|
|
110
|
-
apps["YouTube"].pid = null;
|
|
111
|
-
apps["YouTube"].additionalData = {};
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}, 5000);
|
|
115
|
-
|
|
116
|
-
app.listen(PORT, () => {
|
|
117
|
-
dialServer.start();
|
|
118
|
-
});
|