Follow

document.querySelectorAll("span").forEach(x => { const inner = x.innerHTML; const el = document.createElement("marquee"); el.innerHTML = inner; x.replaceWith(el); })

· · Web · 4 · 2 · 10

@SuricrasiaOnline i am going to make a userscript to run this on every website i visit

@SuricrasiaOnline

sadly marquee is removed

not to worry

document.querySelectorAll("span").forEach(e => e.animate({transform: [100, -100].map(x => `transformX(${x})`)}, {duration: 5000, iterations: Infinity})
@SuricrasiaOnline I didn't test this but it's probably good. I think I missed a % in the transform
@SuricrasiaOnline okay I think a working command is

document.querySelectorAll("span").forEach(e => { e.style.position = "relative"; e.animate(["100%", "-100%"].map(x => ({left: x, transform: `translateX(${x})`})), {duration: 5000, iterations: Infinity})})
Sign in to participate in the conversation
Cybrespace

cybrespace: the social hub of the information superhighway jack in to the mastodon fediverse today and surf the dataflow through our cybrepunk, slightly glitchy web portal support us on patreon or liberapay!