When changing preferences in the options, the user needs to refresh any page that is already open before the generated links are updated.
We need to send a message when options change, and the content script needs to listen for the message, then update all links.
Also, let's implement a cache-breaker in the data-scripture-tips-processed attribute, to keep track of whether our links need to be updated.
So, we first increment and store the cache breaker value (use timestamp of options last update), then any of our links that do not match that cache breaker need to be updated.
When changing preferences in the options, the user needs to refresh any page that is already open before the generated links are updated.
We need to send a message when options change, and the content script needs to listen for the message, then update all links.
Also, let's implement a cache-breaker in the data-scripture-tips-processed attribute, to keep track of whether our links need to be updated.
So, we first increment and store the cache breaker value (use timestamp of options last update), then any of our links that do not match that cache breaker need to be updated.