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

support for xhr.upload event listeners like GM #1429

Closed
QiroNT opened this issue Feb 25, 2022 · 1 comment
Closed

support for xhr.upload event listeners like GM #1429

QiroNT opened this issue Feb 25, 2022 · 1 comment

Comments

@QiroNT
Copy link

QiroNT commented Feb 25, 2022

(Please fill out the issue template with your details)

Expected Behavior

Listeners in upload object in GM_xmlhttpRequest details should be bind to xhr.upload. (greasemonkey/greasemonkey#1081)

Actual Behavior

nothing happend.

Specifications

  • Firefox: 97.0.1
  • TM: 4.13.6136
  • OS: Linux 5.15 Manjaro Linux

Script

(Please give an example of the script if applicable.)

// ...
const result = await GM.xmlHttpRequest({
  method: "POST",
  url: "https://example.com",
  data: formData,
  // supported in GM
  upload: {
    onprogress(e) {
      if (e.lengthComputable) {
        console.log(e.loaded, e.total);
      }
    },
  },
});
// ...
@derjanb derjanb added this to the 4.16 milestone Mar 18, 2022
@derjanb derjanb modified the milestones: 4.16, 4.18 Jun 9, 2022
@derjanb
Copy link
Member

derjanb commented Jul 18, 2022

Should be fixed at 4.18.6166 (in review|crx|xpi)

At the moment only upload.onpgrogress is supported.

Chrome/Edge users, please download the crx file linked above and drag and drop it to the extensions page chrome://extensions.
Firefox users please install the BETA version or check for BETA version updates at about:addons

For a quick fix please export your settings and scripts as zip or (JSON) file at the "Utilities" tab and import it back at the fixed BETA version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants