Discussions » Creation Requests

need to click the function in a website every 30 seconds

§
Posted:
Hi,

there is a video viewing website where it shows video watch complete after 30 seconds and then we click the NEXT button to move to the next video. the NEXT button has the following link bind to it "__doPostBack('ctl00$ContentPlaceHolder1$lbtnNextLessonTop','')". i want that the page automatically click "__doPostBack('ctl00$ContentPlaceHolder1$lbtnNextLessonTop','')" every 30 seconds.

thank you
§
Posted:
Edited:
You can not click a function, you can just click elements on the website. What you could try to do is mimic the function, but that requires 'a lot of programming knowledge'. It's much easier to get the element css,class or id and click that using the script I made below.
replace
// @match *
to the video website that you want to use the script on.The final result should be like
// @match https://www.youtube.com/*
Also replace this document.querySelector("#post-reply") with the element that you want to be clicked.

Share the website here if you need help, if you don't share the website I won't help you more...


// ==UserScript==
// @name Click after 30 secs
// @namespace AutoClicker
// @version 0.1
// @description AutoClicker.
// @author hacker09
// @match *
// @grant none
// ==/UserScript==

(function() {
'use strict';
setInterval(function(){ document.querySelector("#post-reply").click(); }, 30000);
})();
§
Posted:
That website is password protected portal. Http:// lms (dot) digiskills (dot) pk
§
Posted:
I see.
You can still log in and when this video shows up you can press ctrl+u,copy everything and paste on pastebin.com, and share the link here
§
Posted:

Next Topic



This is the link i need to click every 30 second. should i used id="ctl00_ContentPlaceHolder1_lbtnNextLessonTop" as element name or class="pull-right topics_url"
§
Posted:
okay so i wrote it as follows and it workeed. thank you

(function() {
'use strict';
setInterval(function(){ document.querySelector("#ctl00_ContentPlaceHolder1_lbtnNextLessonTop").click(); }, 30000);
})();
§
Posted:
You are welcome

Post reply

Sign in to post a reply.