removing unnecessary variable

This commit is contained in:
Andrew 2019-04-21 00:46:24 -05:00 committed by GitHub
parent 7432e07e98
commit 7d2b20db45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,11 +104,7 @@ function applyBackground(data: BackgroundData, list: Background[]) {
link.type = 'text/css';
link.rel = 'stylesheet';
link.href = $(this).attr('href').replace('.' + prev + '.', '.' + key + '.');
link.onload = () => {
var selector = this.getAttribute('href');
if (selector) selector = selector.split(/(light|dark|transp)/)[2];
setTimeout(() => this.remove(), 100);
}
link.onload = () => setTimeout(() => this.remove(), 100);
document.head.appendChild(link);
});