File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1- import { checkAppUrl } from './common-page.ts' ;
1+ import { checkAppUrl } from './common-page.js' ;
2+
3+ export function initUserCheckAppUrl ( ) {
4+ if ( ! document . querySelector ( '.page-content.user.signin, .page-content.user.signup, .page-content.user.link-account' ) ) return ;
5+ checkAppUrl ( ) ;
6+ }
27
38export function initUserAuthOauth2 ( ) {
49 const outer = document . querySelector ( '#oauth2-login-navigator' ) ;
510 if ( ! outer ) return ;
611 const inner = document . querySelector ( '#oauth2-login-navigator-inner' ) ;
712
8- checkAppUrl ( ) ;
9-
1013 for ( const link of outer . querySelectorAll ( '.oauth-login-link' ) ) {
1114 link . addEventListener ( 'click' , ( ) => {
1215 inner . classList . add ( 'tw-invisible' ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import {initFindFileInRepo} from './features/repo-findfile.ts';
2424import { initCommentContent , initMarkupContent } from './markup/content.ts' ;
2525import { initPdfViewer } from './render/pdf.ts' ;
2626
27- import { initUserAuthOauth2 } from './features/user-auth.ts' ;
27+ import { initUserAuthOauth2 , initUserCheckAppUrl } from './features/user-auth.ts' ;
2828import {
2929 initRepoIssueDue ,
3030 initRepoIssueReferenceRepositorySearch ,
@@ -219,6 +219,7 @@ onDomReady(() => {
219219 initCommitStatuses ,
220220 initCaptcha ,
221221
222+ initUserCheckAppUrl ,
222223 initUserAuthOauth2 ,
223224 initUserAuthWebAuthn ,
224225 initUserAuthWebAuthnRegister ,
You can’t perform that action at this time.
0 commit comments