Friday, February 12, 2021

reference error cant find variable $ | Siri shortcut & scriptable

I have a website (not my own) to earn bitcoins every 60 min. so i have to click on roll button every 60 min .... so i made siri shortcut to do it without opening safari with scriptable. I have the code but when i put the code on google chrom consol its work perfectly and when i put it on sirishortcut i get this error :

reference error cant find variable $

The code i have used :

(function() { 'use strict'; $('.roll-button').click(function(){ window.onload = timedRefresh(4000); document.onkeydown = function() { if(event.keyCode==116) { event.keyCode=0; event.returnValue = false; } } }); // set time out 5 sec setTimeout(function(e){ $('.roll-button').trigger('click'); }, 4000); e.stop(); function timedRefresh(timeoutPeriod) { setTimeout("location.reload(true);",timeoutPeriod); } })(); 

No comments:

Post a Comment