Init.js 803 B

123456789101112131415161718192021
  1. Ext.require('Ext.theme.Material');
  2. if (Ext.platformTags.android && Ext.platformTags.chrome && Ext.manifest.material && Ext.manifest.material.toolbar) {
  3. var color = Ext.manifest.material.toolbar.color,
  4. toolbarIsDynamic = Ext.manifest.material.toolbar.dynamic,
  5. head = document.head, meta;
  6. if (toolbarIsDynamic && Ext.supports.CSSVariables) {
  7. color = getComputedStyle(document.body).getPropertyValue('--primary-color-md');
  8. color = color.replace(/ /g, '').replace(/^#(?:\\3)?/, '#');
  9. }
  10. if (color) {
  11. meta = document.createElement('meta');
  12. meta.setAttribute('name', 'theme-color');
  13. meta.setAttribute('content', color);
  14. head.appendChild(meta);
  15. }
  16. }
  17. Ext.namespace('Ext.theme.is').Material = true;
  18. Ext.theme.name = 'Material';