Skip to content

Instantly share code, notes, and snippets.

@ichii731
Created March 20, 2022 10:58
Show Gist options
  • Save ichii731/e7490f3fc4f563281f99ade824e9e786 to your computer and use it in GitHub Desktop.
Save ichii731/e7490f3fc4f563281f99ade824e9e786 to your computer and use it in GitHub Desktop.
setup.vue
<script lang="ts">
import AdDetect from "block-adblock-js";
export default defineComponent({
mounted() {
if (AdDetect.check()) {
alert("Adblock is enabled");
} else {
alert("Adblock is disabled or not installed");
}
},
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment