File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ function parseReceivedHeaders(headers, regexp) {
1919 return received ;
2020}
2121
22- browser . storage . local . get ( ) . then ( ( res ) => {
23- if ( ! res . regexp ) {
22+ browser . storage . local . get ( "regexp" ) . then ( ( { regexp } ) => {
23+ if ( ! regexp ) {
2424 browser . storage . local . set ( { regexp : "(.*)" } ) ;
2525 }
2626} ) ;
@@ -29,8 +29,8 @@ function displayReceivedHeader(tabId, messageId) {
2929 browser . messages . getFull ( messageId ) . then ( ( messagepart ) => {
3030 const headers = messagepart . headers . received ;
3131 if ( headers ) {
32- browser . storage . local . get ( ) . then ( ( res ) => {
33- const parsed = parseReceivedHeaders ( headers , res . regexp ) ;
32+ browser . storage . local . get ( "regexp" ) . then ( ( { regexp } ) => {
33+ const parsed = parseReceivedHeaders ( headers , regexp ) ;
3434 browser . displayReceivedHeader . setReceivedHeaderValue ( tabId , parsed ) ;
3535 browser . displayReceivedHeader . setReceivedHeaderHidden ( tabId , ! parsed . length ) ;
3636 } ) ;
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ function saveOptions(e) {
1111}
1212
1313function restoreOptions ( ) {
14- browser . storage . local . get ( ) . then ( ( res ) => {
15- document . querySelector ( "#regexp" ) . value = res . regexp ;
14+ browser . storage . local . get ( "regexp" ) . then ( ( { regexp } ) => {
15+ document . querySelector ( "#regexp" ) . value = regexp ;
1616 } ) ;
1717}
1818
You can’t perform that action at this time.
0 commit comments