首先我们要有以下几个函数:
function
z(a,b){
window[a] = b;
}
function ha(a,b,c){
a[b] = c;
}
function p(a,b,c)
{
a.prototype[b] = c;
}
window[a] = b;
}
function ha(a,b,c){
a[b] = c;
}
function p(a,b,c)
{
a.prototype[b] = c;
}
现在我要定义一个实体类,通常的代码是这样:
function
Info(name, image)
{
this ._name = name;
this ._image = image;
}
// 属性
Info.prototype.GetName = function (){ return this ._name; }
Info.prototype.GetImage = function (){ return this ._image; }
{
this ._name = name;
this ._image = image;
}
// 属性
Info.prototype.GetName = function (){ return this ._name; }
Info.prototype.GetImage = function (){ return this ._image; }
经混淆变成这样
var
a;
//
定义一个变量来代替某个对象的prototype
function i(a,b){ this .aa = a; this .bb = b;}]
i.prototype.ab = function (){ return this .aa; }
i.prototype.ac = function (){ return this .bb; }
a = i.prototype; // 给a赋值
// 下面用函数p把i的属性替换成有意义的名称
p(i, " GetName " ,a.ab);p(i, " GetImage " ,a.ac);
// 下面用函数z为window对象添加该实体对象
z( " Info " ,i)
function i(a,b){ this .aa = a; this .bb = b;}]
i.prototype.ab = function (){ return this .aa; }
i.prototype.ac = function (){ return this .bb; }
a = i.prototype; // 给a赋值
// 下面用函数p把i的属性替换成有意义的名称
p(i, " GetName " ,a.ab);p(i, " GetImage " ,a.ac);
// 下面用函数z为window对象添加该实体对象
z( " Info " ,i)