revert modification done for testing purposes only

This commit is contained in:
sbwalker 2024-07-19 15:31:11 -04:00
parent 59bba83b1d
commit e2a7271ab2

View File

@ -568,24 +568,20 @@
{ {
if (!string.IsNullOrEmpty(resource.Url)) if (!string.IsNullOrEmpty(resource.Url))
{ {
// if (!resource.Reload) if (!resource.Reload)
// {
var url = (resource.Url.Contains("://")) ? resource.Url : alias.BaseUrl + resource.Url;
if (resource.Reload)
{ {
url += "?" + Guid.NewGuid().ToString("N"); var url = (resource.Url.Contains("://")) ? resource.Url : alias.BaseUrl + resource.Url;
}
return "<script" + return "<script" +
((!string.IsNullOrEmpty(resource.Integrity)) ? " integrity=\"" + resource.Integrity + "\"" : "") + ((!string.IsNullOrEmpty(resource.Integrity)) ? " integrity=\"" + resource.Integrity + "\"" : "") +
((!string.IsNullOrEmpty(resource.CrossOrigin)) ? " crossorigin=\"" + resource.CrossOrigin + "\"" : "") + ((!string.IsNullOrEmpty(resource.CrossOrigin)) ? " crossorigin=\"" + resource.CrossOrigin + "\"" : "") +
((resource.ES6Module) ? " type=\"module\"" : "") + ((resource.ES6Module) ? " type=\"module\"" : "") +
" src=\"" + url + "\"></script>"; // src at end of element due to enhanced navigation patch algorithm " src=\"" + url + "\"></script>"; // src at end of element due to enhanced navigation patch algorithm
// } }
// else else
// { {
// // use custom element which can execute script on every page transition // use custom element which can execute script on every page transition
// return "<page-script src=\"" + resource.Url + "\"></page-script>"; return "<page-script src=\"" + resource.Url + "\"></page-script>";
// } }
} }
else else
{ {