Skip to content

Instantly share code, notes, and snippets.

View ajtazer's full-sized avatar
:bowtie:

Anuj Rawat ajtazer

:bowtie:
View GitHub Profile
@ajtazer
ajtazer / yt-adhd.js
Created April 30, 2024 16:33
if anyone is like me and gets distracted from the lecture playlist often, paste this code in your browser console, and it will auto play the video 15 secs after you pausing it. Works great for my adhd.
async function checkAndResumeVideo() {
const videoElement = document.querySelector('video');
if (videoElement) {
if (videoElement.paused) {
await new Promise(resolve => setTimeout(resolve, 15000));//apne hisaab se time change karlo
videoElement.play();