Skip to content

Use with Foxy Gestures

Ng Guoyou edited this page Jun 13, 2021 · 7 revisions

External integrations are not officially supported. Please use this at your own risk and without warranty.

  1. Go to Foxy Gestures's options

  2. Go to the User Scripts tab and create a new gesture.

    You can use the following script as a starter. {72d92df5-2aa0-4b06-b807-aa21767545cd} is the extension ID on Mozilla Addons for save-in.

    const source = data.element.mediaInfo && data.element.mediaInfo.source;
    
    if (source) {
        const payload = {
            type: "DOWNLOAD",
            body: {
                url: source,
                info: { pageUrl: `${window.location}`, srcUrl: source, comment: null }
            }
        };
    
        browser.runtime.sendMessage("{72d92df5-2aa0-4b06-b807-aa21767545cd}", payload);
    }

    comment can be targeted in routing rules with comment:. For example, if you set comment: "foo" in the user script, routing rules with comment: foo will match the gesture.

    comment: foo
    into: ./from-foxy/:filename:
    
  3. Don't forget to set a gesture for the script you just created.

Clone this wiki locally