Greasy Fork is available in English.

Discussions » Creation Requests

need to click the function in a website every 30 seconds

§
Posted: 21. 11. 2020
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: 22. 11. 2020
Edited: 22. 11. 2020
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: 22. 11. 2020
That website is password protected portal. Http:// lms (dot) digiskills (dot) pk
§
Posted: 22. 11. 2020
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: 25. 11. 2020

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: 25. 11. 2020
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: 25. 11. 2020
You are welcome

Post reply

Sign in to post a reply.