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 22 "server" : false ,
33 "port" : 2323 ,
44 "tabURL" : " " ,
5+ "docs" : " https://google.com" ,
6+ "docsInstall" : " https://instagram.com" ,
57 "state" : true ,
68 "theme" : " dark" ,
79 "page" : " auth" ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import './Icon.js'
33import manifest from '../../manifest.json' assert { type : 'json '}
44
55chrome . storage . local . get ( function ( result ) {
6- let theme , page , state
6+ let theme , page , state , docs = result . docs
77
88 result . state === true ? state = 'toggle_on' : state = 'toggle_off'
99 result . theme === 'dark' ? theme = 'light_mode' : theme = 'dark_mode'
@@ -12,7 +12,7 @@ chrome.storage.local.get(function(result) {
1212 const header =
1313 `<header>
1414 <div>
15- <snipx-logo text="${ manifest . name } "></snipx-logo>
15+ <snipx-logo href=" ${ docs } " text="${ manifest . name } "></snipx-logo>
1616 </div>
1717 <div>
1818 <snipx-icon icon="${ state } "></snipx-icon>
Original file line number Diff line number Diff line change 11export default class SnipxLogo extends HTMLElement {
22 constructor ( ) {
33 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>`
55 }
66}
77
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