Skip to content

Commit

Permalink
🐛 bug: fix guide not showing up on Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
hueyy committed Jun 16, 2021
1 parent d108458 commit 1b4190e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clerkent",
"version": "2.7.0",
"version": "2.7.1",
"private": true,
"description": "quick search for international caselaw and legislation",
"repository": "https://github.com/lacuna-technologies/clerkent.git",
Expand Down
14 changes: 8 additions & 6 deletions src/Background/BackgroundPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ const onConnect = (port: Runtime.Port) => {
port.onMessage.addListener(onReceiveMessage(port))
}

const onInstall = (details: Runtime.OnInstalledDetailsType) => {
const onInstall = (details: Runtime.OnInstalledDetailsType): void => {
Logger.log(`onInstall`, details)
if(details?.previousVersion){
// just an update, do nothing
return
Expand All @@ -175,17 +176,16 @@ const onInstall = (details: Runtime.OnInstalledDetailsType) => {

const DEBUG_MODE = process?.env?.NODE_ENV === `development`

const synchronousInit = () => {
browser.runtime.onInstalled.addListener(onInstall)
}

const init = () => {
browser.runtime.onInstalled.addListener((): void => {
Logger.log(`⚖ clerkent installed`)
})
browser.runtime.onConnect.addListener(onConnect)

if(DEBUG_MODE){
browser.tabs.create({ url: `popup.html` })
}

browser.runtime.onInstalled.addListener(onInstall)
}

const BackgroundPage = () => {
Expand All @@ -195,4 +195,6 @@ const BackgroundPage = () => {
)
}

synchronousInit()

export default BackgroundPage
1 change: 1 addition & 0 deletions src/pages/Guide/Guide.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ main#clerkent-guide {
margin: 0 auto;
padding: 2rem 1rem;
font-family: $font;
font-size: 120%;

#clerkent-logo {
display: inline-block;
Expand Down

0 comments on commit 1b4190e

Please sign in to comment.