Skip to content

as1164/autoclick-chrome-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

autoclick-chrome-extension

This extension can click on a specific webpage element. The element does not have to be visible, it only has to be loaded fully.

  • // content.js
    
    const TARGET_ELEMENT_SELECTOR = ''; // Your target element here

Other configurable parameters:

  • // content.js
    
    const CHECK_INTERVAL_MS = 1000; // Intervals between clicks
    const COOLDOWN_MS = 2 * 60 * 60 * 1000; // Optional timer in between clicks

There is also a scrolling feature, which is what the CLICK_DELAY_AFTER_SCROLL timer is for. This is for my specific use case and not necessary for the extension to work.

  • // content.js
    
    if (elementToClick) {
    	if (canClick) {
    		canClick = false;
    		console.log('Auto Clicker: Attempting click...');
    
    		elementToClick.scrollIntoView({ behavior: 'auto', block: 'start' });
    
        // ...
    
      }, CLICK_DELAY_AFTER_SCROLL_MS);     
  • reference/detect_scroll_percentage.js
    • I used this to figure out how far down the page I need to scroll, as a percentage. Included in case it is useful for someone else.

About

Chrome extension for clicking in a webpage via element selectors.

Topics

Resources

Stars

Watchers

Forks