File tree 3 files changed +11
-10
lines changed
3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 3
3
"name" : " Tab Notes" ,
4
4
"browser_specific_settings" : {
5
5
"gecko" : {
6
- "id" : " tab-notes@nishit " ,
6
+ "id" : " tab-notes@ryux " ,
7
7
"strict_min_version" : " 42.0"
8
8
}
9
9
},
10
10
"version" : " 0.1.0" ,
11
11
"author" : " Nishit" ,
12
- "description" : " Allow you to write anything in new tab" ,
12
+ "icons" : {
13
+ "48" : " icon48.png"
14
+ },
15
+ "description" : " Allow you to take notes in the new tab page" ,
13
16
"permissions" : [" storage" ],
14
17
"chrome_url_overrides" : {
15
18
"newtab" : " newtab.html"
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ browser.tabs.onActivated.addListener(tabOpen);
5
5
browser . windows . onFocusChanged . addListener ( tabOpen ) ;
6
6
7
7
function logKey ( e ) {
8
- console . log ( "Textarea Change" ) ;
9
8
clearTimeout ( timeoutId ) ;
10
9
timeoutId = setTimeout ( function ( ) {
11
10
// Runs 1 second (1000 ms) after the last change
@@ -20,14 +19,13 @@ function saveToDB() {
20
19
}
21
20
22
21
function tabOpen ( tab ) {
23
- console . log ( "tab open" ) ;
24
22
browser . storage . sync . get ( "tab_note" ) . then ( result => {
25
- console . log ( result ) ;
26
- document . querySelector ( "#notes" ) . value = result . tab_note ;
23
+ if ( typeof result !== "undefined" ) {
24
+ document . querySelector ( "#notes" ) . value = result . tab_note ;
25
+ }
27
26
} ) ;
28
27
}
29
28
30
-
31
- window . addEventListener ( 'load' , ( ) => {
32
- tabOpen ( )
33
- } )
29
+ window . addEventListener ( "load" , ( ) => {
30
+ tabOpen ( ) ;
31
+ } ) ;
You can’t perform that action at this time.
0 commit comments