feat: add js-enabled.css to list of preloaded css files

v1.18.x
Julian Lam 5 years ago
parent e95cd28f6f
commit da29b947bf

@ -70,12 +70,13 @@
function buildLinkTag(tag) {
var link = tag.link ? 'link="' + tag.link + '" ' : '';
var rel = tag.rel ? 'rel="' + tag.rel + '" ' : '';
var as = tag.as ? 'as="' + tag.as + '" ' : '';
var type = tag.type ? 'type="' + tag.type + '" ' : '';
var href = tag.href ? 'href="' + tag.href + '" ' : '';
var sizes = tag.sizes ? 'sizes="' + tag.sizes + '" ' : '';
var title = tag.title ? 'title="' + tag.title + '" ' : '';
return '<link ' + link + rel + type + sizes + title + href + '/>\n\t';
return '<link ' + link + rel + as + type + sizes + title + href + '/>\n\t';
}
function stringify(obj) {

@ -56,6 +56,10 @@ Tags.parse = async (req, data, meta, link) => {
}, {
rel: 'manifest',
href: nconf.get('relative_path') + '/manifest.json',
}, {
rel: 'preload',
href: nconf.get('relative_path') + '/assets/js-enabled.css?' + (Meta.config['cache-buster'] ? '?' + Meta.config['cache-buster'] : ''),
as: 'style',
}];
if (plugins.hasListeners('filter:search.query')) {

Loading…
Cancel
Save