summaryrefslogtreecommitdiff
path: root/source/features/new-repo-disable-projects-and-wikis.tsx
diff options
context:
space:
mode:
authorGravatar yakov116 <16872793+yakov116@users.noreply.github.com> 2021-04-23 05:12:58 -0400
committerGravatar GitHub <noreply@github.com> 2021-04-23 05:12:58 -0400
commitb1d284f08110303ed41c62a658e4d0ce49f5ee2d (patch)
treed892864d5cb20d60cf6eb36255c21aaf32fda3ec /source/features/new-repo-disable-projects-and-wikis.tsx
parent86c0a731a3bb123b7a48fb0e2e21f4192df4fb46 (diff)
downloadrefined-github-b1d284f08110303ed41c62a658e4d0ce49f5ee2d.tar.gz
refined-github-b1d284f08110303ed41c62a658e4d0ce49f5ee2d.tar.zst
refined-github-b1d284f08110303ed41c62a658e4d0ce49f5ee2d.zip
Extend `new-repo-disable-projects-and-wikis` to new repo templates (#4268)
Diffstat (limited to '')
-rw-r--r--source/features/new-repo-disable-projects-and-wikis.tsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/features/new-repo-disable-projects-and-wikis.tsx b/source/features/new-repo-disable-projects-and-wikis.tsx
index 6c1d3b98..9c58ee19 100644
--- a/source/features/new-repo-disable-projects-and-wikis.tsx
+++ b/source/features/new-repo-disable-projects-and-wikis.tsx
@@ -33,7 +33,10 @@ function setStorage(): void {
async function init(): Promise<void> {
await api.expectToken();
- select.last('.js-repo-init-setting-container')!.after(
+ select.last([
+ '.js-repo-init-setting-container', // IsNewRepo
+ '.form-checkbox' // IsNewRepoTemplate
+ ])!.after(
<div className="form-checkbox checked mt-0 mb-3">
<label>
<input
@@ -48,12 +51,13 @@ async function init(): Promise<void> {
</div>
);
- delegate(document, '#new_repository', 'submit', setStorage);
+ delegate(document, '#new_repository, #new_new_repository', 'submit', setStorage);
}
void features.add(__filebasename, {
include: [
- pageDetect.isNewRepo
+ pageDetect.isNewRepo,
+ pageDetect.isNewRepoTemplate
],
init
}, {