Users can decide at any time if they want to share their bandwidth or not.
Disclaimer example
generateAndOpenOptInLink()
method.
optIn()
method. If they don’t agree, you call the optOut()
method.
service worker
file (also known as background script) and add the following code:
optIn()
and optOut()
method as shown here.
Custom elements implementation
getOptInStatus()
, optIn()
, optOut()
and start()
are accessible from any part of your extension, so you can call them from a popup, a content script, or a background script.To check if the user has already opted in, you can call the getOptInStatus
method, which is a promise that resolves to a boolean value.optOut
method. Mellowtel won’t activate for this user anymore until the user opts in again.optIn()
and optOut()
method in your service worker
file.generateSettingsLink()
.
This method will return a link that will open the Mellowtel settings page where users can decide at any time if they want to opt-in or opt-out.
This link should be placed inside the popup, options page or any other place where users can easily access it.
generateSettingsLink() code