diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index eda6648..e59fce4 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,6 +7,7 @@
+
@@ -90,7 +91,7 @@
1716613044992
-
+
@@ -140,7 +141,15 @@
1770653711582
-
+
+
+ 1770654181674
+
+
+
+ 1770654181674
+
+
diff --git a/docs/docsify-plugin-ads.js b/docs/docsify-plugin-ads.js
index 298db21..a62f94f 100644
--- a/docs/docsify-plugin-ads.js
+++ b/docs/docsify-plugin-ads.js
@@ -1,18 +1,18 @@
(function(window) {
window.DocsifyAds = {
- create(caPub) {
+ create(caPub, slot) {
return function(hook, vm) {
hook.ready(function() {
window.DocsifyAds.injectCarbonStyle();
});
hook.doneEach(function() {
- window.DocsifyAds.injectScript(caPub);
+ window.DocsifyAds.injectScript(caPub, slot);
});
};
},
- injectScript(caPub) {
+ injectScript(caPub, slot) {
const adEl = document.querySelector("#adsense");
const scriptID = "_adsense_js";
const sidebarEl = document.querySelector(".sidebar-nav");
@@ -35,8 +35,8 @@
scriptIns = document.createElement("ins");
scriptIns.className = `adsbygoogle`;
scriptIns.style = 'display:inline-block;width:300px;height:150px';
- scriptIns.setAttribute("data-ad-client", "ca-pub-4797644559430915");
- scriptIns.setAttribute("data-ad-slot", "1781911644");
+ scriptIns.setAttribute("data-ad-client", `${caPub}`);
+ scriptIns.setAttribute("data-ad-slot", `${caPub}`);
scriptAdPush = document.createElement("script");
scriptAdPush.text = "(adsbygoogle = window.adsbygoogle || []).push({});";
diff --git a/docs/index.html b/docs/index.html
index 0e3447b..ca441d5 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -160,7 +160,7 @@
},
},
plugins: [
- DocsifyAds.create('ca-pub-4797644559430915'),
+ DocsifyAds.create('ca-pub-4797644559430915', '1781911644'),
function (hook, vm) {
hook.beforeEach(function (html) {