private static GetScriptSourcePath ( string skinPath, Script script ) : string | ||
skinPath | string | |
script | Script | |
return | string |
private static string GetScriptSourcePath(string skinPath, Script script)
{
if(script.Src.StartsWith("~"))
{
return HttpHelper.ExpandTildePath(script.Src);
}
else if (script.Src.StartsWith("/") || script.Src.StartsWith("http://") || script.Src.StartsWith("https://"))
{
return script.Src;
}
else
{
return skinPath + script.Src;
}
}