Skip to content

Commit

Permalink
issue #118 - remove bg-inject from UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Manvel committed Mar 29, 2024
1 parent 730ffc8 commit e7a4a99
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
13 changes: 8 additions & 5 deletions src/js/ui/ActionInputs.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,14 @@ class ActionInputs {
}

setTooltipInfo() {
const {link, description, name} = actionTypes.filter(({name}) => name === this._type)[0];
const heading = name;
const text = description;
const linkText = "Learn more";
this.tooltip.setData({heading, text, link, linkText});
const action = actionTypes.filter(({name}) => name === this._type)[0];
if (action) {
const {link, description, name} = action;
const heading = name;
const text = description;
const linkText = "Learn more";
this.tooltip.setData({heading, text, link, linkText});
}
}

reset() {
Expand Down
5 changes: 0 additions & 5 deletions src/js/ui/actionsTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ const actionTypes = [
description: "Injects javascript code into the content script.",
link: `${website}/inject-cs`
},
{
name: "bg-inject",
description: "Inject script into backroung page of the extension.",
link: `${website}/bg-inject`
},
{
name: "bg-function",
description: "Predefined scripts that are executed in the context of the background page.",
Expand Down

0 comments on commit e7a4a99

Please sign in to comment.