forked from dis-moi/extension
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(uninstall): Add
extensionId
parameter to uninstall URL
- Loading branch information
Showing
6 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Uninstall | ||
|
||
Uninstall is handle by the browser natively. | ||
|
||
When the extension is **uninstall** we trigger a redirection to the `UNINSTALL_ORIGIN` URL via the `setUninstallURL` hook: | ||
```js | ||
// [...] | ||
browser.runtime.setUninstallURL( | ||
`${UNINSTALL_ORIGIN}${buildQueryString({ extensionId })}` | ||
) | ||
// [...] | ||
``` | ||
Here we can add metrics to better understand the reason. | ||
|
||
> The `UNINSTALL_ORIGIN` shall remain on the editor domain to better reflect content policy and manifest file. | ||
At present time we use the following script on the uninstall page to forward parameters to our uninstall form URL: | ||
```s | ||
<script> | ||
(function(){ | ||
var | ||
u = new URL(window.location.href), | ||
ru = new URL('https://form.jotformeu.com/92173584558367') | ||
; | ||
ru.search = u.search; | ||
window.location = ru.toString(); | ||
})() | ||
</script> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters