1
0
mirror of https://github.com/go-task/task.git synced 2025-06-15 00:15:10 +02:00

chore(website): reactivate carbon

This commit is contained in:
Andrey Nering
2023-08-09 20:47:43 -03:00
parent 90a8c26b25
commit 2b21fd2eda
6 changed files with 114 additions and 1 deletions

29
docs/static/js/carbon.js vendored Normal file
View File

@ -0,0 +1,29 @@
(function () {
function attachAd() {
var el = document.createElement('script');
el.setAttribute('type', 'text/javascript');
el.setAttribute('id', '_carbonads_js');
el.setAttribute(
'src',
'//cdn.carbonads.com/carbon.js?serve=CESI65QJ&placement=taskfiledev'
);
el.setAttribute('async', 'async');
var wrapper = document.getElementById('sidebar-ads');
wrapper.innerHTML = '';
wrapper.appendChild(el);
}
setTimeout(function () {
attachAd();
var currentPath = window.location.pathname;
setInterval(function () {
if (currentPath !== window.location.pathname) {
currentPath = window.location.pathname;
attachAd();
}
}, 1000);
}, 1000);
})();