Commit b6f376b5 authored by 刘松's avatar 刘松

preload

parent 35d50d56
...@@ -6,14 +6,18 @@ module.exports = function () { ...@@ -6,14 +6,18 @@ module.exports = function () {
__avatar__.currentWindow = window; __avatar__.currentWindow = window;
__avatar__.rootDocument = document; __avatar__.rootDocument = document;
__avatar__.currentDocument = document; __avatar__.currentDocument = document;
var count = 0;
if(document.location.host === 'mp.dayu.com'){ if(document.location.host === 'mp.dayu.com'){
var temp = Object.defineProperty; var temp = Object.defineProperty;
Object.defineProperty = function(obj, prop, descriptor){ Object.defineProperty = function(obj, prop, descriptor){
console.dir('lalalla'); if(prop === 'changeCover'){
if(prop === 'changeCover'){
descriptor['get'] = () => 1; descriptor['get'] = () => 1;
} }
return temp.apply(this,arguments) if(prop === 'submitNum'){
} window['log'+count] = obj;
} count++;
}
return temp.apply(this,arguments)
}
}
}; };
\ No newline at end of file
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