Skip to content

Commit d9f84c7

Browse files
committed
Refactors JavaScript script
1 parent 4c88d4a commit d9f84c7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.nginx/script.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
{
1+
(() => {
2+
const prefix = '/.nginx';
3+
24
async function addIcons() {
3-
const prefix = '/.nginx';
45
const iconMap = await fetch(`${prefix}/icons.json`).then(response => response.json());
56
const defaultIcon = iconMap[''];
67

@@ -36,4 +37,4 @@
3637
document.addEventListener('DOMContentLoaded', () => {
3738
addIcons();
3839
});
39-
}
40+
})();

.nginx/style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ footer {
4848
}
4949

5050
#page {
51-
overflow: hidden;
51+
overflow: hidden;
5252
background-color: #fff;
5353
border-radius: .3rem;
5454
box-shadow: 0px 0px .2rem #ccc;
@@ -121,6 +121,6 @@ footer {
121121
}
122122

123123
footer {
124-
padding: .8rem;
124+
padding: 1rem .8rem;
125125
}
126126
}

0 commit comments

Comments
 (0)