Last active
December 23, 2023 05:33
-
-
Save rajeshpv/19727d6a5a035ecfffeae31f031f028c to your computer and use it in GitHub Desktop.
dhamma_poll.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Manually Enable "Autoplay" settings to play audio following steps: | |
https://support.mozilla.org/en-US/kb/block-autoplay | |
*/ | |
//test audio wors | |
function playAudio(){ | |
// let audio = new Audio('https://audio.code.org/winpoint1.mp3'); | |
// audio.play(); | |
console.log('yes playing' + new Date()); | |
} | |
function checkCount(){ | |
const currentLinkCount = document.querySelectorAll('td.apply > a').length; | |
if( currentLinkCount > 11) playAudio(); | |
} | |
function runInLoop(){ | |
window.location.reload(true); | |
setTimeout(checkCount, 2000); | |
} | |
// playAudio(); | |
// checkCount(); | |
// to know current apply links visible | |
console.log(document.querySelectorAll('td.apply > a').length); | |
timerObject = setInterval(runInLoop, 5000); // enable-1 | |
// clearInterval(timeObject); // run this to disable poll |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment