efront 4.29.1 → 4.30.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.
- package/#/345/233/275/351/231/205/345/214/226.yml +9 -0
- package/apps/pivot/main.js +2 -1
- package/coms/basic/decodeLEB128.js +16 -2
- package/coms/basic/decodePackW.asm +143 -2
- package/coms/basic/encodeLEB128.js +6 -1
- package/coms/compile/Javascript.js +4 -0
- package/coms/compile/Javascript_test.js +3 -2
- package/coms/compile/Program.js +15 -2
- package/coms/compile/common.js +8 -20
- package/coms/compile/common_test.js +1 -0
- package/coms/docs/helps.js +1 -0
- package/coms/kugou/krc.js +3 -2
- package/coms/kugou/musicList.js +9 -0
- package/coms/reptile/window.js +5 -1
- package/coms/third-party/lzma.js +286 -0
- package/coms/third-party/lzma.wasm +0 -0
- package/coms/third-party//344/273/243/347/240/201/346/235/245/346/272/220.txt +2 -0
- package/coms/zimoli/hookmedia.js +29 -0
- package/coms/zimoli/vbox.js +7 -2
- package/data/packexe-setup.sfx +0 -0
- package/package.json +1 -1
- package/public/efront.js +1 -1
- package/public//346/226/207/344/273/266/347/263/273/347/273/237//344/270/273/351/241/265.jsp +2 -2
- package/coms/basic/concatByte.js +0 -15
- package/coms/basic/decodePack.js +0 -203
- package/coms/basic/decodeRange.js +0 -68
- package/coms/basic/encodePack.h +0 -9
- package/coms/basic/encodePack.js +0 -301
- package/coms/basic/encodeRange.h +0 -17
- package/coms/basic/encodeRange.js +0 -107
- package/coms/basic/encodeRange_test.js +0 -40
- package/coms/basic/readBinary.asm +0 -77
- package/coms/basic/readBinary.js +0 -31
- package/coms/basic/writeBinary.js +0 -37
|
@@ -40,6 +40,15 @@
|
|
|
40
40
|
- zh-CN: 禁用
|
|
41
41
|
en: Disable
|
|
42
42
|
|
|
43
|
+
- zh-CN: 压缩算法不支持
|
|
44
|
+
en: Compression algorithm not supported
|
|
45
|
+
|
|
46
|
+
- zh-CN: 数据解码异常!
|
|
47
|
+
en: Data decoding exception!
|
|
48
|
+
|
|
49
|
+
- zh-CN: 压缩到zip文件
|
|
50
|
+
en: Compress to zip file
|
|
51
|
+
|
|
43
52
|
- zh-CN: 无法下载!
|
|
44
53
|
en: Cannot download!
|
|
45
54
|
|
package/apps/pivot/main.js
CHANGED
|
@@ -7,7 +7,8 @@ i18n.setReloader(function () {
|
|
|
7
7
|
zimoli.reload(false);
|
|
8
8
|
});
|
|
9
9
|
data.loadConfig("api.yml");
|
|
10
|
-
user.loginPath = '
|
|
10
|
+
user.loginPath = 'pivot$login';
|
|
11
|
+
pivot$login;
|
|
11
12
|
cross.addReform(relogin(user.loginPath))
|
|
12
13
|
data.setReporter(function (m, t) {
|
|
13
14
|
alert(m, t);
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
+
var pow = Math.pow;
|
|
2
|
+
var min = Math.min;
|
|
1
3
|
function decodeLEB128(buff) {
|
|
2
4
|
var dist = [];
|
|
3
5
|
var temp = 0, delta = 0;
|
|
4
|
-
|
|
6
|
+
var blength = buff.length;
|
|
7
|
+
for (var cx = 0, dx = min(4, blength); cx < dx; cx++) {
|
|
5
8
|
var b = buff[cx];
|
|
6
|
-
temp = temp + ((b & 0x7f) << delta)
|
|
9
|
+
temp = temp + ((b & 0x7f) << delta);
|
|
10
|
+
if (b >> 7) {
|
|
11
|
+
delta += 7;
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
dist.push(temp);
|
|
15
|
+
temp = 0;
|
|
16
|
+
delta = 0;
|
|
17
|
+
}
|
|
18
|
+
for (var cx = 4, dx = blength; cx < dx; cx++) {
|
|
19
|
+
var b = buff[cx];
|
|
20
|
+
temp = temp + (b & 0x7f) * pow(2, delta)
|
|
7
21
|
if (b >> 7) {
|
|
8
22
|
delta += 7;
|
|
9
23
|
continue;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
.data
|
|
2
|
+
; LzmaLib.inc
|
|
3
|
+
LzmaUncompress PROTO :PTR BYTE, :PTR DWORD, :PTR BYTE, :PTR DWORD
|
|
4
|
+
includelib LzmaLib.lib; https://github.com/yunxu1019/7zip 编译命令为 wasm\build-lib.bat
|
|
5
|
+
include windows.inc
|
|
6
|
+
includelib Kernel32.lib
|
|
2
7
|
errortext db "数据异常"
|
|
3
8
|
errortitle db "错误"
|
|
9
|
+
errorcode db "编码错误"
|
|
10
|
+
mtime FILETIME <0,0>
|
|
4
11
|
normal_huffman equ 0
|
|
5
12
|
normal_repeat1 equ 1
|
|
6
13
|
normal_repeat2 equ 2
|
|
@@ -8,7 +15,11 @@ normal_nocode1 equ 3
|
|
|
8
15
|
normal_nocode2 equ 4
|
|
9
16
|
normal_nocode3 equ 5
|
|
10
17
|
repeat_huffman equ 6
|
|
11
|
-
|
|
18
|
+
other_compress equ 7
|
|
19
|
+
normal_nocode4 equ 3
|
|
20
|
+
mtime_stamp equ 5;
|
|
21
|
+
access_mode equ 6;
|
|
22
|
+
lzma_3rd_party equ 7;
|
|
12
23
|
.code
|
|
13
24
|
|
|
14
25
|
fill proc start,leng,a
|
|
@@ -479,8 +490,55 @@ memcopy proc start,len,dist
|
|
|
479
490
|
ret
|
|
480
491
|
memcopy endp
|
|
481
492
|
|
|
493
|
+
|
|
494
|
+
; 输入:EDX:EAX = JavaScript时间戳(64位毫秒值)
|
|
495
|
+
; 输出:EDX:EAX = Windows FileTime(64位)
|
|
496
|
+
jsDateToFileTime proc
|
|
497
|
+
push ebx
|
|
498
|
+
push ecx
|
|
499
|
+
push esi
|
|
500
|
+
push edi
|
|
501
|
+
|
|
502
|
+
; 保存原始输入值
|
|
503
|
+
mov ebx, eax ; 低32位
|
|
504
|
+
mov ecx, edx ; 高32位
|
|
505
|
+
; 乘以10000 (0x2710)
|
|
506
|
+
; 先计算低32位 * 10000
|
|
507
|
+
mov eax, ebx
|
|
508
|
+
mov edx, 10000
|
|
509
|
+
mul edx ; EDX:EAX = EBX * 10000
|
|
510
|
+
mov esi, eax ; 保存乘积低32位
|
|
511
|
+
mov edi, edx ; 保存乘积高32位
|
|
512
|
+
|
|
513
|
+
; 再计算高32位 * 10000
|
|
514
|
+
mov eax, ecx
|
|
515
|
+
mov edx, 10000
|
|
516
|
+
mul edx ; EDX:EAX = ECX * 10000
|
|
517
|
+
add edi, eax ; 累加到乘积高32位
|
|
518
|
+
|
|
519
|
+
; 19db1ded53e8000
|
|
520
|
+
; 加上基准差值低32位
|
|
521
|
+
add esi, 0d53e8000h
|
|
522
|
+
adc edi, 0
|
|
523
|
+
|
|
524
|
+
; 加上基准差值高32位
|
|
525
|
+
mov eax, 019db1deh
|
|
526
|
+
add edi, eax
|
|
527
|
+
|
|
528
|
+
; 返回结果
|
|
529
|
+
mov eax, esi ; 低32位
|
|
530
|
+
mov edx, edi ; 高32位
|
|
531
|
+
|
|
532
|
+
pop edi
|
|
533
|
+
pop esi
|
|
534
|
+
pop ecx
|
|
535
|
+
pop ebx
|
|
536
|
+
ret
|
|
537
|
+
jsDateToFileTime endp
|
|
538
|
+
|
|
539
|
+
|
|
482
540
|
unpack proc start,len,dsth,passed
|
|
483
|
-
local writed,buff,bufflen,byteoffset,decoded,count,to
|
|
541
|
+
local writed,buff,bufflen,byteoffset,decoded,count,to,type1
|
|
484
542
|
local passed0
|
|
485
543
|
mov writed,0
|
|
486
544
|
mov eax,len
|
|
@@ -622,6 +680,87 @@ unpack proc start,len,dsth,passed
|
|
|
622
680
|
add ecx,4
|
|
623
681
|
add ecx,count
|
|
624
682
|
mov to,ecx
|
|
683
|
+
.elseif eax==other_compress
|
|
684
|
+
movzx eax,byte ptr[ecx]
|
|
685
|
+
local srclen,clen
|
|
686
|
+
mov type1,eax
|
|
687
|
+
xor eax, eax
|
|
688
|
+
mov al, byte ptr[ecx+1];
|
|
689
|
+
and al, 01fh;
|
|
690
|
+
.if eax>4
|
|
691
|
+
invoke MessageBox,NULL,offset errortext,offset errortitle,MB_OK
|
|
692
|
+
invoke ExitProcess,1
|
|
693
|
+
.endif
|
|
694
|
+
xor ebx,ebx
|
|
695
|
+
add ecx,2
|
|
696
|
+
.while eax>0
|
|
697
|
+
shl ebx,8
|
|
698
|
+
mov bl,byte ptr[ecx]
|
|
699
|
+
inc ecx
|
|
700
|
+
dec eax
|
|
701
|
+
.endw
|
|
702
|
+
mov clen,ebx
|
|
703
|
+
mov count,ebx
|
|
704
|
+
mov to,ecx
|
|
705
|
+
mov eax,type1;
|
|
706
|
+
.if eax == normal_nocode4
|
|
707
|
+
invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,count
|
|
708
|
+
mov decoded,eax
|
|
709
|
+
mov ecx,to
|
|
710
|
+
invoke memcopy,ecx,clen,decoded
|
|
711
|
+
mov ecx,to
|
|
712
|
+
add ecx,clen
|
|
713
|
+
.elseif eax == lzma_3rd_party
|
|
714
|
+
mov ecx,to
|
|
715
|
+
mov eax,[ecx]
|
|
716
|
+
mov count,eax
|
|
717
|
+
invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,count
|
|
718
|
+
mov decoded,eax
|
|
719
|
+
mov ecx,to
|
|
720
|
+
add ecx,4
|
|
721
|
+
mov eax,clen
|
|
722
|
+
sub eax,4
|
|
723
|
+
mov srclen,eax
|
|
724
|
+
invoke LzmaUncompress,decoded,addr count,ecx,addr srclen
|
|
725
|
+
.elseif eax == mtime_stamp;
|
|
726
|
+
mov eax,20250722h
|
|
727
|
+
mov eax,clen
|
|
728
|
+
mov ecx,to
|
|
729
|
+
push edx
|
|
730
|
+
xor ebx,ebx
|
|
731
|
+
push esi
|
|
732
|
+
xor edx,edx
|
|
733
|
+
.while eax>0
|
|
734
|
+
dec eax
|
|
735
|
+
push eax
|
|
736
|
+
mov esi,edx
|
|
737
|
+
shld edx,ebx,7
|
|
738
|
+
shl ebx,7
|
|
739
|
+
mov al,[ecx+eax]
|
|
740
|
+
shl al,1
|
|
741
|
+
mov bl,al
|
|
742
|
+
pop eax
|
|
743
|
+
.endw
|
|
744
|
+
mov eax,esi
|
|
745
|
+
shrd ebx,edx,1
|
|
746
|
+
pop esi
|
|
747
|
+
shl eax,7;
|
|
748
|
+
rcr edx,1
|
|
749
|
+
mov eax,ebx
|
|
750
|
+
call jsDateToFileTime
|
|
751
|
+
mov mtime.dwHighDateTime,edx
|
|
752
|
+
mov mtime.dwLowDateTime,eax
|
|
753
|
+
pop edx
|
|
754
|
+
mov count,0
|
|
755
|
+
.elseif eax == access_mode;暂不支持
|
|
756
|
+
mov count,0
|
|
757
|
+
.else
|
|
758
|
+
invoke MessageBox,NULL,offset errorcode, offset errortitle,MB_OK
|
|
759
|
+
invoke ExitProcess,1
|
|
760
|
+
.endif
|
|
761
|
+
mov ecx,to
|
|
762
|
+
add ecx,clen
|
|
763
|
+
mov to, ecx
|
|
625
764
|
.else
|
|
626
765
|
invoke MessageBox,NULL,offset errortext,offset errortitle,MB_OK
|
|
627
766
|
invoke ExitProcess,1
|
|
@@ -667,7 +806,9 @@ decodePackW proc srch,start,len,dsth,passed
|
|
|
667
806
|
mov eax,95577h
|
|
668
807
|
mov eax,DWORD ptr[ecx]
|
|
669
808
|
shr eax,5
|
|
809
|
+
invoke GetSystemTimeAsFileTime,offset mtime
|
|
670
810
|
invoke unpack,buff,len,dsth,passed
|
|
811
|
+
invoke SetFileTime,dsth,NULL,NULL,offset mtime
|
|
671
812
|
invoke GlobalFree,buff
|
|
672
813
|
ret
|
|
673
814
|
decodePackW endp
|
|
@@ -2,10 +2,15 @@ function encodeLEB128(buff) {
|
|
|
2
2
|
var dist = [];
|
|
3
3
|
for (var cx = 0, dx = buff.length; cx < dx; cx++) {
|
|
4
4
|
var b = buff[cx];
|
|
5
|
+
while (b > 0xffffffff) {
|
|
6
|
+
var t = b % 0x80;
|
|
7
|
+
dist.push(t | 0b10000000);
|
|
8
|
+
b = (b - t) / 0x80;
|
|
9
|
+
}
|
|
5
10
|
while (b > 127) {
|
|
6
11
|
var t = b & 0x7f;
|
|
7
12
|
dist.push(t | 0b10000000);
|
|
8
|
-
b = b
|
|
13
|
+
b = b >>> 7;
|
|
9
14
|
}
|
|
10
15
|
dist.push(b);
|
|
11
16
|
}
|
|
@@ -220,6 +220,10 @@ var fixType = function (o) {
|
|
|
220
220
|
type = EXPRESS;
|
|
221
221
|
break;
|
|
222
222
|
}
|
|
223
|
+
if (last.type === EXPRESS && last === queue[queue.length - 1]) {
|
|
224
|
+
type = STRAP;
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
223
227
|
var qp = queue.prev;
|
|
224
228
|
if (qp?.type === STRAP && qp.text === 'await') qp = qp.prev;
|
|
225
229
|
if (qp?.type === STRAP && qp.text === 'for') type = STRAP;
|
|
@@ -59,9 +59,9 @@ var ts = new Javascript;
|
|
|
59
59
|
ts.straps.push('interface', 'implements', "declare", "module", "readonly", "enum", 'type');
|
|
60
60
|
ts.tags[0].push("{")
|
|
61
61
|
ts.lbtype = false;
|
|
62
|
-
var testTypescript = function (text) {
|
|
62
|
+
var testTypescript = function (text, exp = text) {
|
|
63
63
|
var s = scanner2(text, ts);
|
|
64
|
-
return assert(s.toString(),
|
|
64
|
+
return assert(s.toString(), exp);
|
|
65
65
|
}
|
|
66
66
|
testTypescript(`const strict: Omit<typeof assert, 'equal' | 'notEqual' | 'deepEqual' | 'notDeepEqual' | 'ok' | 'strictEqual' | 'deepStrictEqual' | 'ifError' | 'strict'> & {
|
|
67
67
|
(value: unknown, message?: string | Error): asserts value;
|
|
@@ -124,6 +124,7 @@ a ? function () {} : function () {}
|
|
|
124
124
|
declare module 'buffer' {}
|
|
125
125
|
a <= 1;
|
|
126
126
|
`)
|
|
127
|
+
testTypescript(`;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r)`, "; (t = ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r)")
|
|
127
128
|
testTypescript(`
|
|
128
129
|
var a: TypeA
|
|
129
130
|
var a: TypeA, b: TypeB
|
package/coms/compile/Program.js
CHANGED
|
@@ -852,7 +852,7 @@ class Program {
|
|
|
852
852
|
}
|
|
853
853
|
}
|
|
854
854
|
else if (stamp_reg.test(m) && last) {
|
|
855
|
-
if (last.type === STAMP &&
|
|
855
|
+
if (last.type === STAMP && last === cache_stamp && powermap.hasOwnProperty(last.text + m)) break test;
|
|
856
856
|
if (last.istype || last.isprop || last.isargl) {
|
|
857
857
|
isTypeTag = true;
|
|
858
858
|
}
|
|
@@ -891,6 +891,9 @@ class Program {
|
|
|
891
891
|
case EXPRESS:
|
|
892
892
|
break test;
|
|
893
893
|
case SCOPED:
|
|
894
|
+
if (last.isExpress && powermap[m] <= powermap["++"]) {
|
|
895
|
+
break test;
|
|
896
|
+
}
|
|
894
897
|
if (queue.inExpress && !iscomment) break test;
|
|
895
898
|
break;
|
|
896
899
|
case STAMP:
|
|
@@ -952,6 +955,7 @@ class Program {
|
|
|
952
955
|
continue;
|
|
953
956
|
}
|
|
954
957
|
if (space_reg.test(m)) {
|
|
958
|
+
if (cache_stamp) push_stamp();
|
|
955
959
|
if (/[\r\n\u2028\u2029]/.test(m)) {
|
|
956
960
|
if (last && last.isend === false) {
|
|
957
961
|
last.isend = true;
|
|
@@ -1109,6 +1113,15 @@ class Program {
|
|
|
1109
1113
|
}
|
|
1110
1114
|
}
|
|
1111
1115
|
if (!last || last.type !== STRAP && last.isExpress || last.transive) queue.inExpress = true;
|
|
1116
|
+
else if (last.type === STAMP) {
|
|
1117
|
+
if (last.text === "*") {
|
|
1118
|
+
var lp = last.prev;
|
|
1119
|
+
if (lp.type !== STRAP || !/^(async|function)$/.test(lp.text)) queue.inExpress = true;
|
|
1120
|
+
}
|
|
1121
|
+
else {
|
|
1122
|
+
queue.inExpress = true;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1112
1125
|
scope.isExpress = queue.inExpress;
|
|
1113
1126
|
scope.inExpress = true;
|
|
1114
1127
|
}
|
|
@@ -1159,7 +1172,7 @@ class Program {
|
|
|
1159
1172
|
var last = queue.last || queue;
|
|
1160
1173
|
console.warn(
|
|
1161
1174
|
"代码异常结束", createString(origin.slice(0, 30)),
|
|
1162
|
-
`\r\n - 祖先标记: ${parents.slice(1).map(p =>
|
|
1175
|
+
`\r\n - 祖先标记: ${parents.slice(1).map(p => `${p.entry || ""}<red2>${p.tag || p.text || ""}</red2><gray>${p.row}:${p.col}</gray>`).join('')}`,
|
|
1163
1176
|
`\r\n - 内层入口: <yellow>${this.mindpath}</yellow>:${last.row}:${last.col} ${last.text || last.entry}`,
|
|
1164
1177
|
`\r\n ----- 快照: ${createString(pickAssignment(queue.last || queue))}`,
|
|
1165
1178
|
);
|
package/coms/compile/common.js
CHANGED
|
@@ -886,32 +886,20 @@ var createScoped = function (parsed, wash) {
|
|
|
886
886
|
else if (isArraw) {
|
|
887
887
|
var n = skipAssignment(o);
|
|
888
888
|
scoped.arraw = o;
|
|
889
|
-
var u = o;
|
|
890
889
|
while (o !== n) {
|
|
891
890
|
var n1 = run(o, 0);
|
|
892
|
-
if (
|
|
891
|
+
if (n1 === o || n1?.entry === "{") o = getnext(n1);
|
|
893
892
|
else o = n1;
|
|
894
893
|
}
|
|
895
894
|
}
|
|
896
895
|
else {
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
if (
|
|
903
|
-
|
|
904
|
-
var p = getprev(o);
|
|
905
|
-
if (o.type === STAMP && /^(\+\+|\-\-)$/.test(o.text) && p?.type === EXPRESS
|
|
906
|
-
|| (VALUE | QUOTED | SCOPED) & o.type
|
|
907
|
-
|| EXPRESS === o.type && !needfoot_reg.test(o.text)) {
|
|
908
|
-
if ((VALUE | QUOTED | PROPERTY | LABEL) & n.type) break;
|
|
909
|
-
if (EXPRESS === n.type && !/^[\.\[]/.test(n.text)) break;
|
|
910
|
-
if (n.type === SCOPED && n.brace) break;
|
|
911
|
-
if (n.type === STRAP && !n.isExpress) break;
|
|
912
|
-
}
|
|
913
|
-
o = n;
|
|
914
|
-
} while (o);
|
|
896
|
+
var n = skipAssignment(o);
|
|
897
|
+
var n1 = o;
|
|
898
|
+
while (n1 && n1 !== n) {
|
|
899
|
+
o = n1;
|
|
900
|
+
n1 = run(n1, 0);
|
|
901
|
+
if (n1) n1 = getnext(n1);
|
|
902
|
+
}
|
|
915
903
|
}
|
|
916
904
|
var map = isFunction ? vars : lets;
|
|
917
905
|
var keepscope = !!scoped.body || !!scoped.head;
|
|
@@ -43,3 +43,4 @@ testPickSentence(`if(a)try{}catch{} else if(a);`, 0, "if (a) try {} catch {} els
|
|
|
43
43
|
assert(common.createString(common.pickArgument(scanner2(`a={a:1,c:d}`)[2][4])), 'c: d')
|
|
44
44
|
assert(common.createString(common.pickArgument(scanner2(`a=class{a=1\r\nc=d}`)[3][4])), 'c = d')
|
|
45
45
|
assert(common.createString(common.pickArgument(scanner2(`(a=1,c=d)`)[0][4])), 'c = d')
|
|
46
|
+
assert(scanner2(`for (let len of codeLengths) if (len) count[len]++;`).envs, { len: undefined })
|
package/coms/docs/helps.js
CHANGED
|
@@ -42,6 +42,7 @@ var helps = [
|
|
|
42
42
|
["-", i18n`从可执行文件的扫描路径中移除指定的路径`, "pathxrm PATHNAME"],
|
|
43
43
|
["-", i18n`设置远程访问的密码`, "password"],
|
|
44
44
|
["-", i18n`创建windows平台的一键安装包`, "packwin|packexe PUBLIC_PATH PACKAGE_PATH"],
|
|
45
|
+
["-", i18n`压缩到zip文件`, "packzip|zip PUBLIC_PATH PACKAGE_PATH"],
|
|
45
46
|
["-", i18n`从压缩文件提取源文件`, "unpack PACKAGE_PATH PUBLIC_PATH"]
|
|
46
47
|
];
|
|
47
48
|
helps.forEach((h, cx) => {
|
package/coms/kugou/krc.js
CHANGED
|
@@ -129,7 +129,7 @@ function createLRC(lrc) {
|
|
|
129
129
|
krcList.rows = saved_rows;
|
|
130
130
|
return krcList;
|
|
131
131
|
}
|
|
132
|
-
|
|
132
|
+
var metadata = hookmedia() || document;
|
|
133
133
|
function setClass(krcList, index) {
|
|
134
134
|
var ele = krcList[index];
|
|
135
135
|
krcList.slice(0, index).map(function (a, cx, arr) {
|
|
@@ -139,7 +139,8 @@ function setClass(krcList, index) {
|
|
|
139
139
|
removeClass(ele, "after before after-active before-active");
|
|
140
140
|
addClass(krcList[index - 1], 'before-active');
|
|
141
141
|
addClass(ele, "active");
|
|
142
|
-
if (ele.innerText)
|
|
142
|
+
if (ele.innerText) metadata.title = ele.innerText;
|
|
143
|
+
else metadata.title = '';
|
|
143
144
|
krcList.slice(index + 1).map(function (a) {
|
|
144
145
|
removeClass(a, "before active after-active before-active");
|
|
145
146
|
addClass(a, "after");
|
package/coms/kugou/musicList.js
CHANGED
|
@@ -16,6 +16,8 @@ var isSameSong = function (m1, m2) {
|
|
|
16
16
|
m1.url && String(m1.url).replace(/#[\s\S]*$/, '') === String(m2.url).replace(/#[\s\S]*$/, '');
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
var metadata = hookmedia();
|
|
20
|
+
|
|
19
21
|
function addMethod(name, func) {
|
|
20
22
|
Object.defineProperty(musicList, name, {
|
|
21
23
|
value: func,
|
|
@@ -29,6 +31,13 @@ addMethod("setActive", function (m) {
|
|
|
29
31
|
}
|
|
30
32
|
actived = m;
|
|
31
33
|
}
|
|
34
|
+
if (actived && metadata) {
|
|
35
|
+
metadata.title = actived.songName || actived.name || actived.title;
|
|
36
|
+
metadata.artist = actived.singerName || actived.singer;
|
|
37
|
+
if (actived.avatar) metadata.artwork = [{
|
|
38
|
+
src: actived.avatar
|
|
39
|
+
}]
|
|
40
|
+
}
|
|
32
41
|
});
|
|
33
42
|
addMethod("remove", function (music) {
|
|
34
43
|
for (var cx = this.length - 1; cx >= 0; cx--) {
|
package/coms/reptile/window.js
CHANGED
|
@@ -11,17 +11,20 @@ else {
|
|
|
11
11
|
'Date', 'Promise', 'Function',
|
|
12
12
|
'RegExp', 'Object', 'String',
|
|
13
13
|
'Array', 'Number', 'Boolean',
|
|
14
|
-
'Error', 'TypeError', 'Uint8Array',
|
|
14
|
+
'Error', 'TypeError', 'Uint8Array',"DataView",
|
|
15
15
|
'Uint16Array', 'Uint32Array', 'Uint8ClampedArray',
|
|
16
16
|
'ArrayBuffer', 'Int8Array', 'Int16Array',
|
|
17
17
|
'Int32Array', 'Float32Array', 'Float64Array',
|
|
18
18
|
'Map', 'Set', 'Proxy',
|
|
19
19
|
'WeakMap', 'Reflect', 'console',
|
|
20
|
+
"WebAssembly",
|
|
20
21
|
'Math', 'JSON', 'NaN',
|
|
21
22
|
'Infinity', 'isNaN', 'isFinite',
|
|
22
23
|
'parseInt', 'parseFloat', 'decodeURI',
|
|
23
24
|
'encodeURI', 'decodeURIComponent', 'encodeURIComponent',
|
|
24
25
|
'document', 'navigator', 'process',
|
|
26
|
+
"BigUint64Array",
|
|
27
|
+
"i18n",
|
|
25
28
|
'BigInt64Array', 'Buffer', 'Intl',
|
|
26
29
|
'BigInt', 'Symbol', 'SharedArrayBuffer',
|
|
27
30
|
'escape', 'unescape', 'clearImmediate',
|
|
@@ -34,4 +37,5 @@ else {
|
|
|
34
37
|
});
|
|
35
38
|
window.globalThis = window.global = window.top = window.window = window;
|
|
36
39
|
module.exports = window;
|
|
40
|
+
for(var k in global)if((!(k in window)))console.log(k)
|
|
37
41
|
}
|