popup ad killer,ftp client,free download popup ad killer,ftp client,free download
popup ad killer,ftp client,free download
About k.soft Download - popup ad killer, ftp client, popupkiller, free downloads Contact k.soft
popup ad killer,ftp client,free download  
Features section

The ksoft Newsletter RSS Feed Subscribe to the
ksoft Newsletter
enter email address
 
 
Scripting with Easy Auto Refresh | ksoft Newsletter
< Back to Main

Scripting with Easy Auto Refresh11/16/2017 @ 8:58am


There is a lot that Easy Auto Refresh can do, besides just refreshing the web page. Did you know you can execute JavaScript after each page refresh or at each countdown interval? Think of all the amazing things you can do!

To run a script after a page refresh, follow the steps below.

How to Run a Script After a Refresh

  1. Download Easy Auto Refresh.
  2. Open Easy Auto Refresh and click Advanced Options.
  3. Checkmark the option Refresh by clicking link or button.
  4. In the textbox, enter the following code:
    document.querySelector('body');
    
    setTimeout(() => {
      console.log('Hello World!')
    }, 1000);
    
  5. If you want the script to run after a page refresh, checkmark the option Click element after page refresh. If you want to run the script at each countdown interval (without an actual page refresh), leave the checkbox empty.
  6. Click the Start button to begin the countdown.

The above steps will run your script at each countdown interval. If you also checkmarked the option to Click element after page refresh, the page will first refresh, and then run your script.

The key to running a script after a refresh is to include the line document.querySelector('body'); followed by a setTimeout() which contains the code that you want to execute on the page. You can run any code that you like within the setTimeout() method to perform any number of actions, such as clicking advanced buttons or elements on the page, changing css styles, and much more.

Here are a couple of examples.

Hello World

The following script prints "Hello Easy Auto Refresh!" to the browser console after each refresh.


Demo



Changing the Page Color

The following script changes the web page background color after each countdown interval.


Demo



Animating a Map

The following script automatically clicks the "Play" button on an animated weather map, after each page refresh.



Demo



The advanced options are available in the registered version of Easy Auto Refresh. Unlock your copy today to harness the full scripting capabilities of automatic page refreshing in Chrome.

 

Comments
Archives
http://www.dummysoftware.com
   
         ksoft Blog and Newsletter  ksoft RSS Feed  ksoft on Twitter  ksoft on FriendFeed