old_contents: $(function() {
    window.gcb = {
      _XSSI_PREFIX: ")]}'",
      parseJsonResponse: function(responseString) {
        return JSON.parse(responseString.replace(this._XSSI_PREFIX, ''));
      }
    };
  
    var modules = {
      // TODO(jorr): Bring Butterbar in here.
      collapse: {
        js: ['_static/collapse/collapse.js'],
        css: ['_static/collapse/collapse.css']
      },
      list: {
        js: [],
        css: ['_static/list/list.css']
      },
      lightbox: {
        js: ['_static/lightbox/lightbox.js'],
        css: ['_static/lightbox/lightbox.css']
      }
    };
    var base = '/modules/core_ui/';
  
    $.each(modules, function(name, module) {
      $.each(module.css, function(_, uri) {
        $('head').append($('<link rel="stylesheet">').attr('href', base + uri));
      });
      $.each(module.js, function(_, uri) {
        $('body').append($('<script>').attr('src', base + uri));
      });
    });
  });
  
new_contents: (function() {
    window.gcb = {
      _XSSI_PREFIX: ")]}'",
      parseJsonResponse: function(responseString) {
        return JSON.parse(responseString.replace(this._XSSI_PREFIX, ''));
      }
    };
  
    var modules = {
      // TODO(jorr): Bring Butterbar in here.
      collapse: {
        js: ['_static/collapse/collapse.js'],
        css: ['_static/collapse/collapse.css']
      },
      list: {
        js: [],
        css: ['_static/list/list.css']
      },
      lightbox: {
        js: ['_static/lightbox/lightbox.js'],
        css: ['_static/lightbox/lightbox.css']
      }
    };
    var base = '/modules/core_ui/';
  
    for (var name in modules) {
      if (! modules.hasOwnProperty(name)) {
        continue;
      }
      var module = modules[name];
      for (var i = 0; i < module.css.length; i++) {
        var uri = module.css[i];
        var link = document.createElement('link');
        link.setAttribute('rel', 'stylesheet');
        link.setAttribute('href', base + uri);
        document.head.appendChild(link);
      }
    }
  
    $(function() {
      $.each(modules, function(_, module) {
        $.each(module.js, function(_, uri) {
          $('body').append($('<script>').attr('src', base + uri));
        });
      });
    });
  })();
  
subject: Fix flash-of-unstyled-content Change on 2015/10/22 by jorr <jorr@google.com> ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=106069765