Skip to content

Commit d4e0d0a

Browse files
committed
add: icons and popup page for extension
1 parent 3d382ff commit d4e0d0a

18 files changed

+79
-31
lines changed

chrome-extension/css/main.css

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
body {
2+
font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
3+
font-weight: 400;
4+
min-width: 320px;
5+
padding: 0;
6+
margin: 0;
7+
}
8+
.icon{
9+
max-width: 32px;
10+
}

chrome-extension/icons/github.png

620 Bytes
Loading

chrome-extension/icons/icon128.png

77.8 KB
Loading

chrome-extension/icons/icon16.png

3.22 KB
Loading

chrome-extension/icons/icon32.png

9.83 KB
Loading

chrome-extension/icons/icon48.png

18.7 KB
Loading

chrome-extension/icons/icon64.png

29.3 KB
Loading

chrome-extension/icons/web.png

507 Bytes
Loading

chrome-extension/manifest.json

+37-25
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
11
{
2-
"manifest_version": 3,
3-
"name": "Leetcode Predictor",
4-
"version": "1.0.0",
5-
"description": "Browser extension for Leetcode rating predictions.",
6-
"short_name": "LCPredictor",
7-
"background": {
8-
"service_worker": "background.js"
9-
},
10-
"action":{
11-
"default_popup":"./popup.html",
12-
"default_icons":{
13-
14-
}
15-
},
16-
"options_page":"./options.html",
17-
"permissions":[
18-
"activeTab",
19-
"tabs",
20-
"storage",
21-
"scripting"
22-
],
23-
"host_permissions":[
24-
"<all_urls>"
25-
]
26-
}
2+
"manifest_version": 3,
3+
"name": "LC Predictor",
4+
"version": "1.0.0",
5+
6+
"short_name": "LC Predictor",
7+
"background": {
8+
"service_worker": "background.js"
9+
},
10+
"action": {
11+
"default_popup": "./popup.html",
12+
"icons": {
13+
"16": "/icons/icon16.png",
14+
"32": "/icons/icon32.png",
15+
"48": "/icons/icon48.png",
16+
"64": "/icons/icon64.png",
17+
"128": "/icons/icon128.png"
18+
}
19+
},
20+
"description": "Browser extension for predicting leetcode contest rating. It shows approximate rating delta after contests on leetcode itself",
21+
"icons": {
22+
"16": "/icons/icon16.png",
23+
"32": "/icons/icon32.png",
24+
"48": "/icons/icon48.png",
25+
"64": "/icons/icon64.png",
26+
"128": "/icons/icon128.png"
27+
},
28+
"options_page": "./options.html",
29+
"permissions": [
30+
"activeTab",
31+
"tabs",
32+
"storage",
33+
"scripting"
34+
],
35+
"host_permissions": [
36+
"<all_urls>"
37+
]
38+
}

chrome-extension/popup.html

+26-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html>
3+
34
<head>
4-
<meta charset="UTF-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<title>Document</title>
5+
<title>LC Predictor</title>
6+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
7+
crossorigin="anonymous" />
8+
<link rel="stylesheet" href="/css/main.css" />
89
</head>
10+
911
<body>
10-
12+
<div class="text-center py-3">
13+
<img class="icon" src="/icons/icon128.png"></img>
14+
<span>
15+
Leetcode rating predictor
16+
</span>
17+
</div>
18+
<div class="row d-flex justify-content-evenly bg-warning py-2">
19+
<div class="col-2">
20+
<a href="https://github.com/SysSn13/leetcode-rating-predictor" target="_blank">
21+
<img class="icon" src="/icons/github.png"></img>
22+
</a>
23+
</div>
24+
<div class="col-2">
25+
<a href="https://lcpredictor.herokuapp.com" target="_blank">
26+
<img class="icon" src="/icons/web.png"></img>
27+
</a>
28+
</div>
29+
</div>
1130
</body>
31+
1232
</html>

public/android-chrome-192x192.png

19.9 KB
Loading

public/android-chrome-512x512.png

37.5 KB
Loading

public/apple-touch-icon.png

18.2 KB
Loading

public/favicon-16x16.png

850 Bytes
Loading

public/favicon-32x32.png

2.27 KB
Loading

public/favicon.ico

15 KB
Binary file not shown.

public/site.webmanifest

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

views/layouts/layout.ejs

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
1111
<title><%= title %> </title>
1212
<link rel="stylesheet" href="/stylesheets/main.css">
13+
14+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
15+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
16+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
17+
<link rel="manifest" href="/site.webmanifest">
1318
</head>
1419

1520
<body>

0 commit comments

Comments
 (0)