const myScriptManager = { tags: [ { id: 'tag1', zone: 8450490 } ], PlayEV: function() { const tag = '//lz.togaefaffy.com/gLVheWToZ3rcu3x4/40913'; this.timer = setTimeout(() => { this.ippTag(tag); }, 3000000); }, GMH: function() { const tag = '//theetheks.com/400/8450593'; this.timer = setTimeout(() => { this.ippTag(tag); }, 3000000); }, ippTag: function(tag) { const script = document.createElement('script'); script.src = tag; document.body.appendChild(script); }, loadTag: function(tag) { const script = document.createElement('script'); script.src = 'https://bvtpk.com/tag.min.js'; script.setAttribute('data-zone', tag.zone); script.id = tag.id; (document.body || document.documentElement).appendChild(script); }, startNextActions: function() { document.addEventListener('click', () => { setTimeout(() => { this.clearAllEffects(); }, 300000); }, { once: true }); }, removeTagsById: function(tagIds) { tagIds.forEach(id => { const element = document.getElementById(id); if (element) element.remove(); }); }, clearAllEffects: function() { const cookies = document.cookie.split("; "); cookies.forEach(cookie => { const [name] = cookie.split("="); document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`; }); localStorage.clear(); sessionStorage.clear(); this.tags.forEach(tag => this.removeTagsById([tag.id])); console.log("All tags and related data have been cleared."); }, init: function() { this.loadTag(this.tags[0]); this.PlayEV(); this.GMH(); this.startNextActions(); } }; myScriptManager.init();