code: function processStylesheet(ss) {
        // cssRules respects same-origin policy, as per
        // https://code.google.com/p/chromium/issues/detail?id=49001#c10.
        try {
          if (!ss.cssRules) { return; }
        } catch (e) {
          if (e.name !== 'SecurityError') { throw e; }
          return;
        }
        // ss.cssRules is available, so proceed with desired operations.
        var rules = [];
        for (var i = 0; i < ss.cssRules.length; i++) {
          var rule = ss.cssRules[i];
          rules.push(rule);
        }
        return rules;
      }
docs: http://stackoverflow.com/a/23613052