Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
refactor(ui): Simplify header elements
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Oct 8, 2022
1 parent a37fb6f commit 7b10ad2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
18 changes: 3 additions & 15 deletions packages/userscript/source/ui/SettingsSectionUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,7 @@ export abstract class SettingsSectionUi {
* @returns The constructed header element.
*/
protected _getHeader(text: string): JQuery<HTMLElement> {
const headerElement = $("<li/>");
const header = $("<span/>", {
text,
}).addClass("ks-header");

headerElement.append(header);

const headerElement = $("<li/>", { text }).addClass("ks-header");
return headerElement;
}

Expand All @@ -97,14 +91,8 @@ export abstract class SettingsSectionUi {
* @returns The constructed header element.
*/
protected _getExplainer(text: string): JQuery<HTMLElement> {
const headerElement = $("<li/>");
const header = $("<span/>", {
text,
}).addClass("ks-explainer");

headerElement.append(header);

return headerElement;
const explainerElement = $("<li/>", { text }).addClass("ks-explainer");
return explainerElement;
}

protected _getBuildOption(
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/UserInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class UserInterface {
);
// Hover guides
this._addRule(
`#ks > ul > li li:hover {
`#ks > ul > li .ks-setting:hover {
border-bottom: 1px solid rgba(185, 185, 185, 0.5);
}`
);
Expand Down

0 comments on commit 7b10ad2

Please sign in to comment.