You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fetching the config value from chrome.storage.sync is inherently asynchronous, so I know it is difficult to fetch the config value and use it in a condition skipping those lines of code, if the user setting is "off", but this could be fixed by caching the configuration locally, also making sure that the cache is getting refreshed, using an event handler reacting to changes in chrome.storage.sync. I do not speak JS at all, but I think this is the way you handle such things in a language like this, trying to escape the infamous callback hell.
The text was updated successfully, but these errors were encountered:
Disclaimer: In my fork, I modified the extension to fit my needs for another type of web mailer. This is my very first try to write or modify any JS code, so probably the code is horrible. Of course, I also never wrote a Chrome extension.
You may want to refer to my content script in order to see how I am using localStorage as a cache for chrome.storage.sync. Maybe you want to do something similar. In my case, it solves the problem.
This code is always executed for
mailto:
links:MailtOWA/mailtowa.js
Lines 18 to 21 in 60caaab
Fetching the config value from
chrome.storage.sync
is inherently asynchronous, so I know it is difficult to fetch the config value and use it in a condition skipping those lines of code, if the user setting is"off"
, but this could be fixed by caching the configuration locally, also making sure that the cache is getting refreshed, using an event handler reacting to changes inchrome.storage.sync
. I do not speak JS at all, but I think this is the way you handle such things in a language like this, trying to escape the infamous callback hell.The text was updated successfully, but these errors were encountered: