Fix Theme Change breaking ads

This commit is contained in:
Jai A
2020-10-31 09:59:57 -07:00
parent 3434907f52
commit b7de47b6fb
2 changed files with 22 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div
:class="$colorMode.value"
class="ethical-ad"
data-ea-publisher="modrinth-com"
:data-ea-type="type"
data-ea-manual="true"
@@ -20,6 +20,9 @@ export default {
try {
// eslint-disable-next-line no-undef
ethicalads.load()
const element = document.getElementsByClassName('ethical-ad')
element[0].className = 'ethical-ad loaded ' + this.$colorMode.preference
} catch (err) {
// eslint-disable-next-line no-console
console.error(err)