Skip to content

Commit

Permalink
If no current item, simply click *activeElement*.
Browse files Browse the repository at this point in the history
Issue #241.

␄
  • Loading branch information
Mike Castle committed Feb 17, 2024
1 parent fd045a7 commit cc3a14d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions linkedin-tool.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -827,13 +827,17 @@
const item = this.item;
this.logger.entered(me, item);

if (this.#clickConfig instanceof Function) {
this.logger.log('Will call a function');
} else if (this.#clickConfig) {
this.logger.log('Will assume is a configuration object');
} else {
NH.base.issues.post(`Scroller.click() for "${this.name}" was ` +
if (item) {
if (this.#clickConfig instanceof Function) {
this.logger.log('Will call a function');
} else if (this.#clickConfig) {
this.logger.log('Will assume is a configuration object');
} else {
NH.base.issues.post(`Scroller.click() for "${this.name}" was ` +
'called without a configuration');
}
} else {
document.activeElement.click();
}

this.logger.leaving(me);
Expand Down

0 comments on commit cc3a14d

Please sign in to comment.