File tree Expand file tree Collapse file tree 4 files changed +23
-19
lines changed Expand file tree Collapse file tree 4 files changed +23
-19
lines changed Original file line number Diff line number Diff line change 2
2
"server" : false ,
3
3
"port" : 2323 ,
4
4
"tabURL" : " " ,
5
+ "docs" : " https://google.com" ,
6
+ "docsInstall" : " https://instagram.com" ,
5
7
"state" : true ,
6
8
"theme" : " dark" ,
7
9
"page" : " auth" ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import './Icon.js'
3
3
import manifest from '../../manifest.json' assert { type : 'json '}
4
4
5
5
chrome . storage . local . get ( function ( result ) {
6
- let theme , page , state
6
+ let theme , page , state , docs = result . docs
7
7
8
8
result . state === true ? state = 'toggle_on' : state = 'toggle_off'
9
9
result . theme === 'dark' ? theme = 'light_mode' : theme = 'dark_mode'
@@ -12,7 +12,7 @@ chrome.storage.local.get(function(result) {
12
12
const header =
13
13
`<header>
14
14
<div>
15
- <snipx-logo text="${ manifest . name } "></snipx-logo>
15
+ <snipx-logo href=" ${ docs } " text="${ manifest . name } "></snipx-logo>
16
16
</div>
17
17
<div>
18
18
<snipx-icon icon="${ state } "></snipx-icon>
Original file line number Diff line number Diff line change 1
1
export default class SnipxLogo extends HTMLElement {
2
2
constructor ( ) {
3
3
super ( )
4
- this . innerHTML = `<a href="https://google.com " target="_blank">${ this . getAttribute ( 'text' ) } </a>`
4
+ this . innerHTML = `<a href="${ this . getAttribute ( 'href' ) } " target="_blank">${ this . getAttribute ( 'text' ) } </a>`
5
5
}
6
6
}
7
7
Original file line number Diff line number Diff line change 1
- // wrap in a chrome.storage.local.get()
2
- // use link from config file
3
- const auth =
4
- `<main id="auth">
5
- <p>Your server isn't running.</p>
6
- <a href="https://google.com" target="_blank">How to run SnipX</a>
7
- </main>`
8
-
9
- export default class SnipxAuth extends HTMLElement {
10
- constructor ( ) {
11
- super ( )
12
- this . innerHTML = auth
13
- }
14
- }
15
-
16
- window . customElements . define ( 'snipx-auth' , SnipxAuth )
1
+ export default ( function ( ) {
2
+ chrome . storage . local . get ( function ( result ) {
3
+ const auth =
4
+ `<main id="auth">
5
+ <p>Your server isn't running.</p>
6
+ <a href="${ result . docsInstall } " target="_blank">How to run SnipX</a>
7
+ </main>`
8
+
9
+ class SnipxAuth extends HTMLElement {
10
+ constructor ( ) {
11
+ super ( )
12
+ this . innerHTML = auth
13
+ }
14
+ }
15
+
16
+ window . customElements . define ( 'snipx-auth' , SnipxAuth )
17
+ } )
18
+ } ) ( )
You can’t perform that action at this time.
0 commit comments