| | 456 | var RE_atimport = '@import\\s*(url\\()?["\'](.*)["\'].*'; |
| | 457 | var imports = css.match(new RegExp(RE_atimport,'ig')); |
| | 458 | var m, file, re = new RegExp(RE_atimport,'i'); |
| | 459 | |
| | 460 | if (imports) |
| | 461 | { |
| | 462 | var path = URL.replace(/\?.*$/,'').split("/"); |
| | 463 | path.pop(); |
| | 464 | path = path.join('/'); |
| | 465 | for (var i=0;i<imports.length;i++) |
| | 466 | { |
| | 467 | m = imports[i].match(re); |
| | 468 | file = m[2]; |
| | 469 | if (!file.match(/^([^:]+\:)?\//)) |
| | 470 | { |
| | 471 | file = Xinha._resolveRelativeUrl(path,file); |
| | 472 | } |
| | 473 | css += Xinha._geturlcontent(file); |
| | 474 | } |
| | 475 | } |
| | 476 | |