diff options
author | 2021-04-23 05:12:58 -0400 | |
---|---|---|
committer | 2021-04-23 05:12:58 -0400 | |
commit | b1d284f08110303ed41c62a658e4d0ce49f5ee2d (patch) | |
tree | d892864d5cb20d60cf6eb36255c21aaf32fda3ec /source/features/new-repo-disable-projects-and-wikis.tsx | |
parent | 86c0a731a3bb123b7a48fb0e2e21f4192df4fb46 (diff) | |
download | refined-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.tsx | 10 |
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 }, { |