I am new to Greasemonkey and javascript but have found the script below, I want to execute it every 5 seconds.
javascript:$('.comments-stream .more:not(.dnone)').parent().find('.fa-minus').parent() .click();
Is there any way of doing this?
I am new to Greasemonkey and javascript but have found the script below, I want to execute it every 5 seconds.
javascript:$('.comments-stream .more:not(.dnone)').parent().find('.fa-minus').parent() .click();
Is there any way of doing this?
Use setInterval
. Notice how i removed the parentheses from the click function.
javascript:setInterval($('.comments-stream .more:not(.dnone)').parent().find('.fa-minus').parent() .click, 5000);
If you want to do more then just the click.
javascript:setInterval(function(){
$('.comments-stream .more:not(.dnone)').parent().find('.fa-minus').parent() .click();
, 5000);