File tree Expand file tree Collapse file tree 5 files changed +25
-6
lines changed Expand file tree Collapse file tree 5 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,15 @@ const Panel = () => {
7
7
const theme = useStorage ( exampleThemeStorage ) ;
8
8
const isLight = theme === 'light' ;
9
9
const logo = isLight ? 'devtools-panel/logo_horizontal.svg' : 'devtools-panel/logo_horizontal_dark.svg' ;
10
+ const goGithubSite = ( ) =>
11
+ chrome . tabs . create ( { url : 'https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite' } ) ;
10
12
11
13
return (
12
14
< div className = { `App ${ isLight ? 'bg-slate-50' : 'bg-gray-800' } ` } >
13
15
< header className = { `App-header ${ isLight ? 'text-gray-900' : 'text-gray-100' } ` } >
14
- < img src = { chrome . runtime . getURL ( logo ) } className = "App-logo" alt = "logo" />
16
+ < button onClick = { goGithubSite } >
17
+ < img src = { chrome . runtime . getURL ( logo ) } className = "App-logo" alt = "logo" />
18
+ </ button >
15
19
< p >
16
20
Edit < code > pages/devtools-panel/src/Panel.tsx</ code >
17
21
</ p >
Original file line number Diff line number Diff line change @@ -9,13 +9,16 @@ const NewTab = () => {
9
9
const theme = useStorage ( exampleThemeStorage ) ;
10
10
const isLight = theme === 'light' ;
11
11
const logo = isLight ? 'new-tab/logo_horizontal.svg' : 'new-tab/logo_horizontal_dark.svg' ;
12
+ const goGithubSite = ( ) =>
13
+ chrome . tabs . create ( { url : 'https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite' } ) ;
12
14
13
15
console . log ( t ( 'hello' , 'World' ) ) ;
14
-
15
16
return (
16
17
< div className = { `App ${ isLight ? 'bg-slate-50' : 'bg-gray-800' } ` } >
17
18
< header className = { `App-header ${ isLight ? 'text-gray-900' : 'text-gray-100' } ` } >
18
- < img src = { chrome . runtime . getURL ( logo ) } className = "App-logo" alt = "logo" />
19
+ < button onClick = { goGithubSite } >
20
+ < img src = { chrome . runtime . getURL ( logo ) } className = "App-logo" alt = "logo" />
21
+ </ button >
19
22
< p >
20
23
Edit < code > pages/new-tab/src/NewTab.tsx</ code >
21
24
</ p >
Original file line number Diff line number Diff line change @@ -7,10 +7,14 @@ const Options = () => {
7
7
const theme = useStorage ( exampleThemeStorage ) ;
8
8
const isLight = theme === 'light' ;
9
9
const logo = isLight ? 'options/logo_horizontal.svg' : 'options/logo_horizontal_dark.svg' ;
10
+ const goGithubSite = ( ) =>
11
+ chrome . tabs . create ( { url : 'https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite' } ) ;
10
12
11
13
return (
12
14
< div className = { `App ${ isLight ? 'text-gray-900 bg-slate-50' : 'text-gray-100 bg-gray-800' } ` } >
13
- < img src = { chrome . runtime . getURL ( logo ) } className = "App-logo" alt = "logo" />
15
+ < button onClick = { goGithubSite } >
16
+ < img src = { chrome . runtime . getURL ( logo ) } className = "App-logo" alt = "logo" />
17
+ </ button >
14
18
< p >
15
19
Edit < code > pages/options/src/Options.tsx</ code >
16
20
</ p >
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ const Popup = () => {
14
14
const theme = useStorage ( exampleThemeStorage ) ;
15
15
const isLight = theme === 'light' ;
16
16
const logo = isLight ? 'popup/logo_vertical.svg' : 'popup/logo_vertical_dark.svg' ;
17
+ const goGithubSite = ( ) =>
18
+ chrome . tabs . create ( { url : 'https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite' } ) ;
17
19
18
20
const injectContentScript = async ( ) => {
19
21
const [ tab ] = await chrome . tabs . query ( { currentWindow : true , active : true } ) ;
@@ -38,7 +40,9 @@ const Popup = () => {
38
40
return (
39
41
< div className = { `App ${ isLight ? 'bg-slate-50' : 'bg-gray-800' } ` } >
40
42
< header className = { `App-header ${ isLight ? 'text-gray-900' : 'text-gray-100' } ` } >
41
- < img src = { chrome . runtime . getURL ( logo ) } className = "App-logo" alt = "logo" />
43
+ < button onClick = { goGithubSite } >
44
+ < img src = { chrome . runtime . getURL ( logo ) } className = "App-logo" alt = "logo" />
45
+ </ button >
42
46
< p >
43
47
Edit < code > pages/popup/src/Popup.tsx</ code >
44
48
</ p >
Original file line number Diff line number Diff line change @@ -7,11 +7,15 @@ const SidePanel = () => {
7
7
const theme = useStorage ( exampleThemeStorage ) ;
8
8
const isLight = theme === 'light' ;
9
9
const logo = isLight ? 'side-panel/logo_vertical.svg' : 'side-panel/logo_vertical_dark.svg' ;
10
+ const goGithubSite = ( ) =>
11
+ chrome . tabs . create ( { url : 'https://github.com/Jonghakseo/chrome-extension-boilerplate-react-vite' } ) ;
10
12
11
13
return (
12
14
< div className = { `App ${ isLight ? 'bg-slate-50' : 'bg-gray-800' } ` } >
13
15
< header className = { `App-header ${ isLight ? 'text-gray-900' : 'text-gray-100' } ` } >
14
- < img src = { chrome . runtime . getURL ( logo ) } className = "App-logo" alt = "logo" />
16
+ < button onClick = { goGithubSite } >
17
+ < img src = { chrome . runtime . getURL ( logo ) } className = "App-logo" alt = "logo" />
18
+ </ button >
15
19
< p >
16
20
Edit < code > pages/side-panel/src/SidePanel.tsx</ code >
17
21
</ p >
You can’t perform that action at this time.
0 commit comments