Skip to content

Commit b3c03a8

Browse files
authored
Merge pull request #82 from medyo/develop
Version 1.12.0
2 parents b9aee7e + 6814bc9 commit b3c03a8

32 files changed

Lines changed: 800 additions & 467 deletions

.github/workflows/distribute.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ jobs:
7373
EXTENSION_ID: ${{ secrets.CHROME_EXTENSION_ID }}
7474
CLIENT_ID: ${{secrets.CHROME_EXTENSION_CLIENT_ID}}
7575
REFRESH_TOKEN: ${{secrets.CHROME_EXTENSION_REFRESH_TOKEN}}
76-
run: chrome-webstore-upload upload --source dist/extension.zip --extension-id $EXTENSION_ID --auto-publish
76+
run: chrome-webstore-upload upload --source dist/chrome_extension.zip --extension-id $EXTENSION_ID --auto-publish
77+
7778
- name: Upload the package to Firefox web store
7879
env:
7980
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
.eslintcache
44
.env*
5+
*.zip
56

67
# dependencies
78
/node_modules
@@ -24,5 +25,4 @@
2425
npm-debug.log*
2526
yarn-debug.log*
2627
yarn-error.log*
27-
source_code.zip
2828
TODO

craco.config.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module.exports = {
2+
webpack: {
3+
configure: {
4+
output: {
5+
filename: 'static/js/[name].js',
6+
},
7+
optimization: {
8+
runtimeChunk: false,
9+
splitChunks: {
10+
chunks(chunk) {
11+
return false
12+
},
13+
},
14+
},
15+
},
16+
},
17+
plugins: [
18+
{
19+
plugin: {
20+
overrideWebpackConfig: ({ webpackConfig }) => {
21+
let mcep
22+
webpackConfig.plugins.some((p) => {
23+
if (p.constructor.name === 'MiniCssExtractPlugin') {
24+
mcep = p
25+
return true
26+
}
27+
})
28+
if (mcep) {
29+
mcep.options.filename = 'static/css/[name].css'
30+
}
31+
32+
return webpackConfig
33+
},
34+
},
35+
options: {},
36+
},
37+
],
38+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"react-contexify": "^5.0.0",
1818
"react-device-detect": "^1.17.0",
1919
"react-dom": "^17.0.1",
20+
"react-error-boundary": "^3.1.4",
2021
"react-icons": "^4.1.0",
2122
"react-markdown": "^7.0.1",
2223
"react-modal": "^3.12.1",

public/carbon.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/index.html

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
9-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
10-
<script>
11-
// Blocking script to avoid the initial background flickering (switching from light to dark)
12-
// https://stackoverflow.com/a/63033934/3495717
13-
try {
14-
var theme = JSON.parse(localStorage.hackerTabPrefs).theme || 'dark'
15-
document.documentElement.classList.add(theme)
16-
} catch (e) { console.log(e) }
17-
</script>
9+
<link rel="preconnect" href="https://hackertab.dev" />
10+
<script src="./startup.js"></script>
11+
1812
<% if (!!+process.env.REACT_APP_WEB_BUILD) { %>
1913
<title>Hackertab</title>
14+
<link rel="manifest" href="%PUBLIC_URL%/web_manifest.json" />
2015
<% } else { %>
2116
<title>New Tab</title>
2217
<% } %>

public/logos/logoVector.svg

Lines changed: 26 additions & 0 deletions
Loading

public/manifest.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
{
22
"name": "Hackertab.dev",
33
"description": "The Developer’s Homepage",
4-
"version": "1.11.1",
4+
"version": "1.12.0",
55
"manifest_version": 2,
66
"chrome_url_overrides": {
77
"newtab": "index.html"
88
},
99
"background": {
10-
"scripts": [
11-
"background.js"
12-
]
10+
"scripts": ["background.js"]
1311
},
14-
"permissions": [
15-
"https://*.hackertab.dev/*"
16-
],
12+
"permissions": ["https://*.hackertab.dev/*"],
1713
"icons": {
1814
"16": "/logos/logo16.png",
1915
"32": "/logos/logo32.png",
2016
"48": "/logos/logo48.png",
2117
"128": "/logos/logo128.png"
2218
},
23-
"content_security_policy": "script-src 'self' https://*.carbonads.com https://*.buysellads.net https://*.buysellads.com https://*.servedby-buysellads.com https://*.carbonads.net sha256-9wgUeE7o26PX9BlGznRgR+gJarj/ugHxm3UOzKP13EE='; object-src 'self'",
19+
"content_security_policy": "script-src 'self' https://*.carbonads.com https://*.buysellads.net https://*.buysellads.com https://*.servedby-buysellads.com https://*.carbonads.net; object-src 'self'",
2420
"applications": {
2521
"gecko": {
2622
"id": "{f8793186-e9da-4332-aa1e-dc3d9f7bb04c}"

public/startup.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Blocking script to avoid the initial background flickering (switching from light to dark)
2+
// https://stackoverflow.com/a/63033934/3495717
3+
try {
4+
var theme = JSON.parse(localStorage.hackerTabPrefs).theme || 'dark'
5+
document.documentElement.classList.add(theme)
6+
} catch (e) {
7+
console.log(e)
8+
}

public/web_manifest.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"short_name": "Hackertab.dev",
3+
"name": "The Developer’s Homepage",
4+
"description": "Hackertab helps developers stay up-to-date with the latest tech happenings",
5+
"icons": [
6+
{
7+
"src": "/logos/logoVector.svg",
8+
"type": "image/svg+xml",
9+
"sizes": "1200x1200"
10+
},
11+
{
12+
"src": "/logos/logo192.png",
13+
"type": "image/png",
14+
"sizes": "192x192"
15+
},
16+
{
17+
"src": "/logos/logo512.png",
18+
"type": "image/png",
19+
"sizes": "512x512"
20+
}
21+
],
22+
"start_url": "/?source=pwa",
23+
"background_color": "#000000",
24+
"display": "standalone",
25+
"scope": "/",
26+
"theme_color": "#000000"
27+
}

0 commit comments

Comments
 (0)