Skip to content
Browse files

Merge pull request #55 from seabre/add_cloudfiles_cdn_rule

Added rule for sites that use RackSpace Cloudfiles as their CDN.
  • Loading branch information...
2 parents 95071a1 + 8d2de6a commit 4b9510869483c77e8fc716b53a4e7bc4a4186dec @marcelduran committed Sep 28, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/common/rules.js
View
7 src/common/rules.js
@@ -118,7 +118,8 @@ YSLOW.registerRule({
'platform.twitter.com', //Twitter widget - Always via a CDN
'cdn.api.twitter.com', //Twitter API calls, served via Akamai
'apis.google.com', //Google's API Hosting
- '.akamaihd.net' //Akamai - Facebook uses this for SSL assets
+ '.akamaihd.net', //Akamai - Facebook uses this for SSL assets
+ '.rackcdn.com' //Generic RackSpace CloudFiles CDN
],
// array of regexps that will be treated as exception.
exceptions: [
@@ -261,7 +262,7 @@ YSLOW.registerRule({
offender.sum_size_compressed > 0 ? ' (' +
kbSize(offender.sum_size_compressed) + ' GZip)' : ''
) + (hasPref ? (
- ' <button onclick="javascript:document.ysview.addCDN(\'' +
+ ' <button onclick="javascript:document.ysview.addCDN(\'' +
offender.domain + '\')">Add as CDN</button>') : '');
}
}
@@ -1038,7 +1039,7 @@ YSLOW.registerRule({
},
lint: function (doc, cset, config) {
- var i, len, score, comp, type, count, filter_count,
+ var i, len, score, comp, type, count, filter_count,
instyles = (cset.inline && cset.inline.styles) || [],
comps = cset.getComponentsByType('css'),
offenders = [],

0 comments on commit 4b95108

Please sign in to comment.
Something went wrong with that request. Please try again.