Files
docker-compose/asciinema/theme/inject.js

23 lines
611 B
JavaScript

// Inject custom theme CSS and favicon
(function() {
// Inject custom CSS
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = '/theme/custom.css';
document.head.appendChild(link);
// Inject custom favicon
var favicon = document.createElement('link');
favicon.rel = 'icon';
favicon.type = 'image/svg+xml';
favicon.href = '/theme/favicon.svg';
// Remove existing favicons first
var existingFavicons = document.querySelectorAll('link[rel*="icon"]');
existingFavicons.forEach(function(el) {
el.remove();
});
document.head.appendChild(favicon);
})();