Skip to content

Commit

Permalink
Use a local variable for tracking the infowidget container element.
Browse files Browse the repository at this point in the history
Issue #130.

␄
  • Loading branch information
Mike Castle committed Oct 21, 2023
1 parent 4671a52 commit 44de03b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions linkedin-tool.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -4140,7 +4140,8 @@

#createInfoWidget = () => {
this.#infoWidget = new InfoWidget('LinkedIn Tool');
this.#infoWidget.element.classList.add('lit-info');
const widget = this.#infoWidget.element;
widget.classList.add('lit-info');

const name = document.createElement('div');
name.innerHTML = `<b>${GM.info.script.name}</b> - ` +
Expand All @@ -4157,7 +4158,7 @@
'tab</span>' +
`<span>Hit ${esc} to close</span>`;

this.#infoWidget.element.append(name, instructions);
widget.append(name, instructions);
}

/** Create CSS styles for stuff specific to LinkedIn Tool. */
Expand Down

0 comments on commit 44de03b

Please sign in to comment.