TikTok: usage-time reminder
Every 15 minutes shows a gentle bar reminding you how long you have been browsing TikTok.
Code to copy
// Show a gentle usage reminder every 15 minutes
const MIN = 15;
let elapsed = 0;
setInterval(function () {
elapsed += 1;
if (elapsed % MIN !== 0) { return; }
const bar = document.createElement('div');
bar.textContent = 'You have been on TikTok for ' + elapsed + ' minutes.';
bar.style.cssText = 'position:fixed;top:0;left:0;right:0;z-index:99999;'
+ 'background:#fe2c55;color:#fff;text-align:center;padding:10px;'
+ 'font:600 14px sans-serif;cursor:pointer';
bar.addEventListener('click', function () { bar.remove(); });
document.body.appendChild(bar);
setTimeout(function () { bar.remove(); }, 8000);
}, 60000);
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.