Tampermonkey: Gm_download not working well on Firefox

Created on 27 Jun 2020  路  3Comments  路  Source: Tampermonkey/tampermonkey

Actual Behavior

For chrome is working fine
For Firefox no data can be obtained and there is no return value
I tried to delete some options, such as name, but the error of not_whitelisted returned.
And i can't see the XHR request in Tampermonkey's debug mode

Specifications

  • Firefox: (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0)
  • Tampermonkey: (v4.11.6114)

Script

// ==UserScript==
// @namespace https://github.com/dotennin/baidu-pan-downloader
// @name baidu-pan-downloader
// @description A download manager for Baidu Yun
// @version 1.3.3
// @author Dotennin
// @license MIT
// @compatible        chrome/83.0.4103.97 passed
// @compatible        edge/83.0.478.54 passed
// @compatible        firefox untested
// @compatible        opera untested
// @compatible        safari untested
// @include https://pan.baidu.com/disk/*
// @connect baidu.com
// @connect qdall01.baidupcs.com
// @grant GM_download
// @run-at document-idle
// ==/UserScript==

GM_download({
    url,
    name: server_filename,
    saveAs: true,
    headers: {
      Host: 'qdall01.baidupcs.com',
      Accept: '*/*',
      'User-Agent': 'netdisk;P2SP;2.2.60.26',
      'Accept-Encoding': 'identity',
      'Accept-Language': 'ja-JP',
      'Accept-Charset': '*',
    },
    onerror: (e) => {
      console.log(e)
    },
  })
bug fixed at beta

All 3 comments

As a workaround you can try to set "Config Mode" to "Advanced" and then "Download Mode" to "Native".

Should be fixed at TM BETA 4.11.6115

Confimed this issue fixed at BETA v4.11.6115

Was this page helpful?
0 / 5 - 0 ratings