Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/idflood/vogue into idfloo…
Browse files Browse the repository at this point in the history
…d-master
  • Loading branch information
andrewdavey committed Sep 8, 2011
2 parents c308b60 + 25f8328 commit f9ceabb
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions src/client/vogue-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,30 +119,34 @@
// Go through all the links in the page, looking for stylesheets.
for (i = 0, m = links.length; i < m; i += 1) {
link = links[i];
if (isLocalStylesheet(link)) {
// Link is local, get the base URL.
href = getBase(link.href);
if (href !== false) {
stylesheets[href] = link;
if (link.getAttribute("media") != "print") {
if (isLocalStylesheet(link)) {
// Link is local, get the base URL.
href = getBase(link.href);
if (href !== false) {
stylesheets[href] = link;
}
}
}
}

// Go through all the style tags, looking for @import tags.
links = document.getElementsByTagName("style");
for (i = 0, m = links.length; i < m; i += 1) {
content = links[i].text || links[i].textContent;
while ((matches = reImport.exec(content))) {
link = {
rel: "stylesheet",
href: matches[1],
getAttribute: getProperty
};
if (isLocalStylesheet(link)) {
// Link is local, get the base URL.
href = getBase(link.href);
if (href !== false) {
stylesheets[href] = link;
if (links[i].getAttribute("media") != "print") {
content = links[i].text || links[i].textContent;
while ((matches = reImport.exec(content))) {
link = {
rel: "stylesheet",
href: matches[1],
getAttribute: getProperty
};
if (isLocalStylesheet(link)) {
// Link is local, get the base URL.
href = getBase(link.href);
if (href !== false) {
stylesheets[href] = link;
}
}
}
}
Expand Down

0 comments on commit f9ceabb

Please sign in to comment.