Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update addon to send data via postMessage rather than rely on GET params #138

Closed
miketaylr opened this issue Oct 16, 2018 · 2 comments
Closed
Assignees

Comments

@miketaylr
Copy link
Member

This might not even be possible with existing web extension APIs... but Tom has some advice here:

mozilla/webcompat-team-okrs#34 (comment)

@miketaylr
Copy link
Member Author

Here's a variation of what Tom is describing: https://stackoverflow.com/a/23687543/66348

@ksy36
Copy link
Contributor

ksy36 commented Oct 25, 2019

As we're adding postMessage data support on the webcompat.com side not only for screenshots, but for the rest of the metadata in webcompat/webcompat.com#2985 , lets send all data via postMessage to unify things.

So here https://github.com/webcompat/webcompat-reporter-extensions/blob/master/shared/base.js#L34 we'd need to send a postMessage with the following structure

        const data = {
          screenshot: blob,
          message: message
        };

where message should be a stringified object with url, src, utm_source and utm_campaign properties
and screenshot should be a blob instead of base64 string. This will also allow us to drop base64 support on webcompat.com side as described here webcompat/webcompat.com#1252

@ksy36 ksy36 changed the title Update addon to send POST data rather than rely on GET params Update addon to send data via postMessage rather than rely on GET params Oct 25, 2019
@ksy36 ksy36 self-assigned this Oct 25, 2019
ksy36 added a commit that referenced this issue Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants