What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-10 15:55:07
scrolling a page using node and puppeteer
const distance = 100; const delay = 100; const timer = setInterval(() => { document.scrollingElement.scrollBy(0, distance); if (document.scrollingElement.scrollTop + window.innerHeight >= document.scrollingElement.scrollHeight) { clearInterv... Add solution -
Javascript 2021-10-06 14:16:05
auto form submition at countdown end javascript
/* HTML needed in the body before Javascript <div id="demo"></div> <form method="post" id="username"> <input type="text" name="usename" placeholder="Enter Username"> <... Add solution -
Go 2021-10-05 06:01:03
how-to-prevent-google-colab-from-disconnecting
#Set a javascript interval to click on the connect button every 60 seconds. #Open developer-settings (in your web-browser) with Ctrl+Shift+I then click #on console tab and type this on the console prompt. #(for mac press Option+Command+I) function Con... Add solution -
Javascript 2021-10-05 05:46:02
simulate schrool event puppeter
const autoScroll = async (page) => { await page.evaluate(async () => { await new Promise((resolve, reject) => { let totalHeight = 0 let distance = 100 let timer = setInterval(() => { let scrollHeight = document.... Add solution -
Other 2021-10-03 10:41:07
bootstrap change image every second
var counter = 1; //instantiate a counter var maxImage = 5; //the total number of images that are available setInterval(function() { document.querySelector('header').style.backgroundImage = "url('images/" + (counter + 1) + ".jpg')";... Add solution
Best helpers
Ranking is empty