MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / closeAfter

Function closeAfter

scripts/content-scripts/ufs_global.js:250–263  ·  view source on GitHub ↗
(_time)

Source from the content-addressed store, hash-verified

248
249 let timeouts = [];
250 function closeAfter(_time) {
251 timeouts.forEach((t) => clearTimeout(t));
252 timeouts = [
253 setTimeout(() => {
254 if (div) {
255 div.style.opacity = 0;
256 div.style.top = `${y - 50}px`;
257 }
258 }, _time - 1000),
259 setTimeout(() => {
260 div?.remove();
261 }, _time),
262 ];
263 }
264
265 closeAfter(duration);
266

Callers 4

notifyFunction · 0.85
setTextFunction · 0.85

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected