File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 33 "name" : " Tab Notes" ,
44 "browser_specific_settings" : {
55 "gecko" : {
6- "id" : " tab-notes@nishit " ,
6+ "id" : " tab-notes@ryux " ,
77 "strict_min_version" : " 42.0"
88 }
99 },
1010 "version" : " 0.1.0" ,
1111 "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" ,
1316 "permissions" : [" storage" ],
1417 "chrome_url_overrides" : {
1518 "newtab" : " newtab.html"
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ browser.tabs.onActivated.addListener(tabOpen);
55browser . windows . onFocusChanged . addListener ( tabOpen ) ;
66
77function logKey ( e ) {
8- console . log ( "Textarea Change" ) ;
98 clearTimeout ( timeoutId ) ;
109 timeoutId = setTimeout ( function ( ) {
1110 // Runs 1 second (1000 ms) after the last change
@@ -20,14 +19,13 @@ function saveToDB() {
2019}
2120
2221function tabOpen ( tab ) {
23- console . log ( "tab open" ) ;
2422 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+ }
2726 } ) ;
2827}
2928
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