Commit 5d0a9d8f authored by wang's avatar wang

环境兼容

parent 2fab541a
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -4,7 +4,7 @@ import time ...@@ -4,7 +4,7 @@ import time
import requests import requests
import json import json
import tls_client import tls_client
from bson import ObjectId
from pymongo import MongoClient from pymongo import MongoClient
...@@ -53,7 +53,10 @@ for i in range(100): ...@@ -53,7 +53,10 @@ for i in range(100):
else: else:
raise Exception("执行js失败") raise Exception("执行js失败")
r = json.loads(tmp) r = json.loads(tmp)
res = db.env_shape.update_one(
{'_id': ObjectId(selectId)},
{"$inc": {"used": 1}}
)
# r = { # r = {
# 'X-1ItxWO9i-f': 'A7AKCbCJAQAAV93ahgnafaQIeEbvT-Ss7YkuAnwrNQi_E70IpAViSqhv3hLLAXL3RNiucirJwH9eCOfvosJeCA==', # 'X-1ItxWO9i-f': 'A7AKCbCJAQAAV93ahgnafaQIeEbvT-Ss7YkuAnwrNQi_E70IpAViSqhv3hLLAXL3RNiucirJwH9eCOfvosJeCA==',
# 'X-1ItxWO9i-b': 'ewccp4', # 'X-1ItxWO9i-b': 'ewccp4',
...@@ -105,6 +108,10 @@ for i in range(100): ...@@ -105,6 +108,10 @@ for i in range(100):
# print(response.text) # print(response.text)
if response.status_code == 200: if response.status_code == 200:
res = db.env_shape.update_one(
{'_id': ObjectId(selectId)},
{"$inc": {"success": 1}}
)
# proxy = requests.post('http://ymx-lcc.unififi.com/proxy/get-proxy', json={ # proxy = requests.post('http://ymx-lcc.unififi.com/proxy/get-proxy', json={
# 'type':'headerB6' # 'type':'headerB6'
# }) # })
......
...@@ -11,8 +11,9 @@ const fss = require("fs"); ...@@ -11,8 +11,9 @@ const fss = require("fs");
var drives = fss.readFileSync('graphicsdrivers.txt').toString().split('\n') var drives = fss.readFileSync('graphicsdrivers.txt').toString().split('\n')
var ENVS = JSON.parse(fss.readFileSync('env.json').toString()) var ENVS = JSON.parse(fss.readFileSync('env.json').toString())
// dc6a639f12738c9276d68c74
let ENV = ENVS[process.argv[2] || '414c818f3d46654a0f800254'] let keys = Object.keys(ENVS);
let ENV = ENVS[process.argv[2] || keys[parseInt(Math.random() * keys.length)]]
// let ENV = ENVS[ '1'] // let ENV = ENVS[ '1']
let randomEvent = false; let randomEvent = false;
let timeout = false; let timeout = false;
...@@ -108,25 +109,25 @@ Date.prototype.toString = v_saf(function () { ...@@ -108,25 +109,25 @@ Date.prototype.toString = v_saf(function () {
} }
}, 'toString') }, 'toString')
Date.now = function now() { // Date.now = function now() {
return 1685096207545 // return 1685096207545
}; // };
Date.parse = function () { // Date.parse = function () {
return 1685096207545 // return 1685096207545
}; // };
Date.prototype.valueOf = function () { // Date.prototype.valueOf = function () {
return 1685096207545 // return 1685096207545
}; // };
Date.prototype.getTime = function () { // Date.prototype.getTime = function () {
return 1685096207545 // return 1685096207545
}; // };
Date.prototype.toString = function () { // Date.prototype.toString = function () {
return 1685096207545 // return 1685096207545
}; // };
Performance.prototype.now = function now() { // Performance.prototype.now = function now() {
return Number('1685096207545'.slice(8)) // return Number('1685096207545'.slice(8))
} // }
//
Math.random = function random() { Math.random = function random() {
return 0.08636862211354912 return 0.08636862211354912
}; };
...@@ -523,6 +524,8 @@ const dom = new JSDOM(` ...@@ -523,6 +524,8 @@ const dom = new JSDOM(`
}); });
window = dom.window; window = dom.window;
window._random = _random
window.URL.createObjectURL = function () { window.URL.createObjectURL = function () {
console.log('createObjectURL', arguments) console.log('createObjectURL', arguments)
...@@ -545,7 +548,24 @@ class TextMetrics { ...@@ -545,7 +548,24 @@ class TextMetrics {
this._context = context this._context = context
// this._TextMetrics = context.measureText(text) // this._TextMetrics = context.measureText(text)
try { try {
this._TextMetrics = metrics[this._font][this._text] metrics = window.ENV.fontsres
if (metrics[this._font][this._text]) {
this._TextMetrics = metrics[this._font][this._text]
} else {
if (metrics[this._font.replace(' serif', ' sans-serif')][this._text]) {
this._TextMetrics = metrics[this._font.replace('serif', 'sans-serif')][this._text]
}else {
this._TextMetrics = {
"width": 132.39996337890625 * _random(),
"actualboundingboxascent": -4.299999237060547* _random(),
"actualboundingboxleft": -1.600000023841858* _random(),
"actualboundingboxright": 129.59996032714844* _random(),
"fontboundingboxascent": parseInt(10* _random()),
"actualboundingboxdescent": 49.95000076293945 * _random()
}
}
}
} catch (e) { } catch (e) {
console.log('_TextMetrics', this._text, this._font) console.log('_TextMetrics', this._text, this._font)
this._TextMetrics = { this._TextMetrics = {
...@@ -561,6 +581,9 @@ class TextMetrics { ...@@ -561,6 +581,9 @@ class TextMetrics {
} else { } else {
res = parseInt(res * textRandom); res = parseInt(res * textRandom);
} }
if (this._text === '0-_{w.') {
// debugger
}
return res; return res;
} }
...@@ -644,7 +667,7 @@ class OffscreenCanvasRenderingContext2D { ...@@ -644,7 +667,7 @@ class OffscreenCanvasRenderingContext2D {
} }
measureText(text) { measureText(text) {
console.log('OffscreenCanvasRenderingContext2D.measureText', text) console.log('OffscreenCanvasRenderingContext2D.measureText1', text)
this._text = text; this._text = text;
window.fonts.push({ window.fonts.push({
font: this._font, font: this._font,
...@@ -2792,6 +2815,11 @@ Object.defineProperties(MediaQueryList.prototype, { ...@@ -2792,6 +2815,11 @@ Object.defineProperties(MediaQueryList.prototype, {
if (t === undefined) { if (t === undefined) {
t = false; t = false;
} }
if (_random() > 0.5){
t = true
}else {
t = false;
}
v_console_log(" [*] MediaQueryList -> matches[get]", this.type[0], t); v_console_log(" [*] MediaQueryList -> matches[get]", this.type[0], t);
return t; return t;
...@@ -3752,7 +3780,6 @@ con4 = function () { ...@@ -3752,7 +3780,6 @@ con4 = function () {
}; };
(function Z(k) { (function Z(k) {
var h = new Error("HALT"); var h = new Error("HALT");
var B = {}, A = {}; var B = {}, A = {};
...@@ -4700,9 +4727,9 @@ con4 = function () { ...@@ -4700,9 +4727,9 @@ con4 = function () {
var kQ = [function (kP) { var kQ = [function (kP) {
"use strict"; "use strict";
con3(kP.a[kP.a.length - 3], 'set', kP.a[kP.a.length - 2], '==>', kP.a[kP.a.length - 1]) con3(kP.a[kP.a.length - 3], 'set', kP.a[kP.a.length - 2] ,'==>', kP.a[kP.a.length - 1])
if (kP.a[kP.a.length - 2] === '4' && kP.a[kP.a.length - 1] === 28) { if (kP.a[kP.a.length - 2] === '4' && kP.a[kP.a.length - 1] === 28 ){
debugger; debugger;
} }
kP.a[kP.a.length - 3][kP.a[kP.a.length - 2]] = kP.a[kP.a.length - 1]; kP.a[kP.a.length - 3][kP.a[kP.a.length - 2]] = kP.a[kP.a.length - 1];
...@@ -4727,7 +4754,7 @@ con4 = function () { ...@@ -4727,7 +4754,7 @@ con4 = function () {
kC.Y = ka kC.Y = ka
}, function (kb) { }, function (kb) {
con3(kb.a[kb.a.length - 2], '&', kb.a[kb.a.length - 1], '==>>', kb.a[kb.a.length - 2] & kb.a[kb.a.length - 1]); con3(kb.a[kb.a.length - 2], '&', kb.a[kb.a.length - 1], '==>>', kb.a[kb.a.length - 2] & kb.a[kb.a.length - 1]);
kb.a[kb.a.length - 2] = kb.a[kb.a.length - 2] & kb.a[kb.a.length - 1]; kb.a[kb.a.length - 2] = kb.a[kb.a.length - 2] & kb.a[kb.a.length - 1];
kb.a.length -= 1 kb.a.length -= 1
}, function (kI) { }, function (kI) {
var kT = kx[kI.h] << 16 | (kx[kI.h + 1] << 8 | kx[kI.h + 2]); var kT = kx[kI.h] << 16 | (kx[kI.h + 1] << 8 | kx[kI.h + 2]);
...@@ -4736,7 +4763,7 @@ con4 = function () { ...@@ -4736,7 +4763,7 @@ con4 = function () {
kI.k.e({d: kT, Y: kN, l: 0}) kI.k.e({d: kT, Y: kN, l: 0})
}, function (hZ) { }, function (hZ) {
con3(hZ.a[hZ.a.length - 2], '<', hZ.a[hZ.a.length - 1], '==>>', hZ.a[hZ.a.length - 2] < hZ.a[hZ.a.length - 1]); con3(hZ.a[hZ.a.length - 2], '<', hZ.a[hZ.a.length - 1], '==>>', hZ.a[hZ.a.length - 2] < hZ.a[hZ.a.length - 1]);
hZ.a[hZ.a.length - 2] = hZ.a[hZ.a.length - 2] < hZ.a[hZ.a.length - 1]; hZ.a[hZ.a.length - 2] = hZ.a[hZ.a.length - 2] < hZ.a[hZ.a.length - 1];
hZ.a.length -= 1 hZ.a.length -= 1
}, function (hk) { }, function (hk) {
hk.a.length -= 1 hk.a.length -= 1
...@@ -4839,7 +4866,7 @@ con4 = function () { ...@@ -4839,7 +4866,7 @@ con4 = function () {
Bc.a[Bc.a.length] = [] Bc.a[Bc.a.length] = []
}, function (BJ) { }, function (BJ) {
con3(BJ.a[BJ.a.length - 2], '-', BJ.a[BJ.a.length - 1], '==>>', BJ.a[BJ.a.length - 2] - BJ.a[BJ.a.length - 1]); con3(BJ.a[BJ.a.length - 2], '-', BJ.a[BJ.a.length - 1], '==>>', BJ.a[BJ.a.length - 2] - BJ.a[BJ.a.length - 1]);
BJ.a[BJ.a.length - 2] = BJ.a[BJ.a.length - 2] - BJ.a[BJ.a.length - 1]; BJ.a[BJ.a.length - 2] = BJ.a[BJ.a.length - 2] - BJ.a[BJ.a.length - 1];
BJ.a.length -= 1 BJ.a.length -= 1
}, function (Bp) { }, function (Bp) {
Bp.k.r() Bp.k.r()
...@@ -4940,7 +4967,7 @@ con4 = function () { ...@@ -4940,7 +4967,7 @@ con4 = function () {
AA.Y = AW AA.Y = AW
}, function (Aj) { }, function (Aj) {
con3(Aj.a[Aj.a.length - 2], '==', Aj.a[Aj.a.length - 1], '==>>', Aj.a[Aj.a.length - 2] == Aj.a[Aj.a.length - 1]); con3(Aj.a[Aj.a.length - 2], '==', Aj.a[Aj.a.length - 1], '==>>', Aj.a[Aj.a.length - 2] == Aj.a[Aj.a.length - 1]);
Aj.a[Aj.a.length - 2] = Aj.a[Aj.a.length - 2] == Aj.a[Aj.a.length - 1]; Aj.a[Aj.a.length - 2] = Aj.a[Aj.a.length - 2] == Aj.a[Aj.a.length - 1];
Aj.a.length -= 1 Aj.a.length -= 1
}, function (Ac) { }, function (Ac) {
var AJ = kx[Ac.h]; var AJ = kx[Ac.h];
...@@ -5198,7 +5225,7 @@ con4 = function () { ...@@ -5198,7 +5225,7 @@ con4 = function () {
WE.a.length -= 1 WE.a.length -= 1
}, function (WR) { }, function (WR) {
con3(WR.a[WR.a.length - 2], '>=', WR.a[WR.a.length - 1], '==>>', WR.a[WR.a.length - 2] >= WR.a[WR.a.length - 1]); con3(WR.a[WR.a.length - 2], '>=', WR.a[WR.a.length - 1], '==>>', WR.a[WR.a.length - 2] >= WR.a[WR.a.length - 1]);
WR.a[WR.a.length - 2] = WR.a[WR.a.length - 2] >= WR.a[WR.a.length - 1]; WR.a[WR.a.length - 2] = WR.a[WR.a.length - 2] >= WR.a[WR.a.length - 1];
WR.a.length -= 1 WR.a.length -= 1
}, function (Wb) { }, function (Wb) {
var WI = kx[Wb.h]; var WI = kx[Wb.h];
...@@ -5277,7 +5304,7 @@ con4 = function () { ...@@ -5277,7 +5304,7 @@ con4 = function () {
jQ.a[jQ.a.length - 1] = je jQ.a[jQ.a.length - 1] = je
}, function (jy) { }, function (jy) {
con3(jy.a[jy.a.length - 2], '>>>', jy.a[jy.a.length - 1], '==>>', jy.a[jy.a.length - 2] >>> jy.a[jy.a.length - 1]); con3(jy.a[jy.a.length - 2], '>>>', jy.a[jy.a.length - 1], '==>>', jy.a[jy.a.length - 2] >>> jy.a[jy.a.length - 1]);
jy.a[jy.a.length - 2] = jy.a[jy.a.length - 2] >>> jy.a[jy.a.length - 1]; jy.a[jy.a.length - 2] = jy.a[jy.a.length - 2] >>> jy.a[jy.a.length - 1];
jy.a.length -= 1 jy.a.length -= 1
}, function (jE) { }, function (jE) {
var jg = kx[jE.h]; var jg = kx[jE.h];
...@@ -5390,7 +5417,7 @@ con4 = function () { ...@@ -5390,7 +5417,7 @@ con4 = function () {
cC.a[cT + 2] = cC.x.v(cb) cC.a[cT + 2] = cC.x.v(cb)
}, function (cN) { }, function (cN) {
con3(cN.a[cN.a.length - 2], '>', cN.a[cN.a.length - 1], '==>>', cN.a[cN.a.length - 2] > cN.a[cN.a.length - 1]); con3(cN.a[cN.a.length - 2], '>', cN.a[cN.a.length - 1], '==>>', cN.a[cN.a.length - 2] > cN.a[cN.a.length - 1]);
cN.a[cN.a.length - 2] = cN.a[cN.a.length - 2] > cN.a[cN.a.length - 1]; cN.a[cN.a.length - 2] = cN.a[cN.a.length - 2] > cN.a[cN.a.length - 1];
cN.a.length -= 1 cN.a.length -= 1
}, function (JZ) { }, function (JZ) {
var Jk = kx[JZ.h]; var Jk = kx[JZ.h];
...@@ -5529,7 +5556,7 @@ con4 = function () { ...@@ -5529,7 +5556,7 @@ con4 = function () {
pi.a[pH + 1] = pi.x.v(pm) pi.a[pH + 1] = pi.x.v(pm)
}, function (pz) { }, function (pz) {
con3(pz.a[pz.a.length - 2], '%', pz.a[pz.a.length - 1], '==>>', pz.a[pz.a.length - 2] % pz.a[pz.a.length - 1]); con3(pz.a[pz.a.length - 2], '%', pz.a[pz.a.length - 1], '==>>', pz.a[pz.a.length - 2] % pz.a[pz.a.length - 1]);
pz.a[pz.a.length - 2] = pz.a[pz.a.length - 2] % pz.a[pz.a.length - 1]; pz.a[pz.a.length - 2] = pz.a[pz.a.length - 2] % pz.a[pz.a.length - 1];
pz.a.length -= 1 pz.a.length -= 1
}, function (pu) { }, function (pu) {
var pr = kx[pu.h] << 8 | kx[pu.h + 1]; var pr = kx[pu.h] << 8 | kx[pu.h + 1];
...@@ -5622,7 +5649,7 @@ con4 = function () { ...@@ -5622,7 +5649,7 @@ con4 = function () {
YY.a.length -= 1 YY.a.length -= 1
}, function (YV) { }, function (YV) {
con3(YV.a[YV.a.length - 2], '>>', YV.a[YV.a.length - 1], '==>>', YV.a[YV.a.length - 2] >> YV.a[YV.a.length - 1]); con3(YV.a[YV.a.length - 2], '>>', YV.a[YV.a.length - 1], '==>>', YV.a[YV.a.length - 2] >> YV.a[YV.a.length - 1]);
YV.a[YV.a.length - 2] = YV.a[YV.a.length - 2] >> YV.a[YV.a.length - 1]; YV.a[YV.a.length - 2] = YV.a[YV.a.length - 2] >> YV.a[YV.a.length - 1];
YV.a.length -= 1 YV.a.length -= 1
}, function (YH) { }, function (YH) {
var Yz = kx[YH.h]; var Yz = kx[YH.h];
...@@ -5655,7 +5682,7 @@ con4 = function () { ...@@ -5655,7 +5682,7 @@ con4 = function () {
YP.a.length -= 2 YP.a.length -= 2
}, function (Yn) { }, function (Yn) {
con3(Yn.a[Yn.a.length - 2], '<=', Yn.a[Yn.a.length - 1], '==>>', Yn.a[Yn.a.length - 2] <= Yn.a[Yn.a.length - 1]); con3(Yn.a[Yn.a.length - 2], '<=', Yn.a[Yn.a.length - 1], '==>>', Yn.a[Yn.a.length - 2] <= Yn.a[Yn.a.length - 1]);
Yn.a[Yn.a.length - 2] = Yn.a[Yn.a.length - 2] <= Yn.a[Yn.a.length - 1]; Yn.a[Yn.a.length - 2] = Yn.a[Yn.a.length - 2] <= Yn.a[Yn.a.length - 1];
Yn.a.length -= 1 Yn.a.length -= 1
}, function (Ye) { }, function (Ye) {
var Yy = Ye.a[Ye.a.length - 2]; var Yy = Ye.a[Ye.a.length - 2];
...@@ -5875,7 +5902,7 @@ con4 = function () { ...@@ -5875,7 +5902,7 @@ con4 = function () {
ob.k.e({d: oI, Y: oT, l: 0}) ob.k.e({d: oI, Y: oT, l: 0})
}, function (oN) { }, function (oN) {
con3(oN.a[oN.a.length - 2], '<<', oN.a[oN.a.length - 1], '==>>', oN.a[oN.a.length - 2] << oN.a[oN.a.length - 1]); con3(oN.a[oN.a.length - 2], '<<', oN.a[oN.a.length - 1], '==>>', oN.a[oN.a.length - 2] << oN.a[oN.a.length - 1]);
oN.a[oN.a.length - 2] = oN.a[oN.a.length - 2] << oN.a[oN.a.length - 1]; oN.a[oN.a.length - 2] = oN.a[oN.a.length - 2] << oN.a[oN.a.length - 1];
oN.a.length -= 1 oN.a.length -= 1
}, function (iZ) { }, function (iZ) {
iZ.a[iZ.a.length] = iZ.H iZ.a[iZ.a.length] = iZ.H
...@@ -5898,7 +5925,7 @@ con4 = function () { ...@@ -5898,7 +5925,7 @@ con4 = function () {
iU.a.length -= 3 iU.a.length -= 3
}, function (iF) { }, function (iF) {
con3(iF.a[iF.a.length - 2], '|', iF.a[iF.a.length - 1], '==>>', iF.a[iF.a.length - 2] | iF.a[iF.a.length - 1]); con3(iF.a[iF.a.length - 2], '|', iF.a[iF.a.length - 1], '==>>', iF.a[iF.a.length - 2] | iF.a[iF.a.length - 1]);
iF.a[iF.a.length - 2] = iF.a[iF.a.length - 2] | iF.a[iF.a.length - 1]; iF.a[iF.a.length - 2] = iF.a[iF.a.length - 2] | iF.a[iF.a.length - 1];
iF.a.length -= 1 iF.a.length -= 1
}, function (io) { }, function (io) {
var ii = kx[io.h]; var ii = kx[io.h];
...@@ -6027,7 +6054,7 @@ con4 = function () { ...@@ -6027,7 +6054,7 @@ con4 = function () {
Xm.a[Xr + 1] = XM Xm.a[Xr + 1] = XM
}, function (XK) { }, function (XK) {
con3(XK.a[XK.a.length - 2], '===', XK.a[XK.a.length - 1], '==>>', XK.a[XK.a.length - 2] === XK.a[XK.a.length - 1]); con3(XK.a[XK.a.length - 2], '===', XK.a[XK.a.length - 1], '==>>', XK.a[XK.a.length - 2] === XK.a[XK.a.length - 1]);
XK.a[XK.a.length - 2] = XK.a[XK.a.length - 2] === XK.a[XK.a.length - 1]; XK.a[XK.a.length - 2] = XK.a[XK.a.length - 2] === XK.a[XK.a.length - 1];
XK.a.length -= 1 XK.a.length -= 1
}, function (XO) { }, function (XO) {
var XL = kx[XO.h] << 16 | (kx[XO.h + 1] << 8 | kx[XO.h + 2]); var XL = kx[XO.h] << 16 | (kx[XO.h + 1] << 8 | kx[XO.h + 2]);
...@@ -6499,7 +6526,7 @@ con4 = function () { ...@@ -6499,7 +6526,7 @@ con4 = function () {
MV.a[MO + 2] = MV.x.v(Mz) MV.a[MO + 2] = MV.x.v(Mz)
}, function (ML) { }, function (ML) {
con3(ML.a[ML.a.length - 2], '+', ML.a[ML.a.length - 1], '==>>', ML.a[ML.a.length - 2] + ML.a[ML.a.length - 1]); con3(ML.a[ML.a.length - 2], '+', ML.a[ML.a.length - 1], '==>>', ML.a[ML.a.length - 2] + ML.a[ML.a.length - 1]);
ML.a[ML.a.length - 2] = ML.a[ML.a.length - 2] + ML.a[ML.a.length - 1]; ML.a[ML.a.length - 2] = ML.a[ML.a.length - 2] + ML.a[ML.a.length - 1];
ML.a.length -= 1 ML.a.length -= 1
}, function (Md) { }, function (Md) {
Md.a[Md.a.length] = E Md.a[Md.a.length] = E
...@@ -6518,7 +6545,7 @@ con4 = function () { ...@@ -6518,7 +6545,7 @@ con4 = function () {
Mg.a.length -= 1 Mg.a.length -= 1
}, function (Mw) { }, function (Mw) {
con3(Mw.a[Mw.a.length - 2], '^', Mw.a[Mw.a.length - 1], '==>>', Mw.a[Mw.a.length - 2] ^ Mw.a[Mw.a.length - 1]); con3(Mw.a[Mw.a.length - 2], '^', Mw.a[Mw.a.length - 1], '==>>', Mw.a[Mw.a.length - 2] ^ Mw.a[Mw.a.length - 1]);
Mw.a[Mw.a.length - 2] = Mw.a[Mw.a.length - 2] ^ Mw.a[Mw.a.length - 1]; Mw.a[Mw.a.length - 2] = Mw.a[Mw.a.length - 2] ^ Mw.a[Mw.a.length - 1];
Mw.a.length -= 1 Mw.a.length -= 1
}, function (Mf) { }, function (Mf) {
Mf.a[Mf.a.length - 1] = typeof Mf.a[Mf.a.length - 1] Mf.a[Mf.a.length - 1] = typeof Mf.a[Mf.a.length - 1]
...@@ -6648,7 +6675,7 @@ con4 = function () { ...@@ -6648,7 +6675,7 @@ con4 = function () {
tk.a[tj + 1] = tA tk.a[tj + 1] = tA
}, function (tc) { }, function (tc) {
con3(tc.a[tc.a.length - 2], '*', tc.a[tc.a.length - 1], '==>>', tc.a[tc.a.length - 2] * tc.a[tc.a.length - 1]); con3(tc.a[tc.a.length - 2], '*', tc.a[tc.a.length - 1], '==>>', tc.a[tc.a.length - 2] * tc.a[tc.a.length - 1]);
tc.a[tc.a.length - 2] = tc.a[tc.a.length - 2] * tc.a[tc.a.length - 1]; tc.a[tc.a.length - 2] = tc.a[tc.a.length - 2] * tc.a[tc.a.length - 1];
tc.a.length -= 1 tc.a.length -= 1
}, function (tJ) { }, function (tJ) {
var tp = kx[tJ.h]; var tp = kx[tJ.h];
...@@ -6864,7 +6891,7 @@ setTimeout(() => { ...@@ -6864,7 +6891,7 @@ setTimeout(() => {
// print(JSON.stringify(window.imageDatas)) // print(JSON.stringify(window.imageDatas))
// print(JSON.stringify(medias)) // print(JSON.stringify(medias))
// print(candidateGetTimes) // print(candidateGetTimes)
// process.exit(0) process.exit(0)
}, 2000) }, 2000)
// debug = true; // debug = true;
......
...@@ -265,7 +265,7 @@ function Window(options) { ...@@ -265,7 +265,7 @@ function Window(options) {
// debugger; // debugger;
// } // }
let res = Reflect.get(target, p, receiver); let res = Reflect.get(target, p, receiver);
if (!['Object','Window' , 'debug','Math', 'Array'].includes(p)){ if (!['Object','Window' , 'debug','Math', 'Array', '_random'].includes(p)){
console.log('window get', p, typeof res) console.log('window get', p, typeof res)
} }
......
...@@ -139,7 +139,10 @@ exports.install = (globalObject, globalNames) => { ...@@ -139,7 +139,10 @@ exports.install = (globalObject, globalNames) => {
let res = utils.tryWrapperForImpl(esValue[implSymbol].canPlayType(...args)); let res = utils.tryWrapperForImpl(esValue[implSymbol].canPlayType(...args));
window.videos.push(type) window.videos.push(type)
if (window.ENV.canplay[type]){ if (window.ENV.canplay[type]){
res = videos[type] res = window.ENV.canplay[type]
if (!res){
res = 'probably'
}
} }
console.log('canPlayType', type, res) console.log('canPlayType', type, res)
......
...@@ -903,7 +903,7 @@ class DocumentImpl extends NodeImpl { ...@@ -903,7 +903,7 @@ class DocumentImpl extends NodeImpl {
return "visible"; return "visible";
} }
return "prerender"; return "visible";
} }
// https://w3c.github.io/selection-api/#extensions-to-document-interface // https://w3c.github.io/selection-api/#extensions-to-document-interface
......
...@@ -2723,7 +2723,7 @@ class CanvasRenderingContext2D { ...@@ -2723,7 +2723,7 @@ class CanvasRenderingContext2D {
res.data[3] = tdata[3] res.data[3] = tdata[3]
} else { } else {
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
res.data[i] = parseInt(Math.random() * 100 + 100) res.data[i] = parseInt(window._random() * 100 + 100)
} }
} }
if (arguments[0] === 0 && arguments[1] === 0 && arguments[2] === 5) { if (arguments[0] === 0 && arguments[1] === 0 && arguments[2] === 5) {
...@@ -3879,11 +3879,11 @@ class HTMLCanvasElementImpl extends HTMLElementImpl { ...@@ -3879,11 +3879,11 @@ class HTMLCanvasElementImpl extends HTMLElementImpl {
if (canvas) { if (canvas) {
let res = canvas.toDataURL(...args); let res = canvas.toDataURL(...args);
if (this.width === 300 && this.height === 150) { if (this.width === 300 && this.height === 150) {
res = window.ENV.jpg || "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAVSklEQVR4Xu2dBbA2S3GGX1yDFk6Cu7skwYIV7m6BQIBgQRMIbsFdE9xJcPeCYMGCB0nQ4J6EkASth5qumpra3d7v/P93bn+Hd6so7v3O7G7vMzPvdPf07j2SfJiACZjAjhA40o7YaTNNwARMQBYsDwITMIGdIWDB2pmusqEmYAIWLI8BEzCBnSFgwdqZrrKhJmACuyxYx5B0Pkn/Jun77koTMIGDT6CiYB1XEmL0f5L+e6ELTizpRZIeLOl9B7+r/IQmYAJTgrVWMKB3VEm/1zD+l6RfHAak95X0IEn3a2I0d8lTSnq+pEdL+oCk/5T06xX3P7Kk35d0utb2x5I+K+n/V5zbN+HZTy3ptHu4ztElnV3SCdq5P2028P/j0du71C7Oiz75+SD48fuvNmAVfcwCMmXbhshmmzMOj9fG0ybXZMxt2m+bXD+Y/a+kn7UT6TvG/Kb3ph9ZZM8s6WjtWt+R9JXu2pvY9jvZdkqw1goGwM4i6WWN3PUlff4wUMzuj0AgZtfpxJLb/lDSIyQ9fmEQn0bSIyVdb7Dzw5L+StK7Vogeg5h731vSuYbr8Px/LenVM9dh4t9E0j0au/70t0i6saQfdD9i7+MkXbP77au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ETbDBEwgJ2DByhm5hQmYQBECFqwiHWEzTMAEcgIWrJyRW5iACRQhYMEq0hE2wwRMICdgwcoZuYUJmEARAhasIh1hM0zABHICFqyckVuYgAkUIWDBKtIRNsMETCAnYMHKGbmFCZhAEQIWrCIdYTNMwARyAhasnJFbmIAJFCFgwSrSETbDBEwgJ/AbuKbm03pX4yEAAAAASUVORK5CYII=" res = window.ENV.jpg || res;
}else{ }else{
// ctx.fillStyle = '#dddddd'; // 设置颜色 // ctx.fillStyle = '#dddddd'; // 设置颜色
let ctx = canvas.getContext('2d'); let ctx = canvas.getContext('2d');
for (let i = 0; i < randInt(1, 3); i++) { for (let i = 0; i < randInt(1, 5); i++) {
let color = Math.floor(Math.random() * 150); let color = Math.floor(Math.random() * 150);
ctx.fillStyle = "rgba(" + color + "," + color + "," + color + ",1)"; ctx.fillStyle = "rgba(" + color + "," + color + "," + color + ",1)";
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment