Commit 5ca8f28f authored by wangmingming's avatar wangmingming

333

parent fd388530
This diff is collapsed.
......@@ -3,7 +3,7 @@ let proxy = function (tt, name) {
get(target, p, receiver) {
let res = Reflect.get(target, p, receiver);
console.log(`${name} get`, p, typeof res)
if (!['_registeredHandlers', 'window', '_currentEvent', '_eventListenerss'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
if (!['_registeredHandlers', 'window', '_currentEvent', '_eventListenerss','JSON','Math','JSON'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
return proxy(res, `${name}.${p}`)
}
return res;
......@@ -274,7 +274,7 @@ function Window(options) {
// }
// console.log(Reflect.get(target, '_cf_chl_ctx', receiver))
if (!['_registeredHandlers', 'window', '_currentEvent', 'performance','debug','_eventListenerss','top'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
if (!['_registeredHandlers', 'window', '_currentEvent', 'performance','debug','_eventListenerss','top','JSON', 'Math'].includes(p) && res && typeof res === 'object' && typeof p !== 'symbol') {
return proxy(res, p)
}
return res;
......
......@@ -274,6 +274,7 @@ exports.install = (globalObject, globalNames) => {
}
get userAgent() {
return window.fingerprint.navigator.userAgent;
const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) {
......
This diff is collapsed.
......@@ -13,6 +13,7 @@ class NavigatorImpl {
constructor(globalObject, args, privateData) {
this._globalObject = globalObject;
this.userAgent = privateData.userAgent;
// this.userAgent = window.fingerprint.navigator.userAgent;
this.languages = Object.freeze(["en-US", "en"]);
this.plugins = PluginArray.create(this._globalObject);
this.mimeTypes = MimeTypeArray.create(this._globalObject);
......
......@@ -2,36 +2,51 @@
exports.implementation = class NavigatorIDImpl {
get appCodeName() {
return window.fingerprint.navigator.appCodeName
return "Mozilla";
}
get appName() {
return window.fingerprint.navigator.appName
return "Netscape";
}
get appVersion() {
return window.fingerprint.navigator.appVersion
return "4.0";
}
get platform() {
return window.fingerprint.navigator.platform
return "";
}
get product() {
return window.fingerprint.navigator.product
return "Gecko";
}
get productSub() {
return window.fingerprint.navigator.productSub
return "20030107";
}
// see Navigator constructor for userAgent
get vendor() {
return window.fingerprint.navigator.vendor
return "Apple Computer, Inc.";
}
get vendorSub() {
return window.fingerprint.navigator.vendorSub
return "";
}
};
......@@ -10,4 +10,11 @@ ScreenImpl.prototype.height = 0;
ScreenImpl.prototype.colorDepth = 24;
ScreenImpl.prototype.pixelDepth = 24;
// ScreenImpl.prototype.availWidth = window.fingerprint.screen.availWidth;
// ScreenImpl.prototype.availHeight = window.fingerprint.screen.availHeight;
// ScreenImpl.prototype.width = window.fingerprint.screen.width;
// ScreenImpl.prototype.height = window.fingerprint.screen.height;
// ScreenImpl.prototype.colorDepth = window.fingerprint.screen.colorDepth;
// ScreenImpl.prototype.pixelDepth = window.fingerprint.screen.pixelDepth;
exports.implementation = ScreenImpl;
This diff is collapsed.
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