File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
src/styles/icons/material-design Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 23
23
});
24
24
}
25
25
26
- // Activate tab if it is specified in the URL
27
26
document.addEventListener('DOMContentLoaded', function() {
27
+
28
+ // Activate tab if it is specified in the URL
28
29
var tab = getQueryParam('tab');
29
30
if (tab) {
30
31
activateTab(tab);
31
32
}
32
- });
33
33
34
- // Apply settings
35
- window.gtt_setting();
34
+ // Apply GTT settings
35
+ if (typeof window.gtt_setting === 'function') {
36
+ window.gtt_setting();
37
+ }
38
+ });
36
39
<% end %>
Original file line number Diff line number Diff line change @@ -7304,6 +7304,19 @@ const iconMappings: { [key: string]: any } = {
7304
7304
const mdiWebfontMeta = document . querySelector ( 'meta[name="gtt-font-mdi-webfont"]' ) ;
7305
7305
const mdiWebfontUrl = mdiWebfontMeta ? mdiWebfontMeta . getAttribute ( 'content' ) : 'data:application/font-woff2;base64,' ; // Provide a data URL for an empty font
7306
7306
7307
+ // Dynamically create the @font -face rule
7308
+ const style = document . createElement ( 'style' ) ;
7309
+ style . type = 'text/css' ;
7310
+ style . innerHTML = `
7311
+ @font-face {
7312
+ font-family: 'Material Design Icons';
7313
+ src: url(${ mdiWebfontUrl } ) format('woff2');
7314
+ font-weight: normal;
7315
+ font-style: normal;
7316
+ }
7317
+ ` ;
7318
+ document . head . appendChild ( style ) ;
7319
+
7307
7320
// Define the font face
7308
7321
let mdiFont : FontFace ;
7309
7322
mdiFont = new FontFace ( 'materialdesignicons' , `url(${ mdiWebfontUrl } )` ) ;
You can’t perform that action at this time.
0 commit comments