Loading Ragebait Generator...
${bodyContent}
`;
// 3. Execute the Logic
const scriptEl = document.createElement('script');
scriptEl.text = scriptContent;
document.body.appendChild(scriptEl);
// 4. Smooth Scroll Override
// We wrap the original generate function to ensure it scrolls to results
const originalGenerate = window.generate;
window.generate = function() {
if (typeof originalGenerate === 'function') {
originalGenerate();
setTimeout(() => {
const output = document.getElementById('output-area');
if (output) {
output.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
}, 450);
}
};
// Initialize the counter
setTimeout(() => {
if (typeof updateCount === 'function') updateCount();
}, 100);
})
.catch(err => {
document.getElementById('ragebait-tool-root').innerHTML = "Error loading tool.";
console.error(err);
});
})();