Skip to content

Commit 84dc2de

Browse files
authored
Merge pull request #79 from codeitcodes/main
A
2 parents 4cda2cd + 5e310ae commit 84dc2de

File tree

5 files changed

+42
-21
lines changed

5 files changed

+42
-21
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Codeit
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

background-medium.png

76.7 KB
Loading

bottomfloat.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function checkBottomFloat() {
118118
window.setTimeout(() => {
119119

120120
// if still on bottom of codeit
121-
if ((st + cd.offsetHeight) >= cd.scrollHeight) {
121+
if ((cd.scrollTop + cd.offsetHeight) >= cd.scrollHeight) {
122122

123123
// show bottom float
124124
bottomFloat.classList.remove('hidden');

filebrowser.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,16 @@ async function renderSidebarHTML() {
108108

109109
if (contents != '') {
110110

111-
// if repo is owned by another user
112-
if (user != loggedUser.login) {
111+
// if repo is owned by logged user
112+
if (loggedUser && user == loggedUser.login) {
113113

114-
// show username, repo name and path
115-
sidebarLogo.innerText = user + '/' + repo + contents;
114+
// show repo name and path
115+
sidebarLogo.innerText = repo + contents;
116116

117117
} else {
118118

119-
// show repo name and path
120-
sidebarLogo.innerText = repo + contents;
119+
// show username, repo name and path
120+
sidebarLogo.innerText = user + '/' + repo + contents;
121121

122122
}
123123

@@ -126,16 +126,16 @@ async function renderSidebarHTML() {
126126

127127
} else if (repo != '') {
128128

129-
// if repo is owned by another user
130-
if (user != loggedUser.login) {
129+
// if repo is owned by logged user
130+
if (loggedUser && user == loggedUser.login) {
131131

132-
// show username and repo name
133-
sidebarLogo.innerText = user + '/' + repo;
132+
// show repo name
133+
sidebarLogo.innerText = repo;
134134

135135
} else {
136136

137-
// show repo name
138-
sidebarLogo.innerText = repo;
137+
// show username and repo name
138+
sidebarLogo.innerText = user + '/' + repo;
139139

140140
}
141141

@@ -251,17 +251,17 @@ async function renderSidebarHTML() {
251251

252252
let fullName;
253253

254-
// if repo is owned by another user
255-
if (item.full_name.split('/')[0] != loggedUser.login) {
256-
257-
// show username and repo name
258-
fullName = item.full_name;
259-
260-
} else {
254+
// if repo is owned by logged user
255+
if (loggedUser && item.full_name.split('/')[0] == loggedUser.login) {
261256

262257
// show repo name
263258
fullName = item.name;
264259

260+
} else {
261+
262+
// show username and repo name
263+
fullName = item.full_name;
264+
265265
}
266266

267267
out += `

service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
// update cache names any time any of the cached files change
4-
const CACHE_NAME = 'static-cache-v244';
4+
const CACHE_NAME = 'static-cache-v247';
55

66
// list of files to cache
77
const FILES_TO_CACHE = [

0 commit comments

Comments
 (0)