diff --git a/docs/.vuepress/theme/layouts/Layout.vue b/docs/.vuepress/theme/layouts/Layout.vue
index dba46e8740..0177866330 100644
--- a/docs/.vuepress/theme/layouts/Layout.vue
+++ b/docs/.vuepress/theme/layouts/Layout.vue
@@ -13,29 +13,31 @@
import ParentLayout from '@parent-theme/layouts/Layout.vue'
import CarbonAds from '@theme/components/CarbonAds.vue'
-window.addEventListener('load', () => {
- // function called if wwads is blocked
- function ABDetected() {
- document.getElementsByClassName("wwads-cn")[0].insertAdjacentHTML("beforeend", "
");
+ };
- //check document ready
- function docReady(t) {
- "complete" === document.readyState ||
- "interactive" === document.readyState
- ? setTimeout(t, 1)
- : document.addEventListener("DOMContentLoaded", t);
- }
+ //check document ready
+ function docReady(t) {
+ "complete" === document.readyState ||
+ "interactive" === document.readyState
+ ? setTimeout(t, 1)
+ : document.addEventListener("DOMContentLoaded", t);
+ }
- //check if wwads' fire function was blocked after document is ready with 3s timeout (waiting the ad loading)
- docReady(function () {
- setTimeout(function () {
- if( window._AdBlockInit === undefined ){
- ABDetected();
- }
- }, 3000);
- });
-})
+ //check if wwads' fire function was blocked after document is ready with 3s timeout (waiting the ad loading)
+ docReady(function () {
+ setTimeout(function () {
+ if( window._AdBlockInit === undefined ){
+ ABDetected();
+ }
+ }, 3000);
+ });
+ })
+}
export default {
name: 'Layout',