Fritzing without Donation

Download Fritzing without donation.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Fritzing without Donation
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Download Fritzing without donation.
// @author       DickyT
// @match        https://fritzing.org/download/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const data = {
        "payer_email": "[email protected]",
        "payer_id": "UNKNOWN",
        "payer_status": "UNKNOWN",
        "first_name": "DID NOT",
        "last_name": "DONATE USER",
        "txn_id": "UNKNOWN",
        "mc_currency": "USD",
        "mc_gross": "0",
        "protection_eligibility": "UNKNOWN",
        "payment_gross": "0",
        "payment_status": "UNKNOWN",
        "pending_reason": "multi_currency",
        "payment_type": "instant",
        "handling_amount": "0",
        "shipping": "0",
        "item_name": "Download Fritzing",
        "quantity": "1",
        "txn_type": "web_accept",
        "payment_date": "2019-11-10T7:12:12Z",
        "business": "[email protected]",
        "receiver_id": "UNKNOWN",
        "notify_version": "UNKNOWN",
        "verify_sign": "UNKNOWN",
    };

    const form = document.createElement('form');
    form.style.display = 'none';

    Object.keys(data).forEach((k) => {
        const input = document.createElement('input');
        input.name = k;
        input.value = data[k];
        form.append(input);
    });

    form.action = "https://fritzing.org/download/?d7547=1";
    form.method = "POST";

    document.body.append(form);

    document.querySelector('#donateForm').append(document.createElement('br'));

    const downloadBtn = document.createElement('button');
    downloadBtn.type = 'button';
    downloadBtn.textContent = 'Download without donation';
    downloadBtn.addEventListener('click', () => {
        form.submit();
    });

    document.querySelector('#donateForm').append(downloadBtn);
})();