()
| 67 | |
| 68 | //loop stylesheets, send text content to translate |
| 69 | ripCSS = function () { |
| 70 | var sheets = links, |
| 71 | sl = sheets.length, |
| 72 | i = 0, |
| 73 | //vars for loop: |
| 74 | sheet, href, media, isCSS; |
| 75 | |
| 76 | for (; i < sl; i++) { |
| 77 | sheet = sheets[i], |
| 78 | href = sheet.href, |
| 79 | media = sheet.media, |
| 80 | isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet"; |
| 81 | |
| 82 | //only links plz and prevent re-parsing |
| 83 | if (!!href && isCSS && !parsedSheets[href]) { |
| 84 | // selectivizr exposes css through the rawCssText expando |
| 85 | if (sheet.styleSheet && sheet.styleSheet.rawCssText) { |
| 86 | translate(sheet.styleSheet.rawCssText, href, media); |
| 87 | parsedSheets[href] = true; |
| 88 | } else { |
| 89 | if ((!/^([a-zA-Z:]*\/\/)/.test(href) && !base) |
| 90 | || href.replace(RegExp.$1, "").split("/")[0] === win.location.host) { |
| 91 | requestQueue.push({ |
| 92 | href: href, |
| 93 | media: media |
| 94 | }); |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | makeRequests(); |
| 100 | }, |
| 101 | |
| 102 | //recurse through request queue, get css text |
| 103 | makeRequests = function () { |
no test coverage detected