Commit 2c624850 authored by wang's avatar wang

适配不同版本 chrome

parent 61f1a3dd
......@@ -107,7 +107,7 @@ ENV = {"windowparams":{"innerheight":853,"innerwidth":1920,"outerheight":970,"ou
const crypto = require('crypto');
// const crypto = require('crypto');
const {proxy} = require("./jsdom/lib/jsdom/living/generated/utils");
const {randomNumberRange} = require("ghost-cursor/lib/math");
module = undefined;
......@@ -972,21 +972,21 @@ WebKitMutationObserver = v_saf(function WebKitMutationObserver() {
}
;
})
// crypto = v_saf(function Crypto(){if (!v_new_toggle){ throw TypeError("Illegal constructor") };
// this.getRandomValues = function(){
// v_console_log(' [*] Crypto -> getRandomValues[func]')
// var e=arguments[0]; return e.map(function(x, i){return e[i]=v_random()*1073741824});}
// this.randomUUID = function(){
// v_console_log(' [*] Crypto -> randomUUID[func]')
// function get2(){return (v_random()*255^0).toString(16).padStart(2,'0')}
// function rpt(func,num){var r=[];for(var i=0;i<num;i++){r.push(func())};return r.join('')}
// return [rpt(get2,4),rpt(get2,2),rpt(get2,2),rpt(get2,2),rpt(get2,6)].join('-')}})
//
// Object.defineProperties(crypto,{
// subtle: {
// value: v_saf(function SubtleCrypto(){})
// }
// })
crypto = v_saf(function Crypto(){if (!v_new_toggle){ throw TypeError("Illegal constructor") };
this.getRandomValues = function(){
v_console_log(' [*] Crypto -> getRandomValues[func]')
var e=arguments[0]; return e.map(function(x, i){return e[i]=1073741824});}
this.randomUUID = function(){
v_console_log(' [*] Crypto -> randomUUID[func]')
function get2(){return (v_random()*255^0).toString(16).padStart(2,'0')}
function rpt(func,num){var r=[];for(var i=0;i<num;i++){r.push(func())};return r.join('')}
return [rpt(get2,4),rpt(get2,2),rpt(get2,2),rpt(get2,2),rpt(get2,6)].join('-')}})
Object.defineProperties(crypto,{
subtle: {
value: v_saf(function SubtleCrypto(){})
}
})
Image = v_saf(function Image() {
;
return v_new(HTMLImageElement)
No preview for this file type
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