mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
267b7fc17d
[web] de-ng homepage prototype GitOrigin-RevId: 030a5bf0b4f05eac7d69fda928c906f3c9c962f0
30 lines
835 B
JavaScript
30 lines
835 B
JavaScript
import '../../marketing'
|
|
|
|
function realTimeEditsDemo() {
|
|
const frames = [
|
|
{ before: '', time: 1000 },
|
|
{ before: 'i', time: 100 },
|
|
{ before: 'in', time: 200 },
|
|
{ before: 'in ', time: 300 },
|
|
{ before: 'in r', time: 100 },
|
|
{ before: 'in re', time: 200 },
|
|
{ before: 'in rea', time: 100 },
|
|
{ before: 'in real', time: 200 },
|
|
{ before: 'in real ', time: 400 },
|
|
{ before: 'in real t', time: 200 },
|
|
{ before: 'in real ti', time: 100 },
|
|
{ before: 'in real tim', time: 200 },
|
|
{ before: 'in real time', time: 2000 },
|
|
]
|
|
let index = 0
|
|
function nextFrame() {
|
|
const frame = frames[index]
|
|
index = (index + 1) % frames.length
|
|
|
|
$('.real-time-example').html(frame.before + "<div class='cursor'>|</div>")
|
|
setTimeout(nextFrame, frame.time)
|
|
}
|
|
|
|
nextFrame()
|
|
}
|
|
realTimeEditsDemo()
|