Skip to content

Commit 472c2ea

Browse files
authored
Update gitauth.js
1 parent 242bf53 commit 472c2ea

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

git/gitauth.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ window.onload = () => {
1111

1212
githubToken = (getStorage('token') === 'undefined') ? undefined : getStorage('token');
1313
treeLoc = getStorage('tree') ? getStorage('tree').split(',') : ['', '', ''];
14-
14+
15+
const url = new URL(window.location.href);
16+
const treeQuery = url.searchParams.get('tree');
17+
18+
if (treeQuery) {
19+
20+
treeLoc = treeQuery.split(',');
21+
22+
}
23+
1524
loginButton.addEventListener('click', () => {
1625

1726
window.open('https://github.com/login/oauth/authorize?client_id='+ clientId +'&scope=repo,write:org', 'Login with Github', 'height=575,width=575');

0 commit comments

Comments
 (0)