var asfman={}
var scriptNode = document.getElementsByTagName("script")[document.getElementsByTagName("script").length-1];
asfman.createDate = "2007-06-15";
asfman.version = "asfman 1.2";
asfman.author = "asfman";
asfman.path = scriptNode.src.replace(/[^\/]+$/i,"");
asfman.fileList={};
if (scriptNode.getAttribute("import"))
{
$_$import(scriptNode.getAttribute("import"));
}
(function $_$import(filePath)
{
var re=/[^|]+/g;
var re2=/[^+]+/g;
var str,str2,l,r,m,path1,path2;
while(str=re.exec(filePath))
{
path1=str[0];
if(/\(([^)]+)\)/.test(path1))
{
l=RegExp.leftContext;
m=RegExp.lastParen;
r=RegExp.rightContext;
path1=m.replace(/[^+]+/g,l+"$&"+r);
}
while(str2=re2.exec(path1))
{
path2=str2[0];
if(!(/\.js$/.test(path2)))
{
path2 = asfman.path + str2[0].replace(/\./g,"/") + ".js";
}
if(!asfman.fileList[path2])
{
document.write('<script src="'+path2+'" language="javascript"><\/script>');
asfman.fileList[path2] = true;
}
}
}
})("Function.dom|Prototype.String.trim")
回复 更多评论