summaryrefslogtreecommitdiff
path: root/source/options.tsx
diff options
context:
space:
mode:
authorGravatar Laxman <notlmn@outlook.com> 2019-08-01 23:12:46 +0530
committerGravatar Federico Brigante <github@bfred.it> 2019-08-02 00:42:46 +0700
commitf36d4f10c725b4511e0d28d5c1fec2cf1b2a22b6 (patch)
treefdfa7f5c02cfe77f3c02bcc744b340ae3ebd28a5 /source/options.tsx
parente03473b5f08333d00f052578361b78b54d3eab7c (diff)
downloadrefined-github-f36d4f10c725b4511e0d28d5c1fec2cf1b2a22b6.tar.gz
refined-github-f36d4f10c725b4511e0d28d5c1fec2cf1b2a22b6.tar.zst
refined-github-f36d4f10c725b4511e0d28d5c1fec2cf1b2a22b6.zip
Add `minimize-user-comments` feature (#2146)
Co-Authored-By: Federico Brigante <github@bfred.it>
Diffstat (limited to 'source/options.tsx')
-rw-r--r--source/options.tsx29
1 files changed, 17 insertions, 12 deletions
diff --git a/source/options.tsx b/source/options.tsx
index 89ee563b..c3388dee 100644
--- a/source/options.tsx
+++ b/source/options.tsx
@@ -32,25 +32,30 @@ function buildFeatureCheckbox({name, description, screenshot, disabled}: Feature
);
return (
- <p>
+ <div className="feature">
<input type="checkbox" name={id} id={id} disabled={Boolean(disabled)} />
- <label for={id} className="info">
- <span className="feature-name">{name}</span>
- {' '}
- <a href={`https://github.com/sindresorhus/refined-github/blob/master/source/features/${name}.tsx`}>
- source
- </a>
- {screenshot ? <>, <a href={screenshot}>screenshot</a></> : ''}
- <br/>
- <span className="description">{parsedDescription}</span>
- </label>
- </p>
+ <div className="info">
+ <label for={id}>
+ <span className="feature-name">{name}</span>
+ {' '}
+ <a href={`https://github.com/sindresorhus/refined-github/blob/master/source/features/${name}.tsx`}>
+ source
+ </a>
+ {screenshot ? <>, <a href={screenshot}>screenshot</a></> : ''}
+ <br/>
+ <p className="description">{parsedDescription}</p>
+ </label>
+ </div>
+ </div>
);
}
async function init(): Promise<void> {
select('.js-features')!.append(...__featuresInfo__.map(buildFeatureCheckbox));
+ // Move minimized users input field below the respective feature checkbox
+ select('[for="feature:minimize-user-comments"]')!.after(select('.js-minimized-users-container')!);
+
await optionsStorage.syncForm('#options-form');
fitTextarea.watch('textarea');