I am creating a chrome extension, and need to click on the first link automatically for some time. Is it possible to add automatic click feature in chrome extension??
相关问题
- How does same-domain policy apply to background sc
- YouTube Data API v3 allowed referers for browser a
- Chrome Extension: How can I get global settings in
- Keep receiving Login Required error when trying to
- Click only through holes in svg mask
相关文章
- Progressive web app(PWA) vs Electron vs Browser ex
- Button onclick doesn't fire after onchange inp
- chrome.runtime.getURL vs. chrome.extension.getURL
- Will this hotkey work for Mac users?
- Chrome extension permission for “about:blank” page
- Android Button needs two click for action
- getElementById not working in Google Chrome extens
- Google Chrome extension: How to find out if a user
If you don't care about mouse coordinates, you can use this:
"element" should be the DOM node you want to trigger the click on. If you want to also specify a particular X/Y coordinate, you could use this:
Change
x
andy
to what you want ...or just use jQuery, like npdoty said.jQuery has a nice
trigger
function for just such a situation (jQuery docs), even a shortened form just for theclick
event, and that pairs nicely with the:first
pseudo-selector.You can probably do this in pure JavaScript as well, using some combination of
element.click()
or dispatching events.