chore: format style injector

This commit is contained in:
EnixCoda 2020-04-06 13:31:32 +08:00
parent cfe313f1d9
commit 800f2187b9
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -12,8 +12,8 @@ if (platform.resolveMeta()) {
function init() {
// injects a copy of stylesheets so that other extensions(e.g. dark reader) could read
function injectStyles(url: string) {
var linkElement = document.createElement('link')
linkElement.rel = 'stylesheet'
const linkElement = document.createElement('link')
linkElement.setAttribute('rel', 'stylesheet')
linkElement.setAttribute('href', url)
document.head.appendChild(linkElement)
}