@oxymoron.13/tizentube-s95b 0.2.2 → 0.2.3

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 +10 -4
  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 +28 -0
  15. package/mods/features/s95bMenu.js +142 -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
@@ -0,0 +1,99 @@
1
+ // The tiny-sha256 module, edited to export itself.
2
+ var sha256 = function sha256(ascii) {
3
+ function rightRotate(value, amount) {
4
+ return (value >>> amount) | (value << (32 - amount));
5
+ };
6
+
7
+ var mathPow = Math.pow;
8
+ var maxWord = mathPow(2, 32);
9
+ var lengthProperty = 'length';
10
+ var i, j; // Used as a counter across the whole file
11
+ var result = '';
12
+
13
+ var words = [];
14
+ var asciiBitLength = ascii[lengthProperty] * 8;
15
+
16
+ //* caching results is optional - remove/add slash from front of this line to toggle
17
+ // Initial hash value: first 32 bits of the fractional parts of the square roots of the first 8 primes
18
+ // (we actually calculate the first 64, but extra values are just ignored)
19
+ var hash = sha256.h = sha256.h || [];
20
+ // Round constants: first 32 bits of the fractional parts of the cube roots of the first 64 primes
21
+ var k = sha256.k = sha256.k || [];
22
+ var primeCounter = k[lengthProperty];
23
+ /*/
24
+ var hash = [], k = [];
25
+ var primeCounter = 0;
26
+ //*/
27
+
28
+ var isComposite = {};
29
+ for (var candidate = 2; primeCounter < 64; candidate++) {
30
+ if (!isComposite[candidate]) {
31
+ for (i = 0; i < 313; i += candidate) {
32
+ isComposite[i] = candidate;
33
+ }
34
+ hash[primeCounter] = (mathPow(candidate, .5) * maxWord) | 0;
35
+ k[primeCounter++] = (mathPow(candidate, 1 / 3) * maxWord) | 0;
36
+ }
37
+ }
38
+
39
+ ascii += '\x80'; // Append '1' bit (plus zero padding)
40
+ while (ascii[lengthProperty] % 64 - 56) ascii += '\x00'; // More zero padding
41
+ for (i = 0; i < ascii[lengthProperty]; i++) {
42
+ j = ascii.charCodeAt(i);
43
+ if (j >> 8) return; // ASCII check: only accept characters in range 0-255
44
+ words[i >> 2] |= j << ((3 - i) % 4) * 8;
45
+ }
46
+ words[words[lengthProperty]] = ((asciiBitLength / maxWord) | 0);
47
+ words[words[lengthProperty]] = (asciiBitLength)
48
+
49
+ // process each chunk
50
+ for (j = 0; j < words[lengthProperty];) {
51
+ var w = words.slice(j, j += 16); // The message is expanded into 64 words as part of the iteration
52
+ var oldHash = hash;
53
+ // This is now the "working hash", often labelled as variables a...g
54
+ // (we have to truncate as well, otherwise extra entries at the end accumulate
55
+ hash = hash.slice(0, 8);
56
+
57
+ for (i = 0; i < 64; i++) {
58
+ var i2 = i + j;
59
+ // Expand the message into 64 words
60
+ // Used below if
61
+ var w15 = w[i - 15], w2 = w[i - 2];
62
+
63
+ // Iterate
64
+ var a = hash[0], e = hash[4];
65
+ var temp1 = hash[7]
66
+ + (rightRotate(e, 6) ^ rightRotate(e, 11) ^ rightRotate(e, 25)) // S1
67
+ + ((e & hash[5]) ^ ((~e) & hash[6])) // ch
68
+ + k[i]
69
+ // Expand the message schedule if needed
70
+ + (w[i] = (i < 16) ? w[i] : (
71
+ w[i - 16]
72
+ + (rightRotate(w15, 7) ^ rightRotate(w15, 18) ^ (w15 >>> 3)) // s0
73
+ + w[i - 7]
74
+ + (rightRotate(w2, 17) ^ rightRotate(w2, 19) ^ (w2 >>> 10)) // s1
75
+ ) | 0
76
+ );
77
+ // This is only used once, so *could* be moved below, but it only saves 4 bytes and makes things unreadble
78
+ var temp2 = (rightRotate(a, 2) ^ rightRotate(a, 13) ^ rightRotate(a, 22)) // S0
79
+ + ((a & hash[1]) ^ (a & hash[2]) ^ (hash[1] & hash[2])); // maj
80
+
81
+ hash = [(temp1 + temp2) | 0].concat(hash); // We don't bother trimming off the extra ones, they're harmless as long as we're truncating when we do the slice()
82
+ hash[4] = (hash[4] + temp1) | 0;
83
+ }
84
+
85
+ for (i = 0; i < 8; i++) {
86
+ hash[i] = (hash[i] + oldHash[i]) | 0;
87
+ }
88
+ }
89
+
90
+ for (i = 0; i < 8; i++) {
91
+ for (j = 3; j + 1; j--) {
92
+ var b = (hash[i] >> (j * 8)) & 255;
93
+ result += ((b < 16) ? 0 : '') + b.toString(16);
94
+ }
95
+ }
96
+ return result;
97
+ };
98
+
99
+ export default sha256;
@@ -0,0 +1,11 @@
1
+ import EnglishResource from './resources/en.json';
2
+ import GermanResource from './resources/de.json';
3
+
4
+ export default {
5
+ en: {
6
+ translation: EnglishResource
7
+ },
8
+ de: {
9
+ translation: GermanResource
10
+ }
11
+ };
@@ -0,0 +1,18 @@
1
+ import i18n from 'i18next';
2
+ import resources from './i18nResources.js';
3
+
4
+ InitI18next(window?.yt?.config_?.HL || navigator.language.replace(/(\-.*)/g, ''));
5
+
6
+ function InitI18next(lng) {
7
+ i18n
8
+ .init({
9
+ lng,
10
+ fallbackLng: 'en',
11
+ resources,
12
+ debug: false,
13
+ interpolation: {
14
+ escapeValue: false,
15
+ }
16
+ });
17
+ }
18
+ export default i18n;