Skip to content

Commit bfa8f31

Browse files
committed
Update gitauth.js
1 parent 517f391 commit bfa8f31

File tree

1 file changed

+14
-19
lines changed

1 file changed

+14
-19
lines changed

git/gitauth.js

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -78,35 +78,30 @@ window.onload = async () => {
7878

7979
window.addEventListener('message', (event) => {
8080

81-
// if redirected from git auth
82-
if (event.source.location.pathname === '/git/github/oauth') {
83-
84-
// hide intro screen
85-
sidebar.classList.remove('intro');
81+
// hide intro screen
82+
sidebar.classList.remove('intro');
8683

87-
// if on safari, refresh header color
88-
if (isSafari) {
84+
// if on safari, refresh header color
85+
if (isSafari) {
8986

90-
document.querySelector('meta[name="theme-color"]').content = '#313744';
87+
document.querySelector('meta[name="theme-color"]').content = '#313744';
9188

92-
onNextFrame(() => {
89+
onNextFrame(() => {
9390

94-
document.querySelector('meta[name="theme-color"]').content = '#1a1c24';
91+
document.querySelector('meta[name="theme-color"]').content = '#1a1c24';
9592

96-
});
93+
});
9794

98-
}
95+
}
9996

100-
// start loading
101-
startLoading();
97+
// start loading
98+
startLoading();
10299

103-
const gitCode = event.data;
100+
const gitCode = event.data;
104101

105-
// get git token from Github
106-
getGithubToken(gitCode);
102+
// get git token from Github
103+
getGithubToken(gitCode);
107104

108-
}
109-
110105
})
111106

112107

0 commit comments

Comments
 (0)